lkml.org 
[lkml]   [2009]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH v2 4/4] ftrace: add latecy mesurement feature to workqueue tracer
    Date
    > Index: b/include/trace/workqueue_event_types.h
    > ===================================================================
    > --- a/include/trace/workqueue_event_types.h 2009-04-13 13:58:21.000000000 +0900
    > +++ b/include/trace/workqueue_event_types.h 2009-04-13 14:07:14.000000000 +0900
    > @@ -43,6 +43,8 @@ TRACE_EVENT(workqueue_handler_entry,
    > __field(pid_t, thread_pid)
    > __field(struct work_struct *, work)
    > __field(work_func_t, func)
    > + __field(unsigned long, expected_time)
    > + __field(unsigned long, actual_time)
    > ),
    >
    > TP_fast_assign(
    > @@ -50,10 +52,14 @@ TRACE_EVENT(workqueue_handler_entry,
    > __entry->thread_pid = wq_thread->pid;
    > __entry->work = work;
    > __entry->func = work->func;
    > + __entry->expected_time = work->expected_time;
    > + __entry->actual_time = jiffies;
    > ),

    Oops, that's my fault.
    There is work->expected_time only if CONFIG_WORKQUEUE_TRACER is on.


    >
    > - TP_printk("thread=%s:%d func=%pF", __entry->thread_comm,
    > - __entry->thread_pid, __entry->func)
    > + TP_printk("thread=%s:%d latency=%lums func=%pF", __entry->thread_comm,
    > + __entry->thread_pid,
    > + jiffies_to_msecs(__entry->actual_time-__entry->expected_time),
    > + __entry->func)
    > );





    \
     
     \ /
      Last update: 2009-04-14 04:53    [W:0.024 / U:0.604 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site