From: Zhaolei <zhaolei@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 0/3] Add walltime support for ring-buffer
Date: Fri, 24 Jul 2009 18:40:16 +0800 [thread overview]
Message-ID: <4A698F90.90501@cn.fujitsu.com> (raw)
Hello, Steven
It is a prototype code to make ftrace display walltime of events.
It need to applys on my patch of:
[PATCH v3 1/2] Add function to convert between calendar time and broken-down time for universal use
This code can run but need to be fixed, it only for demostrate what is result
looks like.
I think display walltime is valuable for ftrace, it can provide more
recognizable information to system manager that he can known "when"
event happened.
And it is also helpful for flight-recorder we are doing now, we can get
walltime of events after panic for analyse.
We can get following result on this patch:
# cd /mnt/debugfs/tracing/
# echo sched_switch > current_tracer
# cat trace
# tracer: sched_switch
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |
bash-2457 [000] 214.895446: 2457:120:S + [000] 2457:120:S bash
bash-2457 [000] 214.898298: 2457:120:R + [000] 5:115:S events/0
bash-2457 [000] 214.898684: 2457:120:R ==> [000] 5:115:R events/0
events/0-5 [000] 214.899458: 5:115:R + [000] 2455:120:S sshd
events/0-5 [000] 214.899495: 5:115:S ==> [000] 2455:120:R sshd
...
# echo 1 > options/walltime
# cat trace
# tracer: sched_switch
#
# TASK-PID CPU# TIMESTAMP FUNCTION
# | | | | |
<idle>-0 [000] 2009-07-25 18:01:00.848468: 0:140:R ==> [000] 5:115:R events/0
events/0-5 [000] 2009-07-25 18:01:00.848523: 5:115:S ==> [000] 0:140:R <idle>
<idle>-0 [000] 2009-07-25 18:01:01.613479: 0:140:R + [000] 2455:120:S sshd
<idle>-0 [000] 2009-07-25 18:01:01.613678: 0:140:R ==> [000] 2455:120:R sshd
sshd-2455 [000] 2009-07-25 18:01:01.614015: 2455:120:S + [000] 2455:120:S sshd
...
This patch is prototype because we have following things to do:
1: function to get walltime is not near rb_time_stamp()
So walltime is not absolutely synchronize with trace time.
But if we place code to get walltime near rb_time_stamp(), it will be called
on every reserve-event and will make system slow.
2: We can't call getnstimeofday() freely in ring-buffer's code, because
it is possibility already hold xtime_lock. Prototype code used a ugly way
to get gid of this problem, maybe we need to ftrace_disable_cpu() before
every write_seqlock() instead.
3: People maybe change walltime when tracing, but current ring-buffer page's
walltime can not reflect this change. We need to add tracepoints to watch
this change, and add a walltime-change event(already reserved in
ring-buffer.c) to record this change.
I'll continue to finish remain steps, what is your opinion on it?
Thanks
Zhaolei
next reply other threads:[~2009-07-24 10:37 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-24 10:40 Zhaolei [this message]
2009-07-24 10:42 ` [PATCH] Add walltime support for ring-buffer 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
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=4A698F90.90501@cn.fujitsu.com \
--to=zhaolei@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.