lkml.org 
[lkml]   [2009]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectperf_counter: request for three more sample data options
Currently, perf_counter has the ability to record the following on event 
counter overflow:

Instruction Pointer
Call chain
Group counter values
Thread id

To give perf_counter similar capabilities to perfmon2's default sampling
module, I'd like the following additional sample data to be added.

Time stamp
CPU number
Thread Group Id

I'd suggest the following

enum perf_counter_record_format {
PERF_RECORD_IP = 1U << 0,
PERF_RECORD_TID = 1U << 1,
PERF_RECORD_TGID = 1U << 2,
- PERF_RECORD_GROUP = 1U << 2,
+ PERF_RECORD_GROUP = 1U << 3,
- PERF_RECORD_CALLCHAIN = 1U << 3,
+ PERF_RECORD_CALLCHAIN = 1U << 4,
+ PERF_RECORD_CPU_ID = 1U << 5,
+ PERF_RECORD_TIMESTAMP = 1U << 6,
};

And of course the obvious changes to perf_event_type.

I would expect that CPU ID would be 32 bits, and the timestamp to be the
64-bit current time. TGID is the same size as TID.

I am guessing the only difficult thing here would be obtaining the
current time from an IRQ, especially NMI handler. Is this difficult?


--
Regards,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjashfor@us.ibm.com



\
 
 \ /
  Last update: 2009-04-03 03:49    [W:0.055 / U:1.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site