Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1101879pxk; Fri, 18 Sep 2020 03:57:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1cALccVoyL9pKeq744Nolg1LHWV788zr2ERdmoVng9nwJ3cvjW/f0Rr/m+a4T6fIYhP0u X-Received: by 2002:a17:907:728e:: with SMTP id dt14mr34425717ejc.505.1600426656117; Fri, 18 Sep 2020 03:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600426656; cv=none; d=google.com; s=arc-20160816; b=Bc46dYCxUINyRqHoLuGuqZr9o7QFGfiF8k3Nnhez9JN3Sb+mYZ1ijqkc7bY0ydrmCX j/0wxTz2ZflL6OxtOgQap6jOcl2dqyCNaSoSFZ20HOPWXwA9RtXbM9jS6T3u0GYG6psN iRhQvuo84QoQwsxP71c51Ebs7yPqdYBp6ZaxDRQOklJ9vjusH72dktbKlWjc+uLK8S1W YcMZph0gmDMmy3I3Zh1gqPWIDlNcDQ8KfSX+qD+uJO8kdQ//35YPEcs5PLyK5/bw79W7 7jaWDTYgD+Kjj5oCMtxym6FrVu35cXAsxxdzg+J/x8TyGniJ+kRjcBVhAm8SBFv9WPTY OK5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :dkim-signature; bh=iMB5cTwdizkwwYU9RPCJWF64AGl7FOdE5nl2RAdKssM=; b=1Lhnf1mWPAW6zkhCmOLEuEX9LVkGEeVaI2gXp/t2FY2KSUT6w6RBWTFg9jZ+iD9I9m djAAFY+x0Al5GsgViOmRa3VG3rnNoMmd9t1L5OLWBh4u3ru4Avf0z681TgaacQPmEqcj 3RiGDAT2OQgDUXsZPiaWq3Y70kpnDau0LzerL4C/W/9x71m5jpuFt3HDoZmhSNJ/SDuZ KSdf8twF1jlcIKoOa4MRX76BY1o1GsKSWpwmo0IIIG9p/s1k06kJojXzvUklBdFSJhxx +xxTuGZwC73RttQafjGiJtq5tOrD8KeiAAUCuRvnCmdyaZ/U9OWUpGgpJPiTj2kSQ9SL XiqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="sRDOp1/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i18si1907644edg.115.2020.09.18.03.57.11; Fri, 18 Sep 2020 03:57:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="sRDOp1/9"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726159AbgIRK4A (ORCPT + 99 others); Fri, 18 Sep 2020 06:56:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:43766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbgIRK4A (ORCPT ); Fri, 18 Sep 2020 06:56:00 -0400 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CB64920789; Fri, 18 Sep 2020 10:55:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600426559; bh=7sSABL4QXD65HEVDA8nFrm0LnOHh9FEw+n+ZJ1+kPFc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sRDOp1/9yOLNEi29b+JJcJ52Q7jUzVPZLjpNib2KO5E87TJFMrinc8UwjMYA8OGF3 4v4Z7LLlMsoMjrsX/BQs/Q6Bk/Bpkp9OlvSxdyd4hiYNeeDkJN/eu9MqVrMpWhAMIz rsBjnKK9ePgyU+CCes9trR0VMpClnv4maQsh9sMo= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kJE3Y-00CyDX-UZ; Fri, 18 Sep 2020 11:55:57 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 18 Sep 2020 11:55:56 +0100 From: Marc Zyngier To: Sergey Senozhatsky Cc: Leo Yan , Arnaldo Carvalho de Melo , Mark Rutland , Peter Zijlstra , Will Deacon , John Garry , Mathieu Poirier , Namhyung Kim , Suleiman Souhlal , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv3] perf kvm: add kvm-stat for arm64 In-Reply-To: <20200918103521.GE3049@jagdpanzerIV.localdomain> References: <20200917003645.689665-1-sergey.senozhatsky@gmail.com> <20200917100950.GC12548@leoy-ThinkPad-X240s> <20200917101219.GD12548@leoy-ThinkPad-X240s> <652f10660f09bd608b825233713f775a@kernel.org> <20200917114231.GE12548@leoy-ThinkPad-X240s> <20200918003219.GC3049@jagdpanzerIV.localdomain> <20200918103521.GE3049@jagdpanzerIV.localdomain> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <06c3e5d907d1145bf3a7a03de63170ae@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: sergey.senozhatsky@gmail.com, leo.yan@linaro.org, acme@kernel.org, mark.rutland@arm.com, peterz@infradead.org, will@kernel.org, john.garry@huawei.com, mathieu.poirier@linaro.org, namhyung@kernel.org, suleiman@google.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-09-18 11:35, Sergey Senozhatsky wrote: > On (20/09/18 09:20), Marc Zyngier wrote: >> On 2020-09-18 01:32, Sergey Senozhatsky wrote: >> > On (20/09/17 12:53), Marc Zyngier wrote: >> > > Feel free to add a *new* tracepoint instead. >> > >> > Wouldn't we want a whole bunch of new tracepoints in this case? >> >> Yes. I don't have a better solution as long as tracepoints are ABI. > > Well, no one does. > >> Get someone to sign-off on it, and I'll happily change them. > > Sorry, I'm not sure I understand this sentence. What I meant is that the only way to make changes to existing tracepoints would be to get someone like Linus to approve them. It's all rhetorical anyway, so let's move on. > >> > (almost all of the existing ones with the extra vcpu_id field). >> > Right now we have 3 types of events: >> > - events with no vcpu at all // nil >> > - events with vcpu_pc // "0x%016lx", __entry->vcpu_pc >> > - events with (void *)vcpu // "vcpu: %p", __entry->vcpu >> > >> > It might be helpful if we could filter out events by vcpu_id. >> > But this, basically, doubles the number of events in the ringbuffer. >> >> Only if you enable them both, right? > [..] >> How would that double the number of events in the buffer? > > Yes. I assume that many scripts do something like "capture kvm:* > events", > so new and old events are enabled. Unless we want to keep new events in > something like kvm2:* namespace (which is unlikely to happen, I guess). I really don't mind. I actually like the namespacing, as it gives us a notion of versioning, something tracepoints lack.. And it gives an opportunity to argue about the name of the namespace. > > And `sudo ./perf stat -e 'kvm:*'` is not unseen. In fact, this is > literally the first thing mentioned at > https://www.linux-kvm.org/page/Perf_events > > So if we'll have something like > > trace_kvm_foo(vcpu); > + trace_kvm_foo2(vcpu->id, vcpu); > > for all arm64 kvm events, then we double the number of arm64 kvm:* > events > in the ringbuffer, don't we? Maybe this is not a gigantic issue, but > who > knows. I don't think it's a problem, but I'm more in favour of the namespace approach. M. -- Jazz is not dead. It just smells funny...