lkml.org 
[lkml]   [2011]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC -tip] perf, x86: Add PERF_COUNT_HW_NMI_WATCHDOG event v2
On Tue, Jun 21, 2011 at 08:06:54PM +0200, Stephane Eranian wrote:
...
>
> If in arch/x86/kernel/cpu/perf_event.c I add a callback which
> checks:
>
> if (netburst_host) {
> attr.type = PERF_TYPE_RAW
> attr.config = 0x3c
> } else {
> attr.type = PERF_TYPE_HARDWARE
> attr.config = PERF_COUNT_HW__CPU_CYCLES
> }
>
> I simply don't think PERF_COUNT_HW_NMI_WATCHDOG should
> ever be exposed to users.

yes, and peterz pointed it out as well, i agree of course.

>

So, you mean to put it into x86_pmu_event_init, right? How would
we know if this event comes from watchdog.c or not? And what if
user wanted to pass _exactly_ this crazy values to RAW event but
I will threat it as a sign for nmi-watchdog event and will map
it internally to P4_EVENT_EXECUTION_EVENT?

Don't get me wrong, Stephane, this approach will work and it's
not a problem (actually I think I would put -1ULL into config
since it's kinda "icorrect" and can be treated as special one)
but I think it introduce more complexity, it should not be like
this.

Gimme some time, probably I invent something more convenient.

Cyrill


\
 
 \ /
  Last update: 2011-06-21 20:35    [W:0.287 / U:0.376 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site