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: Zhaolei <zhaolei@cn.fujitsu.com>,
	mingo@elte.hu, LKML <linux-kernel@vger.kernel.org>,
	kosaki.motohiro@jp.fujitsu.com,
	Steven Rostedt <rostedt@goodmis.org>,
	fweisbec@gmail.com
Subject: Re: [PATCH 1/3] ftrace: add tracepoint for timer
Date: Wed, 10 Jun 2009 12:58:38 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0906101225280.3351@localhost.localdomain> (raw)
In-Reply-To: <4A2F8006.506@cn.fujitsu.com>

Xiao,

On Wed, 10 Jun 2009, Xiao Guangrong wrote:
> Those tracepoints are wanted and useful:
> 1) We can detect a timer's delay if jiffies info is added, like this:
> 
> 	XXX: timer_start: timer=e0b374e0 func=test_timerfuc expires=4294941565
> 	XXX: timer_expire: timer=e0b374e0 func=test_timerfuc jiffies=4294941567
>    We expect the timer expires at 4294941565, actually the timer expires at
>    4294941567, so it is delayed by 2 jiffies.

You can achive the same thing by storing (expires - jiffies) when you
trace the timer start. Then you can calc the delta from the trace
timestamps, but I have no strong opinion about that.

> 2) We can monitor the lifecycle and behaviors of a timer, for
>    example, when monitoring dirty writeback timer, I found reading
>    /proc/sys/vm/dirty_writeback_centisecs will reset the timer:

 
> 3) We are developing "flight-record" using crash. It can read out the ring
>    buffer from the dump file, and let us know what was happening before
>    kernel panic, so we may find the cause of the panic. This requires
>    well-defined tracepoints in different kernel subsystems, especially some
>    core subsystems, timer is surely one of them.

I'm not arguing that tracepoints are not useful, but you can achieve
all the things above by combining them in an unintrusive way to the
existing debug points.

This results in the minimum noise of debug/trace insertions into the
code, which keeps it readable and maintainable. That's all I want.

Thanks,

	tglx

  reply	other threads:[~2009-06-10 10:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22  9:53 Xiao Guangrong
2009-05-26 21:40 ` Thomas Gleixner
2009-05-27  7:36   ` Xiao Guangrong
2009-05-27 10:10     ` Thomas Gleixner
2009-05-29  2:00       ` Zhaolei
2009-05-29  9:55         ` Thomas Gleixner
2009-06-01  9:08           ` Zhaolei
2009-06-03  2:52           ` Xiao Guangrong
2009-06-03 16:39             ` Thomas Gleixner
2009-06-04  5:38               ` Xiao Guangrong
2009-06-04  8:44                 ` Thomas Gleixner
2009-06-10  9:42                   ` Xiao Guangrong
2009-06-10 10:58                     ` Thomas Gleixner [this message]
2009-06-03  2:50       ` 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.0906101225280.3351@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®