This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Support for performance event sampling


On 02/18/2010 08:27 AM, William Cohen wrote:
> Due to check that the performance event kernel api makes the script
> will need to be run as root.

Or "echo 0 >/proc/sys/kernel/perf_counter_paranoid", but that opens it
up for everyone...

That's only for cpu-global counters though.  We could also use
task_finder and attach to user-owned processes, which requires just
ptrace-equivalent privilege.

> One difficulty is the perf_event_create_kernel_counter() allocates
> memory for the event descriptor and returns a pointer to that
> structure. [...] So the systemtap translator will need to generate a 
> unique callback for each performance event.

You have the saved perf_event*, so a shared callback could do a linear
scan to find the matching probepoint.

Josh


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]