This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [RFC] Support for performance event sampling
- From: Josh Stone <jistone at redhat dot com>
- To: William Cohen <wcohen at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Wed, 24 Feb 2010 15:17:13 -0800
- Subject: Re: [RFC] Support for performance event sampling
- References: <4B7D6A89.1070205@redhat.com>
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