mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Vagin <avagin@openvz.org>
To: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Ingo Molnar <mingo@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	avagin@openvz.org, devel@openvz.org
Subject: [PATCH] event: fix TP_printk() argument in sched_switch
Date: Thu,  3 Nov 2011 01:40:11 +0300	[thread overview]
Message-ID: <1320273611-2463347-1-git-send-email-avagin@openvz.org> (raw)

process_arg(...) can't parse "__entry->prev_state & (TASK_STATE_MAX-1)",
because a complicated argument should be within brackets.

Without this patch "perf report" prints following errors:
$ ./perf record -ag -e sched:sched_switch
...
$ ./perf report
  Warning: Error: expected type 5 but read 4
  Warning: Error: expected type 4 but read 0
  Fatal: bad op token {

Signed-off-by: Andrew Vagin <avagin@openvz.org>
---
 include/trace/events/sched.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
index 959ff18..1838237 100644
--- a/include/trace/events/sched.h
+++ b/include/trace/events/sched.h
@@ -140,7 +140,7 @@ TRACE_EVENT(sched_switch,
 	TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d",
 		__entry->prev_comm, __entry->prev_pid, __entry->prev_prio,
 		__entry->prev_state & (TASK_STATE_MAX-1) ?
-		  __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|",
+		  __print_flags((__entry->prev_state & (TASK_STATE_MAX-1)), "|",
 				{ 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" },
 				{ 16, "Z" }, { 32, "X" }, { 64, "x" },
 				{ 128, "W" }) : "R",
-- 
1.7.1


             reply	other threads:[~2011-11-02 22:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-02 22:40 Andrew Vagin [this message]
2011-11-02 23:07 ` Steven Rostedt
2011-11-02 23:23   ` David Ahern
2011-11-03  0:13     ` Steven Rostedt
2011-11-03 12:57   ` Andrew Vagin
2011-11-03 14:01     ` David Ahern
2011-11-03 14:11       ` Steven Rostedt
2011-11-03 14:02     ` Steven Rostedt
2011-11-03 14:15     ` Steven Rostedt
2011-11-03 14:19   ` Steven Rostedt
2011-11-03 21:36     ` avagin

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=1320273611-2463347-1-git-send-email-avagin@openvz.org \
    --to=avagin@openvz.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=devel@openvz.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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 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®