Messages in this thread | | | Date | Tue, 18 Feb 2014 13:52:06 +0100 | From | Jiri Olsa <> | Subject | Re: [PATCH 01/21] perf c2c: Shared data analyser |
| |
On Mon, Feb 10, 2014 at 12:28:56PM -0500, Don Zickus wrote: > From: Arnaldo Carvalho de Melo <acme@redhat.com> > > This is the start of a new perf tool that will collect information about > memory accesses and analyse it to find things like hot cachelines, etc. > > This is basically trying to get a prototype written by Richard Fowles > written using the tools/perf coding style and libraries. > > Start it from 'perf sched', this patch starts the process by adding the > 'record' subcommand to collect the needed mem loads and stores samples. > > It also have the basic 'report' skeleton, resolving the sample address > and hooking the events found in a perf.data file with methods to handle > them, right now just printing the resolved perf_sample data structure > after each event name.
SNIP
> + evsel->handler.func = assocs[i].handler; > + } > + > + err = 0; > +out: > + return err; > +} > diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h > index f5173cd..76f77c8 100644 > --- a/tools/perf/util/evlist.h > +++ b/tools/perf/util/evlist.h > @@ -52,6 +52,13 @@ struct perf_evsel_str_handler { > void *handler; > }; > > +int __perf_evlist__set_handlers(struct perf_evlist *evlist, > + const struct perf_evsel_str_handler *assocs, > + size_t nr_assocs); > + > +#define perf_evlist__set_handlers(evlist, array) \ > + __perf_evlist__set_handlers(evlist, array, ARRAY_SIZE(array)) > +
this is already implemented in session object.. just need to be changed to work over any event is globaly usable
jirka
| |