From: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
qemu-devel@nongnu.org,
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 1/4] trace: added ability to comment out events in the list
Date: Thu, 19 Jul 2012 11:52:50 +0100 [thread overview]
Message-ID: <1342695173-32010-2-git-send-email-stefanha@linux.vnet.ibm.com> (raw)
In-Reply-To: <1342695173-32010-1-git-send-email-stefanha@linux.vnet.ibm.com>
From: Alexey Kardashevskiy <aik@ozlabs.ru>
It is convenient for debug to be able to switch on/off some events easily.
The only possibility now is to remove event name from the file completely
and type it again when we want it back.
The patch adds '#' symbol handling as a comment specifier.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
---
trace/control.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/trace/control.c b/trace/control.c
index 4c5527d..22d5863 100644
--- a/trace/control.c
+++ b/trace/control.c
@@ -27,6 +27,9 @@ void trace_backend_init_events(const char *fname)
size_t len = strlen(line_buf);
if (len > 1) { /* skip empty lines */
line_buf[len - 1] = '\0';
+ if ('#' == line_buf[0]) { /* skip commented lines */
+ continue;
+ }
if (!trace_event_set_state(line_buf, true)) {
fprintf(stderr,
"error: trace event '%s' does not exist\n", line_buf);
--
1.7.10.4
next prev parent reply other threads:[~2012-07-19 10:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-19 10:52 [Qemu-devel] [PULL 0/4] Tracing patches Stefan Hajnoczi
2012-07-19 10:52 ` Stefan Hajnoczi [this message]
2012-07-19 10:52 ` [Qemu-devel] [PATCH 2/4] monitor: remove unused do_info_trace Stefan Hajnoczi
2012-07-19 10:52 ` [Qemu-devel] [PATCH 3/4] Simpletrace v2: Support multiple arguments, strings Stefan Hajnoczi
2012-07-19 10:52 ` [Qemu-devel] [PATCH 4/4] Update simpletrace.py for new log format Stefan Hajnoczi
2012-07-19 11:52 ` [Qemu-devel] [PULL 0/4] Tracing patches Harsh Bora
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=1342695173-32010-2-git-send-email-stefanha@linux.vnet.ibm.com \
--to=stefanha@linux.vnet.ibm.com \
--cc=aik@ozlabs.ru \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).