mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Cc: mingo@elte.hu, LKML <linux-kernel@vger.kernel.org>,
	Zhaolei <zhaolei@cn.fujitsu.com>,
	kosaki.motohiro@jp.fujitsu.com,
	Steven Rostedt <rostedt@goodmis.org>,
	fweisbec@gmail.com
Subject: Re: [PATCH 3/3] ftrace: add tracepoint for itimer
Date: Tue, 26 May 2009 23:50:46 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0905262344160.1762@localhost.localdomain> (raw)
In-Reply-To: <4A16767D.8030907@cn.fujitsu.com>

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

  parent reply	other threads:[~2009-05-26 21:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22  9:55 Xiao Guangrong
2009-05-26 16:40 ` Steven Rostedt
2009-05-27  7:43   ` Xiao Guangrong
2009-05-26 21:50 ` Thomas Gleixner [this message]
2009-05-27  7:40   ` Xiao Guangrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.0905262344160.1762@localhost.localdomain \
    --to=tglx@linutronix.de \
    --cc=fweisbec@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=xiaoguangrong@cn.fujitsu.com \
    --cc=zhaolei@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®