[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 08 Aug 2009 18:10:34 +0200
From: Brice Goglin <Brice.Goglin@...ia.fr>
To: Ingo Molnar <mingo@...e.hu>
CC: Frédéric Weisbecker <fweisbec@...il.com>,
Mike Galbraith <efault@....de>,
Arnaldo Carvalho de Melo <acme@...hat.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>, paulus@...ba.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf report: Display per-thread event counters
Ingo Molnar wrote:
>> [...] But I don't see yet where I am suppose to get something like
>> PERF_READ_EVENT in builtin-stat.c so I haven't touched it yet.
>>
>
> Yeah. 'perf stat' is not really getting events but is doing a
> read-out of the counter value(s) and constructs its 'read event'
> that way. So you wont find PERF_READ_EVENT in builtin-stat.c, you'll
> find:
>
> res = read(fd[cpu][counter], single_count, nv * sizeof(u64));
>
> in read_counter(). The printout is then done in print_counter().
>
Is there a way to get per-thread counters there? I wrote the code to
gather per-cpu counters there, but I don't see any way to get the
corresponding thread-id.
I looked at perf record to get some help. But I don't see where the
PERF_EVENT_READ are generated. I guess they are directly generated by
the kernel, read by perf record, and written as is to the output file?
thanks,
Brice
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists