lkml.org 
[lkml]   [2009]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf_counter: allow and require one-page mmap on counting counters
Ingo Molnar writes:

> ah - ok. Morning confusion. (any email from me that comes at single
> digit hour local time should be considered fundamentally suspect ;-)

:)

> Wouldnt it still be better to keep the symmetry between counting and
> sampling counters? In theory we could transit between these stags
> and 'switch off' a sampling counter or 'switch on' a counting
> counter - via an ioctl or so. Shouldnt counting counters be sampling
> counters that were created while disabled temporarily?

Well, the buffer size can already be changed on the fly, by unmapping
the counter and remapping. So, shouldn't I be allowed to select a
zero-sized ring buffer at the times when I'm not sampling, i.e. when
it's a counting counter?

And here's something else that is semi-related: the PAPI guys want a
kind of counter that counts until it overflows, and then sends a
signal to the process and disables itself (and the whole group it's
in). The signal handler can then record whatever application-specific
information is interesting, re-enable the counter and return. It
seems to be a way to do profiling where what you're recording is
something specific to the program rather than generic things like the
instruction pointer.

So that could be a case where we want a sampling counter that doesn't
generate any event records in the kernel, and so a 0-sized ring buffer
could be appropriate.

Paul.


\
 
 \ /
  Last update: 2009-03-25 10:47    [W:0.048 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site