mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Namhyung Kim <namhyung.kim@lge.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	rostedt@goodmis.org, namhyung.kim@lge.com, tglx@linutronix.de,
	namhyung@kernel.org
Subject: [tip:perf/core] tracing: Use sched_clock_cpu for trace_clock_global
Date: Sun, 3 Feb 2013 11:22:41 -0800	[thread overview]
Message-ID: <tip-5e67b51e3fb22ad43faf9589e9019ad9c6a00413@git.kernel.org> (raw)
In-Reply-To: <1356576585-28782-2-git-send-email-namhyung@kernel.org>

Commit-ID:  5e67b51e3fb22ad43faf9589e9019ad9c6a00413
Gitweb:     http://git.kernel.org/tip/5e67b51e3fb22ad43faf9589e9019ad9c6a00413
Author:     Namhyung Kim <namhyung.kim@lge.com>
AuthorDate: Thu, 27 Dec 2012 11:49:45 +0900
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Wed, 30 Jan 2013 11:02:05 -0500

tracing: Use sched_clock_cpu for trace_clock_global

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:

  parent reply	other threads:[~2013-02-03 19:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-27  2:49 [PATCH 1/2] watchdog: Use local_clock for get_timestamp() Namhyung Kim
2012-12-27  2:49 ` [PATCH 2/2] tracing: Use sched_clock_cpu for trace_clock_global Namhyung Kim
2012-12-27  9:52   ` Namhyung Kim
2013-01-07 13:54     ` Steven Rostedt
2013-02-03 19:22   ` tip-bot for Namhyung Kim [this message]
2013-01-02 20:09 ` [PATCH 1/2] watchdog: Use local_clock for get_timestamp() Don Zickus
2013-01-24 20:20 ` [tip:core/locking] " tip-bot for Namhyung Kim
2013-02-22 12:23 ` tip-bot for Namhyung Kim

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=tip-5e67b51e3fb22ad43faf9589e9019ad9c6a00413@git.kernel.org \
    --to=namhyung.kim@lge.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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