lkml.org 
[lkml]   [2014]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2014-02-18 15:21    [W:0.255 / U:5.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site