From: William Cohen <wcohen@redhat.com>
To: linux-perf-users@vger.kernel.org
Subject: Why the need to do a perf_event_open syscall for each cpu on the system?
Date: Fri, 13 Mar 2015 14:49:28 -0400 [thread overview]
Message-ID: <55033138.5010500@redhat.com> (raw)
Hi All,
I have a design question about the linux kernel perf support. A number of /proc statistics aggregate data across all the cpus in the system. Why the does perf require the user-space application to enumerate all the processors and do a perf_event_open syscall for each of the processors? Why not have a perf_event_open with pid=-1 and cpu=-1 mean system-wide event and aggregate it in the kernel when the value is read? The line below from design.txt specifically say it is invalid.
(Note: the combination of 'pid == -1' and 'cpu == -1' is not valid.)
-Will
next reply other threads:[~2015-03-13 18:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-13 18:49 William Cohen [this message]
2015-03-13 21:14 ` Why the need to do a perf_event_open syscall for each cpu on the system? Vince Weaver
2015-03-15 5:15 ` Elazar Leibovich
2015-03-16 14:47 ` William Cohen
2015-03-17 0:51 ` Stephane Eranian
2015-03-17 14:40 ` Andi Kleen
2015-03-17 15:30 ` William Cohen
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=55033138.5010500@redhat.com \
--to=wcohen@redhat.com \
--cc=linux-perf-users@vger.kernel.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).