On 2015-10-31 at 10:28 "'Davide Libenzi' via Akaros"
<[email protected]> wrote:
> But the timers have no use alone. There is nothing that uses them, if
> the profiler is not running.

The separation between the timer and the start/stop was done
intentionally.  

Here's the rationale from when that code was written:

commit 383648aa099a3974b397cf81d1a82969bf7814fc
Author: Barret Rhoden <[email protected]>
Date:   Tue Dec 9 22:44:37 2014 -0800

    Per-cpu timer control for oprofile sampling
    
    To use oprof now, you need to set the timer, then enable the profiling.
    If/when we add other tracers that can be turned on and off, we'll
    continue to use this model: set the collection of things to trace, then
    start them all at once.
    
    If you don't have the timers turned on, but you run opstart, other
    traces, such as TRACE_ME and whatnot (like perhaps writing traces from
    userspace via kpoprofile) will still be collected.
    
    I don't have a control for various TRACE_MEs yet.  Maybe we can add one
    (like printx).
    
    Some examples:
    
    To turn on the timer on core 0.  This turns on an alarm/IRQ:
    
    $ echo optimer 0 on > /prof/kpctl
    
    Then start the actual profiling/collection:
    
    $ echo opstart > /prof/kpctl
    
    To stop collecting:
    
    $ echo opstop > /prof/kpctl
    
    To turn off all the timers:
    
    $ echo optimer all off > /prof/kpctl
    
    Oh, and you can adjust the timer period if you like.  Default is 1ms.
    
    $ echo optimer period 1000 > /prof/kpctl (period is in usec)

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to