From: David Ahern <dsahern@gmail.com>
To: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Jiri Olsa <jolsa@redhat.com>,
a.p.zijlstra@chello.nl, mingo@elte.hu,
Stephane Eranian <eranian@google.com>,
paulus@samba.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf tools: Exit recording if events have non matching sample type
Date: Thu, 29 Sep 2011 20:41:17 -0600 [thread overview]
Message-ID: <4E852C4D.4010307@gmail.com> (raw)
In-Reply-To: <20110930022134.GB9369@ghostprotocols.net>
On 09/29/2011 08:21 PM, Arnaldo Carvalho de Melo wrote:
> Em Thu, Sep 29, 2011 at 06:58:20PM -0600, David Ahern escreveu:
>> On 09/29/2011 06:40 PM, Arnaldo Carvalho de Melo wrote:
>>> This comes from time to time:
>>>
>>> http://us.generation-nt.com/answer/bug-perf-event-sampling-buffer-format-cannot-handle-multi-event-sampling-help-202985832.html
>>>
>>> The whole point of sample_type is to ask for just what is needed for
>>> some specific event so that we reduce the per sample footprint.
>>>
>>> So we allow for multiple types of events to be on the same stream, but
>>> not for them to have just what each need, its a limitation, one that we
>>> can solve. I see no reason not to solve it :-)
>>>
>>> The evsel/evlist classes were designed to abstract away such details,
>>> i.e. perf_evlist__mmap should notice different sample_types and sort
>>> this out transparently.
>>>
>>> And then perf_evlist__mmap_read(evlist, idx), evlist->nr_mmaps should be
>>> enough to process the events :-)
>>>
>>> - Arnaldo
>>
>> An ABI change fixes the root cause of the current problem -- put an id
>> in perf_event_header. The id maps to the evsel which has the
>> sample_type. Right now you have to parse the sample to get the id to get
>> the evsel.
>
> This id is not always needed, so it shouldn't go to perf_event_header.
> Peter, can you comment here? ;-)
I'm talking about a new 'id' that would always be needed *for samples*
-- it identifies the evsel it is associated with. The evsel has the
sample type. The sample_type is then used to parse it. Seems like a
simpler solution then having mmap's per sample type and then writing
separate files.
David
next prev parent reply other threads:[~2011-09-30 2:41 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 23:06 [PATCH] perf tools: Exit recording if events have non matching sample type Arnaldo Carvalho de Melo
2011-09-29 23:33 ` David Ahern
2011-09-30 0:40 ` Arnaldo Carvalho de Melo
2011-09-30 0:58 ` David Ahern
2011-09-30 2:21 ` Arnaldo Carvalho de Melo
2011-09-30 2:41 ` David Ahern [this message]
2011-09-30 7:39 ` Peter Zijlstra
2011-10-04 4:14 ` David Ahern
2011-10-04 10:00 ` Peter Zijlstra
2011-10-04 13:41 ` Arnaldo Carvalho de Melo
-- strict thread matches above, loose matches on Subject: below --
2011-09-29 16:01 Jiri Olsa
2011-09-29 22:05 ` Arnaldo Carvalho de Melo
2011-09-29 22:55 ` David Ahern
2011-10-03 10:22 ` Jiri Olsa
2011-10-03 16:27 ` Arnaldo Carvalho de Melo
2011-10-03 19:15 ` Jiri Olsa
2011-10-17 12:50 ` Jiri Olsa
2011-10-21 7:18 ` Xu, Anhua
2011-10-21 8:10 ` Jiri Olsa
2011-10-21 14:16 ` David Ahern
2011-10-21 14:29 ` David Ahern
2011-10-21 14:43 ` Jiri Olsa
2011-10-21 14:42 ` Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E852C4D.4010307@gmail.com \
--to=dsahern@gmail.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox