From: Vince Weaver <vincent.weaver@maine.edu>
To: trinity@vger.kernel.org
Subject: exporting pmu data from perf_event_open.c
Date: Tue, 13 May 2014 14:51:35 -0400 (EDT) [thread overview]
Message-ID: <alpine.DEB.2.10.1405131441100.24957@vincent-weaver-1.umelst.maine.edu> (raw)
I just finished syncing perf_fuzzer against the Trinity 1.4 codebase.
It was a bit of a pain, but I guess still worth doing in order to
keep perf_event_open.c shared.
I was wondering if you'd consider a patch like the following.
It exports the perf_event_open() pmus structure, that way perf_fuzzer can
pretty-print the pmu names. It would save a lot of code duplication.
I could always just make this change in my local tree, but it's nice
having perf_event_open.c the same in both projects.
Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
diff --git a/syscalls/perf_event_open.c b/syscalls/perf_event_open.c
index c4ccafd..3783382 100644
--- a/syscalls/perf_event_open.c
+++ b/syscalls/perf_event_open.c
@@ -44,9 +44,9 @@ struct pmu_type {
struct generic_event_type *generic_events;
};
-static int num_pmus=0;
-
-static struct pmu_type *pmus=NULL;
+/* Not static so other tools can access the PMU data */
+int num_pmus=0;
+struct pmu_type *pmus=NULL;
#define FIELD_UNKNOWN 0
next reply other threads:[~2014-05-13 18:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 18:51 Vince Weaver [this message]
2014-05-14 15:43 ` exporting pmu data from perf_event_open.c Dave Jones
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=alpine.DEB.2.10.1405131441100.24957@vincent-weaver-1.umelst.maine.edu \
--to=vincent.weaver@maine.edu \
--cc=trinity@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 read-only IMAP folder(s) and NNTP newsgroup(s).