Re: perf report for .ko files

From: john smith
Date: Fri Jan 29 2010 - 16:59:42 EST

> > 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)?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at