All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: linux-kernel@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH] trace: Fixup logic inversion on setting trace_global_clock defaults
Date: Wed,  4 Apr 2018 22:24:50 +0100	[thread overview]
Message-ID: <20180404212450.26646-1-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <7D320425-063C-4C54-BAD2-8843ADCD8D6A@goodmis.org>

In commit 932066a15335 ("tracing: Default to using trace_global_clock if
sched_clock is unstable"), the logic for deciding to override the
default clock if unstable was reversed from the earlier posting. I was
trying to reduce the width of the message by using an early return
rather than a if-block, but reverted back to using the if-block and
accidentally left the predicate inverted.

Fixes: 932066a15335 ("tracing: Default to using trace_global_clock if sched_clock is unstable")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 0f47e653ffd8..e18e69183c9a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -8602,7 +8602,7 @@ late_initcall_sync(clear_boot_tracer);
 __init static int tracing_set_default_clock(void)
 {
 	/* sched_clock_stable() is determined in late_initcall */
-	if (trace_boot_clock || sched_clock_stable()) {
+	if (!trace_boot_clock && !sched_clock_stable()) {
 		printk(KERN_WARNING
 		       "Unstable clock detected, switching default tracing clock to \"global\"\n"
 		       "If you want to keep using the local clock, then add:\n"
-- 
2.16.3

WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: linux-kernel@vger.kernel.org
Cc: intel-gfx@lists.freedesktop.org, Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH] trace: Fixup logic inversion on setting trace_global_clock defaults
Date: Wed,  4 Apr 2018 22:24:50 +0100	[thread overview]
Message-ID: <20180404212450.26646-1-chris@chris-wilson.co.uk> (raw)
In-Reply-To: <7D320425-063C-4C54-BAD2-8843ADCD8D6A@goodmis.org>

In commit 932066a15335 ("tracing: Default to using trace_global_clock if
sched_clock is unstable"), the logic for deciding to override the
default clock if unstable was reversed from the earlier posting. I was
trying to reduce the width of the message by using an early return
rather than a if-block, but reverted back to using the if-block and
accidentally left the predicate inverted.

Fixes: 932066a15335 ("tracing: Default to using trace_global_clock if sched_clock is unstable")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 0f47e653ffd8..e18e69183c9a 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -8602,7 +8602,7 @@ late_initcall_sync(clear_boot_tracer);
 __init static int tracing_set_default_clock(void)
 {
 	/* sched_clock_stable() is determined in late_initcall */
-	if (trace_boot_clock || sched_clock_stable()) {
+	if (!trace_boot_clock && !sched_clock_stable()) {
 		printk(KERN_WARNING
 		       "Unstable clock detected, switching default tracing clock to \"global\"\n"
 		       "If you want to keep using the local clock, then add:\n"
-- 
2.16.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-04-04 21:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-30 15:01 [PATCH v2 1/2] trace: Default to using trace_global_clock if sched_clock is unstable Chris Wilson
2018-03-30 15:01 ` Chris Wilson
2018-03-30 15:01 ` [PATCH v2 2/2] trace: Mention trace_clock=global when warning about unstable clocks Chris Wilson
2018-03-30 15:01   ` Chris Wilson
2018-03-30 15:21 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/2] trace: Default to using trace_global_clock if sched_clock is unstable Patchwork
2018-03-30 15:41 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-04-02 15:17 ` [PATCH v2 1/2] " Steven Rostedt
2018-04-02 15:17   ` Steven Rostedt
2018-04-03 12:07   ` Chris Wilson
2018-04-04 20:46 ` Chris Wilson
2018-04-04 20:46   ` Chris Wilson
2018-04-04 20:51 ` [PATCH v3] " Chris Wilson
2018-04-04 20:51   ` Chris Wilson
2018-04-04 20:56   ` Steven Rostedt
2018-04-04 20:56     ` Steven Rostedt
2018-04-04 21:24     ` Chris Wilson [this message]
2018-04-04 21:24       ` [PATCH] trace: Fixup logic inversion on setting trace_global_clock defaults Chris Wilson
2018-04-05 11:48       ` Steven Rostedt
2018-04-05 11:48         ` Steven Rostedt
2018-04-04 21:59 ` ✗ Fi.CI.BAT: failure for series starting with trace: Fixup logic inversion on setting trace_global_clock defaults (rev3) Patchwork

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=20180404212450.26646-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --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.