On Mon, Feb 10, 2014 at 12:28:56PM -0500, Don Zickus wrote:
> From: Arnaldo Carvalho de Melo <[email protected]>
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to