* exporting pmu data from perf_event_open.c
@ 2014-05-13 18:51 Vince Weaver
2014-05-14 15:43 ` Dave Jones
0 siblings, 1 reply; 2+ messages in thread
From: Vince Weaver @ 2014-05-13 18:51 UTC (permalink / raw)
To: trinity
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: exporting pmu data from perf_event_open.c
2014-05-13 18:51 exporting pmu data from perf_event_open.c Vince Weaver
@ 2014-05-14 15:43 ` Dave Jones
0 siblings, 0 replies; 2+ messages in thread
From: Dave Jones @ 2014-05-14 15:43 UTC (permalink / raw)
To: Vince Weaver; +Cc: trinity
On Tue, May 13, 2014 at 02:51:35PM -0400, Vince Weaver wrote:
> 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.
Sure, if it saves you work why not..
applied, with a munged changelog to change tenses :)
Dave
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-14 15:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-13 18:51 exporting pmu data from perf_event_open.c Vince Weaver
2014-05-14 15:43 ` Dave Jones
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).