[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 1/4] trace: added ability to comment out events in t
From: |
Stefan Hajnoczi |
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 |
From: Alexey Kardashevskiy <address@hidden>
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 <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
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
- [Qemu-devel] [PULL 0/4] Tracing patches, Stefan Hajnoczi, 2012/07/19
- [Qemu-devel] [PATCH 4/4] Update simpletrace.py for new log format, Stefan Hajnoczi, 2012/07/19
- [Qemu-devel] [PATCH 2/4] monitor: remove unused do_info_trace, Stefan Hajnoczi, 2012/07/19
- [Qemu-devel] [PATCH 1/4] trace: added ability to comment out events in the list,
Stefan Hajnoczi <=
- [Qemu-devel] [PATCH 3/4] Simpletrace v2: Support multiple arguments, strings., Stefan Hajnoczi, 2012/07/19
- Re: [Qemu-devel] [PULL 0/4] Tracing patches, Harsh Bora, 2012/07/19