lkml.org 
[lkml]   [2009]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 3/3] ftrace: add tracepoint for itimer
On Fri, 22 May 2009, Xiao Guangrong wrote:
> +TRACE_EVENT(itimer_start,
> +
> + TP_PROTO(int which, struct itimerval *value),
> +
> + TP_ARGS(which, value),
> +
> + TP_STRUCT__entry(
> + __field( int, which )
> + __field( unsigned long long, it_value )
> + __field( unsigned long long, it_interval )
> + __string( comm, current->comm )
> + ),
> +
> + TP_fast_assign(
> + __entry->which = which;
> + __entry->it_value = (which == ITIMER_REAL ?
> + ktime_to_ns(timeval_to_ktime(value->it_value)) :
> + timeval_to_cputime(&value->it_value));
> + __entry->it_interval = (which == ITIMER_REAL ?
> + ktime_to_ns(timeval_to_ktime(value->it_interval)) :
> + timeval_to_cputime(&value->it_interval));
> + __assign_str(comm, current->comm);
> + ),

Again, conversion of raw values needs to be done when we analyse the
trace and not in the fast path.

....

> + } else{

} else {

please
> tsk->signal->it_real_incr.tv64 = 0;
> + trace_itimer_cancel(ITIMER_REAL);
> + }
>
> spin_unlock_irq(&tsk->sighand->siglock);
> break;
> @@ -186,7 +191,10 @@ again:
> jiffies_to_cputime(1));
> set_process_cpu_timer(tsk, CPUCLOCK_VIRT,
> &nval, &cval);
> - }
> + trace_itimer_start(ITIMER_VIRTUAL, value);
> + }else

Please run your patches through checkpatch.pl

Thanks,

tglx


\
 
 \ /
  Last update: 2009-05-26 23:53    [W:0.050 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site