mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Zhaolei <zhaolei@cn.fujitsu.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: Re: [PATCH v2 2/2] ftrace: Add timer-source of walltime for ftrace
Date: Wed, 16 Sep 2009 15:37:23 -0400	[thread overview]
Message-ID: <1253129843.20020.214.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <4AB0885C.4010504@cn.fujitsu.com>

On Wed, 2009-09-16 at 14:40 +0800, Zhaolei wrote:
> Frederic Weisbecker wrote:
> > On Wed, Sep 16, 2009 at 01:29:19PM +0800, Zhaolei wrote:
> >> We can add a timer-source for ftrace to support wall-time display.
> >> It is based on Steven Rostedt <rostedt@goodmis.org>'s suggestion in:
> >> http://lkml.org/lkml/2009/7/24/103
> >>
> >> It need to applys on my patch of:
> >> [PATCH v4 1/2] Add function to convert between calendar time and broken-down time for universal use
> >>
> Hello, Frederic
> 
> Thanks for your review.
> 
> >> We can get following output:
> >>  # cd /mnt/debugfs/tracing/
> >>  # cat trace_clock
> >>  [local] global walltime
> >>  # echo sched_switch > current_tracer
> >>  # cat trace
> >>  # tracer: sched_switch
> >>  #
> >>  #           TASK-PID    CPU#    TIMESTAMP  FUNCTION
> >>  #              | |       |          |         |
> >>              bash-3580  [000]  2916.188093:   3580:120:S   + [000]  3580:120:S bash
> >>              bash-3580  [000]  2916.188205:   3580:120:S   + [000]  3580:120:S bash
> >>              bash-3580  [000]  2916.188538:   3580:120:R   + [000]     5:115:S events/0
> >>              bash-3580  [000]  2916.188599:   3580:120:R ==> [000]     5:115:R events/0
> >>          events/0-5     [000]  2916.188669:      5:115:S ==> [000]  3580:120:R bash
> >>  ...
> >>  # echo walltime > trace_clock
> >>  # cat trace
> >>  # tracer: sched_switch
> >>  #
> >>  #           TASK-PID    CPU#           TIMESTAMP  FUNCTION
> >>  #              | |       |                        |         |
> > 
> > 
> > 
> > 
> > The headers seem a bit broken. Is it a copy paste effect or?
> 
> No, it is a format bug of patch.
> I'll fix it.
> 
> > 
> > 
> > 
> >>              bash-3580  [000] 2009-08-24 18:03:16.500705:   3580:120:S   + [000]  3580:120:S bash
> >>              bash-3580  [000] 2009-08-24 18:03:16.500815:   3580:120:S   + [000]  3580:120:S bash
> >>              bash-3580  [000] 2009-08-24 18:03:16.500815:   3580:120:S   + [000]  3580:120:S bash
> >>              bash-3580  [000] 2009-08-24 18:03:16.500815:   3580:120:S ==> [000]     5:115:R events/0
> >>          events/0-5     [000] 2009-08-24 18:03:16.500815:      5:115:R   + [000]  3578:120:S sshd
> >>  ...
> > 
> > 
> > But nice result :)
> > 
> > 
> >> Changelog:
> >> v1->v2: Rebase to top of tip tree.
> >>
> >> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> >> ---
> >>  include/linux/trace_clock.h |    1 +
> >>  kernel/trace/trace.c        |   24 ++++++++++++++++-----
> >>  kernel/trace/trace.h        |    8 ++++++-
> >>  kernel/trace/trace_clock.c  |   48 +++++++++++++++++++++++++++++++++++++++++++
> >>  kernel/trace/trace_output.c |   21 +++++++++++++++---
> >>  5 files changed, 91 insertions(+), 11 deletions(-)
> >>
> >> diff --git a/include/linux/trace_clock.h b/include/linux/trace_clock.h
> >> index 7a81303..322707e 100644
> >> --- a/include/linux/trace_clock.h
> >> +++ b/include/linux/trace_clock.h
> >> @@ -15,5 +15,6 @@
> >>  extern u64 notrace trace_clock_local(void);
> >>  extern u64 notrace trace_clock(void);
> >>  extern u64 notrace trace_clock_global(void);
> >> +extern u64 notrace trace_clock_walltime(void);
> >>  
> >>  #endif /* _LINUX_TRACE_CLOCK_H */
> >> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
> >> index fd52a19..160b6a8 100644
> >> --- a/kernel/trace/trace.c
> >> +++ b/kernel/trace/trace.c
> >> @@ -335,9 +335,10 @@ static struct {
> >>  } trace_clocks[] = {
> >>  	{ trace_clock_local,	"local" },
> >>  	{ trace_clock_global,	"global" },
> >> +	{ trace_clock_walltime,	"walltime" },
> >>  };
> >>  
> >> -int trace_clock_id;
> >> +enum TRACE_CLOCK_TYPE trace_clock_type = TRACE_CLOCK_LOCAL;
> > 
> > 
> > 
> > Uppercase names are usually reserved for CPP macros.
> 
> I'll rename it.

