All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Garry <john.garry@huawei.com>
To: Ian Rogers <irogers@google.com>, Andi Kleen <ak@linux.intel.com>,
	"Jiri Olsa" <jolsa@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Kajol Jain <kjain@linux.ibm.com>,
	"Paul A . Clarke" <pc@us.ibm.com>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	Riccardo Mancini <rickyman7@gmail.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	<linux-perf-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	"Vineet Singh" <vineet.singh@intel.com>
Cc: <eranian@google.com>
Subject: Re: [PATCH v2 2/2] perf parse-events: Architecture specific leader override
Date: Fri, 19 Nov 2021 14:47:43 +0000	[thread overview]
Message-ID: <17f31c73-052d-ef15-879a-c6a224977e8d@huawei.com> (raw)
In-Reply-To: <20211118220647.2355999-2-irogers@google.com>

On 18/11/2021 22:06, Ian Rogers wrote:
> Currently topdown events must appear after a slots event:
> 
> $ perf stat -e '{slots,topdown-fe-bound}' /bin/true
> 
>   Performance counter stats for '/bin/true':
> 
>           3,183,090      slots
>             986,133      topdown-fe-bound
> 
> Reversing the events yields:
> 
> $ perf stat -e '{topdown-fe-bound,slots}' /bin/true
> Error:
> The sys_perf_event_open() syscall returned with 22 (Invalid argument) for event (topdown-fe-bound).
> 
> For metrics the order of events is determined by iterating over a
> hashmap, and so slots isn't guaranteed to be first which can yield this
> error.
> 
> Change the set_leader in parse-events, called when a group is closed, so
> that rather than always making the first event the leader, if the slots
> event exists then it is made the leader. It is then moved to the head of
> the evlist otherwise it won't be opened in the correct order.
> 
> The result is:
> 
> $ perf stat -e '{topdown-fe-bound,slots}' /bin/true

Just curious - does this just affect topdown events? I think x86 is the 
only arch which has them.

Thanks,
John

  reply	other threads:[~2021-11-19 14:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18 22:06 [PATCH v2 1/2] perf evlist: Allow setting arbitrary leader Ian Rogers
2021-11-18 22:06 ` [PATCH v2 2/2] perf parse-events: Architecture specific leader override Ian Rogers
2021-11-19 14:47   ` John Garry [this message]
2021-11-19 17:11     ` Ian Rogers
2021-11-30 15:05   ` Arnaldo Carvalho de Melo
2021-11-28 15:28 ` [PATCH v2 1/2] perf evlist: Allow setting arbitrary leader Jiri Olsa
2021-11-30 15:04 ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17f31c73-052d-ef15-879a-c6a224977e8d@huawei.com \
    --to=john.garry@huawei.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=irogers@google.com \
    --cc=jolsa@redhat.com \
    --cc=kan.liang@linux.intel.com \
    --cc=kjain@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=pc@us.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rickyman7@gmail.com \
    --cc=vineet.singh@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.