Messages in this thread | | | Date | Wed, 12 Sep 2012 15:02:53 +0200 | From | Robert Richter <> | Subject | Re: [PATCH] perf: Introduce function to report unsupported syscall attribute flags |
| |
On 12.09.12 13:20:43, Peter Zijlstra wrote: > On Wed, 2012-09-12 at 13:01 +0200, Robert Richter wrote: > > + if (notsup) > > + pr_warn("perf: unsupported attribute flags: %016llx\n", notsup); > > This is a dmesg DoS..
This could be avoided by introducing a cpuinfo like sysfs file for each pmu:
/sys/bus/event_source/devices/*/flags
Then, userspace should know how to correctly setup the syscall. All supported attributes would be known to perf and messages would thrown only if something goes unexpected wrong.
I suggested this already here:
https://lkml.org/lkml/2012/8/3/214 https://lkml.org/lkml/2012/9/6/472
> I'm also not sure dmesg is the right way.. could we not somehow change > the attrs to provide better diagnostic?
I found this discussion without a solution for the problem:
http://lwn.net/Articles/374794/
Other options could be pr_debug() or trace_printk()'s for debugging purposes. Or an error report in sysfs:
cat /sys/bus/event_source/devices/*/log
But the pmu type needs to be known for this.
-Robert
-- Advanced Micro Devices, Inc. Operating System Research Center
| |