From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ian Munsie <imunsie@au1.ibm.com>
Cc: linux-kernel@vger.kernel.org, Paul Mackerras <paulus@samba.org>,
Ingo Molnar <mingo@elte.hu>,
Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Subject: Re: [PATCH 3/6] perf: Add timestamp to COMM and MMAP events
Date: Tue, 23 Nov 2010 12:08:32 +0100 [thread overview]
Message-ID: <1290510512.2072.387.camel@laptop> (raw)
In-Reply-To: <1290490544-14349-4-git-send-email-imunsie@au1.ibm.com>
On Tue, 2010-11-23 at 16:35 +1100, Ian Munsie wrote:
> From: Ian Munsie <imunsie@au1.ibm.com>
>
> This patch adds extra ABI to the perf interface to allow the
> PERF_RECORD_COMM and PERF_RECORD_MMAP events to optionally include a
> timestamp, which they were previously missing.
>
> This has become necessary since the move to per-task-per-cpu events in
> perf as those events would not necessarily be recorded prior to any
> samples associated with them and would cause perf to miss-attribute
> those events and produce bogus reports. This behaviour can be observed
> almost every run on 64 CPU PowerPC systems, but has also been observed
> on a simple quad core Intel i7.
>
> The timestamp is requested by setting the all_timed flag in the
> event attributes when opening the event and will be placed just after
> the header of the events in question.
>
> This patch also ensures that the PERF_RECORD_COMM event is dispatched
> before enabling the counters for enable_on_exec.
>
> @@ -332,6 +333,7 @@ enum perf_event_type {
> *
> * struct {
> * struct perf_event_header header;
> + * { u64 time; } && all_timed
> *
> * u32 pid, tid;
> * u64 addr;
> @@ -354,6 +356,7 @@ enum perf_event_type {
> /*
> * struct {
> * struct perf_event_header header;
> + * { u64 time; } && all_timed
> *
> * u32 pid, tid;
> * char comm[];
Right, so acme had a patch adding
PERF_SAMPLE_TID
PERF_SAMPLE_TIME
PERF_SAMPLE_ID
PERF_SAMPLE_CPU
PERF_SAMPLE_STREAM_ID
(IIRC) to every record.. so solve this same problem. Except he got
interrupted by KS and things and didn't get around to posting it.
Arnaldo?
next prev parent reply other threads:[~2010-11-23 11:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 5:35 perf: Timestamp COMM and MMAP events for correct attribution Ian Munsie
2010-11-23 5:35 ` [PATCH 1/6] perf: Display unknown rather than IP for unidentified DSO Ian Munsie
2010-11-23 5:35 ` [PATCH 2/6] perf: Move all output for perf report -D into trace_event Ian Munsie
2010-11-23 5:35 ` [PATCH 3/6] perf: Add timestamp to COMM and MMAP events Ian Munsie
2010-11-23 11:08 ` Peter Zijlstra [this message]
2010-11-23 12:41 ` Arnaldo Carvalho de Melo
2010-11-25 15:47 ` Arnaldo Carvalho de Melo
2010-11-26 21:54 ` Arnaldo Carvalho de Melo
2010-11-29 6:06 ` Ian Munsie
2010-11-29 11:54 ` Peter Zijlstra
2010-11-29 23:45 ` Ian Munsie
2010-11-30 14:02 ` Arnaldo Carvalho de Melo
2010-11-23 5:35 ` [PATCH 4/6] perf: Add timestamp to READ and LOST events Ian Munsie
2010-11-23 5:35 ` [PATCH 5/6] perf tool: Process COMM and MMAP events in order Ian Munsie
2010-11-23 5:35 ` [PATCH 6/6] perf tool: Process READ and LOST " Ian Munsie
2010-11-23 6:37 ` perf: Timestamp COMM and MMAP events for correct attribution Ian Munsie
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=1290510512.2072.387.camel@laptop \
--to=a.p.zijlstra@chello.nl \
--cc=acme@ghostprotocols.net \
--cc=imunsie@au1.ibm.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