From: Jiri Olsa <jolsa@redhat.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: linux-kernel@vger.kernel.org, Namhyung Kim <namhyung@kernel.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung.kim@lge.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH 03/17] tools lib traceevent: Do not call warning() directly
Date: Mon, 14 Apr 2014 16:17:27 +0200 [thread overview]
Message-ID: <1397485061-17215-4-git-send-email-jolsa@redhat.com> (raw)
In-Reply-To: <1397485061-17215-1-git-send-email-jolsa@redhat.com>
From: Namhyung Kim <namhyung@kernel.org>
The patch 3a3ffa2e82205 ("tools lib traceevent: Report better error
message on bad function args") added the error message but it seems
there's no reason to call warning() directly.
So change it to do_warning_event() to provide event information too.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/1395192174-26273-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
---
tools/lib/traceevent/event-parse.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 33803c0b9..baec7d8 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -2742,14 +2742,16 @@ process_func_handler(struct event_format *event, struct pevent_function_handler
type = process_arg(event, farg, &token);
if (i < (func->nr_args - 1)) {
if (type != EVENT_DELIM || strcmp(token, ",") != 0) {
- warning("Error: function '%s()' expects %d arguments but event %s only uses %d",
+ do_warning_event(event,
+ "Error: function '%s()' expects %d arguments but event %s only uses %d",
func->name, func->nr_args,
event->name, i + 1);
goto err;
}
} else {
if (type != EVENT_DELIM || strcmp(token, ")") != 0) {
- warning("Error: function '%s()' only expects %d arguments but event %s has more",
+ do_warning_event(event,
+ "Error: function '%s()' only expects %d arguments but event %s has more",
func->name, func->nr_args, event->name);
goto err;
}
--
1.8.3.1
next prev parent reply other threads:[~2014-04-14 14:18 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 14:17 [GIT PULL v3 00/17] perf/core fixes Jiri Olsa
2014-04-14 14:17 ` [PATCH 01/17] perf top: Fix documentation of invalid -s option Jiri Olsa
2014-04-14 14:17 ` [PATCH 02/17] tools lib traceevent: Print event name when show warning if possible Jiri Olsa
2014-04-14 14:17 ` Jiri Olsa [this message]
2014-04-14 14:17 ` [PATCH 04/17] perf callchains: Disable unwind libraries when libelf isn't found Jiri Olsa
2014-04-14 14:17 ` [PATCH 05/17] MAINTAINERS: Change e-mail to kernel.org one Jiri Olsa
2014-04-14 14:17 ` [PATCH 06/17] perf tools: Pick up libdw without explicit LIBDW_DIR Jiri Olsa
2014-04-14 14:17 ` [PATCH 07/17] perf probe: Fix --line option behavior Jiri Olsa
2014-04-14 14:17 ` [PATCH 08/17] perf probe: Fix to handle errors in line_range searching Jiri Olsa
2014-04-14 14:17 ` [PATCH 09/17] perf probe: Use dwarf_getcfi_elf() instead of dwarf_getcfi() Jiri Olsa
2014-04-14 14:17 ` [PATCH 10/17] perf bench: Update manpage to mention numa and futex Jiri Olsa
2014-04-14 14:17 ` [PATCH 11/17] perf bench: Fix segfault at the end of an 'all' execution Jiri Olsa
2014-04-14 14:17 ` [PATCH 12/17] perf bench: Set more defaults in the 'numa' suite Jiri Olsa
2014-04-14 14:17 ` [PATCH 13/17] perf stat: Initialize statistics correctly Jiri Olsa
2014-04-14 14:17 ` [PATCH 14/17] perf tools: Fix metrics calculation with event qualifiers Jiri Olsa
2014-04-14 14:38 ` Ingo Molnar
2014-04-14 14:17 ` [PATCH 15/17] perf tools: Fix double free in perf test 21 (code-reading.c) Jiri Olsa
2014-04-14 14:17 ` [PATCH 16/17] perf machine: Search for modules in %s/lib/modules/%s Jiri Olsa
2014-04-14 14:17 ` [PATCH 17/17] perf tools: Instead of redirecting flex output, use -o Jiri Olsa
2014-04-14 14:42 ` [GIT PULL v3 00/17] perf/core fixes Ingo Molnar
2014-04-14 14:52 ` Jiri Olsa
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=1397485061-17215-4-git-send-email-jolsa@redhat.com \
--to=jolsa@redhat.com \
--cc=a.p.zijlstra@chello.nl \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox