[ltt-dev] [patch] add tracepoints to trace activate/deactivate task

Jason Baron jbaron at redhat.com
Wed Dec 10 12:14:23 EST 2008


On Wed, Dec 10, 2008 at 02:15:41PM +0100, Peter Zijlstra wrote:
> On Wed, 2008-12-10 at 07:27 -0500, Mathieu Desnoyers wrote:
> > 
> > Do you think there would be other events that Jason would need to
> > identify every time a task gets de/activated, or he is able to
> > reconstruct this from the current tracepoints ?
> 
> I don't know what events Jason wants, some of the things he mentioned
> map directly to syscalls, so I'm not sure if we'd want to catch it at a
> generic syscall layer, or a tracepoint per syscall guts.
> 
> 

My goal is to instrument the scheduler at the most "interesting" points.
Activate and Deactivate allow me to directly figure out queue length (posted in
my previous mail), how long a process wait on a queue, and when a
process moves between queues. Yes, I might be able to figure these out
from insturmentation calls from schedule(), try_to_wake_up(),
wake_up_new_task(), pull_task(), migrate_task(), etc. But its going to
be awfully complex. Activate/deactivate task seem like very core basic
scheduler primitives.

Adding a tracepoint to set_task_cpu() is good but it doesn't tell me
about whether or not a task is on queue. It simply tells me when a task
is assigned a different cpu (which activate/deactivate can do as well).

I understand and appreciate what you guys are saying about do not
instrument the code too generally, but IMHO activate/deactivate are core
scheduler primitives, which are difficult to piece together otherwise. I
can up with more scripts that show their utility.


thanks,

-Jason 







More information about the lttng-dev mailing list