From: Avi Kivity <avi@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-trace-users@vger.kernel.org
Subject: [PATCH] Don't spam trace report about missing fields
Date: Mon, 29 Nov 2010 18:20:01 +0200 [thread overview]
Message-ID: <1291047601-13879-1-git-send-email-avi@redhat.com> (raw)
Instead of spamming the output with complaints about missing fields, simply
return an error to the caller, which can print something out or do something
more intelligent about them.
Fixes kvm plugin tracing older kernels.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
parse-events.c | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/parse-events.c b/parse-events.c
index f0b0324..7a4c3a6 100644
--- a/parse-events.c
+++ b/parse-events.c
@@ -4446,17 +4446,11 @@ int get_field_val(struct trace_seq *s, struct format_field *field,
const char *name, struct record *record,
unsigned long long *val, int err)
{
- if (!field) {
- if (err)
- trace_seq_printf(s, "<CANT FIND FIELD %s>", name);
+ if (!field)
return -1;
- }
- if (pevent_read_number_field(field, record->data, val)) {
- if (err)
- trace_seq_printf(s, " %s=INVALID", name);
+ if (pevent_read_number_field(field, record->data, val))
return -1;
- }
return 0;
}
@@ -4489,11 +4483,8 @@ void *pevent_get_field_raw(struct trace_seq *s, struct event_format *event,
field = pevent_find_field(event, name);
- if (!field) {
- if (err)
- trace_seq_printf(s, "<CANT FIND FIELD %s>", name);
+ if (!field)
return NULL;
- }
/* Allow @len to be NULL */
if (!len)
--
1.7.1
next reply other threads:[~2010-11-29 16:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-29 16:20 Avi Kivity [this message]
2010-11-29 16:26 ` [PATCH] Don't spam trace report about missing fields Steven Rostedt
2010-11-29 17:22 ` Avi Kivity
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=1291047601-13879-1-git-send-email-avi@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-users@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.