Messages in this thread | | | Date | Fri, 29 Jan 2010 13:59:35 -0800 (PST) | From | john smith <> | Subject | Re: perf report for .ko files |
| |
> > I did setup attr->exclude_hv, exclude_idle, > exclude_user = 1 in > > create_counter() just before "try_again:" label, no > difference in > > results, on a 2.6.31 (too old? "perf buildid-list" is > not available) > > kernel version: > > > # perf record -f -e cycles fio fio_script > > > (for more than a minute, I increased the sample > frequency with > > different -c values, some locked the machine - > expectedly) > > and > > # perf report --verbose > --dso=/my_module_path/my_module.ko > > (--verbose doesn't provide any more info) > > This isn't going to work, you need to do: > > perf report --verbose --dso='[my_module]' > > I.e. as it appear on /proc/modules + brackets. Arguably we > need to get > it to work also with both 'my_module.ko' and the full > path.
I've tried: "perf report --verbose --dso='[my_module]'" and also: "perf report --verbose --dso='[sg]'" same result as before.
New question:
Is this the minimal set of api that I can use from within the kernel (for specific module sections of interest) to read the counters?
{ int perf_event_release_kernel(struct perf_event *event); struct perf_event *perf_event_create_kernel_counter(struct perf_event_attr *attr, int cpu); u64 perf_event_read_value(struct perf_event *event); }
Any good example of useage of these api's (struct initialization)?
John
| |