[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1290510512.2072.387.camel@laptop>
Date: Tue, 23 Nov 2010 12:08:32 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Ian Munsie <imunsie@....ibm.com>
Cc: linux-kernel@...r.kernel.org, Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...e.hu>,
Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Subject: Re: [PATCH 3/6] perf: Add timestamp to COMM and MMAP events
On Tue, 2010-11-23 at 16:35 +1100, Ian Munsie wrote:
> From: Ian Munsie <imunsie@....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?
--
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