After the fixes that Frederic suggested, and the required timekeeping
ACKS, I'll queue up your next version for v2.6.33. Looking forward to
your new patches.


Thanks,

-- Steve



  reply	other threads:[~2009-09-16 19:37 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24 10:40 [PATCH 0/3] Add walltime support for ring-buffer Zhaolei
2009-07-24 10:42 ` [PATCH] " Zhaolei
2009-07-24 10:47   ` Zhaolei
2009-07-24 10:43 ` [RFC PATCH 1/3] " Zhaolei
2009-07-24 10:43 ` [RFC PATCH 2/3] Apply walltime-supporting functions to trace system Zhaolei
2009-07-24 10:44 ` [RFC PATCH 3/3] Make ftrace display walltime in output Zhaolei
2009-07-24 13:05 ` [PATCH 0/3] Add walltime support for ring-buffer Steven Rostedt
2009-07-28  1:43   ` KOSAKI Motohiro
2009-07-28  1:53     ` Frederic Weisbecker
2009-07-28  2:19       ` Steven Rostedt
2009-08-17  9:22         ` [RFC PATCH] Add timer-source of walltime for ftrace Zhaolei
2009-08-17 16:49           ` Frederic Weisbecker
2009-08-18  2:09             ` Zhaolei
2009-08-18 18:52               ` Steven Rostedt
2009-08-18 15:57           ` KOSAKI Motohiro
2009-08-18 18:58             ` Steven Rostedt
2009-08-19  9:16               ` Zhaolei
2009-08-25  8:12               ` [PATCH 0/3] ftrace: " Zhaolei
2009-08-25  8:12                 ` [PATCH 1/3] ftrace: Move setting of clock-source out of options Zhaolei
2009-08-26  2:35                   ` Steven Rostedt
2009-08-26  7:23                   ` [tip:tracing/core] " tip-bot for Zhaolei
2009-08-25  8:14                 ` [PATCH 2/3] ftrace: add tracepoint for xtime Zhaolei
2009-08-26  2:39                   ` Steven Rostedt
2009-09-01  8:03                     ` Zhaolei
2009-09-16 19:56                   ` john stultz
2009-09-16 19:58                     ` john stultz
2009-09-16 20:32                       ` Steven Rostedt
2009-09-16 20:49                         ` john stultz
2009-09-17  6:34                           ` Zhaolei
2009-08-25  8:15                 ` [PATCH 3/3] ftrace: Add timer-source of walltime for ftrace Zhaolei
2009-08-26  2:52                   ` Steven Rostedt
2009-09-16  5:25                 ` [PATCH v2 0/2] " Zhaolei
2009-09-16  5:27                   ` [PATCH v2 1/2] ftrace: add tracepoint for xtime Zhaolei
2009-09-16 19:33                     ` Steven Rostedt
2009-09-16  5:29                   ` [PATCH v2 2/2] ftrace: Add timer-source of walltime for ftrace Zhaolei
2009-09-16  5:59                     ` Frederic Weisbecker
2009-09-16  6:40                       ` Zhaolei
2009-09-16 19:37                         ` Steven Rostedt [this message]
2009-09-17  7:10                           ` Zhaolei
2009-11-04  9:39                             ` [PATCH v3] ftrace: Add timer-source of walltime Zhaolei
2009-11-04  9:39                             ` Zhaolei
2009-11-04  9:41                             ` Zhaolei
2009-07-28  2:23       ` [PATCH 0/3] Add walltime support for ring-buffer KOSAKI Motohiro
2009-08-03  7:22         ` Ingo Molnar
2009-08-03  9:32           ` KOSAKI Motohiro
2009-08-04 14:38             ` Ingo Molnar

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=1253129843.20020.214.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=fweisbec@gmail.com \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --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®