From: Andi Kleen <andi@firstfloor.org>
To: Michael Edwards <michael@tensyr.com>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org,
linux-perf-users@vger.kernel.org
Subject: Re: perf/x86/intel: Collecting CPU-local performance counters from all cores in parallel
Date: Tue, 23 May 2017 13:53:32 -0700 [thread overview]
Message-ID: <87o9uj47n7.fsf@firstfloor.org> (raw)
In-Reply-To: <CACFdaOz-ox4XSu-q8S-Op8xPTDwoT6FAN-yhi0988NJiazpm0Q@mail.gmail.com> (Michael Edwards's message of "Mon, 22 May 2017 22:42:29 -0700")
Michael Edwards <michael@tensyr.com> writes:
>
> Am I going about this wrong?
It seems like a reasonable optimization, but it's likely a lot of work.
> Is there some better way to pursue the
> high-level goal of gathering PMC-based statistics frequently and
> efficiently from all cores, without breaking everything else that uses
> perf_events?
If you can drive the collection from a performance counter
(e.g. reference cycles) you could use leader sampling, and let the
PMIs log the values to the mmap'ed ring buffer. This should
be vastly more efficient than pulling everything. This works today,
however there are some scaling problems with many groups still.
perf record -F frequency -e '{cpu/ref-cycles/,<three other
events to collect>}:S,... more groups like this ... -a ...
-Andi
prev parent reply other threads:[~2017-05-23 20:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-23 5:42 perf/x86/intel: Collecting CPU-local performance counters from all cores in parallel Michael Edwards
2017-05-23 20:53 ` Andi Kleen [this message]
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=87o9uj47n7.fsf@firstfloor.org \
--to=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=michael@tensyr.com \
--cc=peterz@infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).