lkml.org 
[lkml]   [2013]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/47] perf: Add PERF_EVENT_IOC_ID ioctl to return event ID
On Wed, 7 Aug 2013, Arnaldo Carvalho de Melo wrote:

> From: Jiri Olsa <jolsa@redhat.com>
>
> The only way to get the event ID is by reading the event fd,
> followed by parsing the ID value out of the returned data.
>
> While this is ok for current read format used by perf tool,
> it is not ok when we use PERF_FORMAT_GROUP format.
>
> With this format the data are returned for the whole group
> and there's no way to find out what ID belongs to our fd
> (if we are not group leader event).

I'm a little confused by this.

If you have an event group (with PERF_FORMAT_GROUP) and you specify
PERF_FORMAT_ID in read_format, then when you read you get the id
values for each sibling event along with their values, right?

This is how PAPI does things. So I wouldn't say it's impossible to get
the event IDs with PERF_FORMAT_GROUP events.

Though maybe you're saying it's hard to map sibling fds to id values if
you don't have the list of all fds in an event group in the order they
were added. Which I guess may be true, but I'd think your analysis tool
would have other problems if you didn't have that mapping.

Vince


\
 
 \ /
  Last update: 2013-08-09 17:01    [W:0.247 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site