From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Namhyung Kim <namhyung@kernel.org>
Subject: [PATCH 07/11] tracing: Use sched_clock_cpu for trace_clock_global
Date: Sat, 02 Feb 2013 09:18:49 -0500 [thread overview]
Message-ID: <20130202141955.909958480@goodmis.org> (raw)
In-Reply-To: <20130202141842.189550803@goodmis.org>
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
From: Namhyung Kim <namhyung.kim@lge.com>
For systems with an unstable sched_clock, all cpu_clock() does is enable/
disable local irq during the call to sched_clock_cpu(). And for stable
systems they are same.
trace_clock_global() already disables interrupts, so it can call
sched_clock_cpu() directly.
Link: http://lkml.kernel.org/r/1356576585-28782-2-git-send-email-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/trace/trace_clock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/trace_clock.c b/kernel/trace/trace_clock.c
index 22b638b..24bf48e 100644
--- a/kernel/trace/trace_clock.c
+++ b/kernel/trace/trace_clock.c
@@ -84,7 +84,7 @@ u64 notrace trace_clock_global(void)
local_irq_save(flags);
this_cpu = raw_smp_processor_id();
- now = cpu_clock(this_cpu);
+ now = sched_clock_cpu(this_cpu);
/*
* If in an NMI context then dont risk lockups and return the
* cpu_clock() time:
--
1.7.10.4
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
next prev parent reply other threads:[~2013-02-02 14:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-02 14:18 [PATCH 00/11] [GIT PULL] tracing: Various tracing fixes and enhancements Steven Rostedt
2013-02-02 14:18 ` [PATCH 01/11] tracing: Mark tracing_dentry_percpu() static Steven Rostedt
2013-02-02 14:18 ` [PATCH 02/11] tracing: Remove tracepoint sample code Steven Rostedt
2013-02-02 14:18 ` [PATCH 03/11] tracing: Use __this_cpu_inc/dec operation instead of __get_cpu_var Steven Rostedt
2013-02-02 14:18 ` [PATCH 04/11] tracing: Remove second iterator initializer Steven Rostedt
2013-02-02 14:18 ` [PATCH 05/11] tracing/fgraph: Adjust fgraph depth before calling trace return callback Steven Rostedt
2013-02-02 14:18 ` [PATCH 06/11] ring-buffer: Add stats field for amount read from trace ring buffer Steven Rostedt
2013-02-02 14:18 ` Steven Rostedt [this message]
2013-02-02 14:18 ` [PATCH 08/11] tracing: Replace static old_tracer check of tracer name Steven Rostedt
2013-02-02 14:18 ` [PATCH 09/11] tracing: Make a snapshot feature available from userspace Steven Rostedt
2013-02-02 14:18 ` [PATCH 10/11] tracing: Add documentation of snapshot utility Steven Rostedt
2013-02-02 14:18 ` [PATCH 11/11] tracing: Init current_trace to nop_trace and remove NULL checks Steven Rostedt
2013-02-03 10:15 ` [PATCH 00/11] [GIT PULL] tracing: Various tracing fixes and enhancements 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=20130202141955.909958480@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome