trace: added ability to comment out events in the list
PATCH 1/1 trace: added ability to comment out events in the list
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.
--- trace/control.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
trace/control.c +3 -0
@@ -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);
Signature · 1 line
1.7.7.3
Stefan Hajnoczi
AppliedQuoted 10 lines · Alexey Kardashevskiy
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 <[email protected]>--- trace/control.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
Thanks, applied to the tracing patches tree:
https://github.com/stefanha/qemu/commits/tracing
Stefan
Quoted 7 lines · Stefan Hajnoczi
Quoted 6 lines · Alexey Kardashevskiy
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.
Quoted 7 lines
Quoted 4 lines
Signed-off-by Alexey Kardashevskiy <[email protected]>--- trace/control.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)Thanks, applied to the tracing patches tree:
https://github.com/stefanha/qemu/commits/tracing
Cannot find it there though :)
Signature · 1 line
Alexey
Quoted 13 lines · Alexey Kardashevskiy
Quoted 12 lines · Stefan Hajnoczi
Quoted 10 lines · Alexey Kardashevskiy
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 <[email protected]>---
trace/control.c | 3 +++1 files changed, 3 insertions(+), 0 deletions(-)
Quoted 4 lines
Quoted 2 lines
Thanks, applied to the tracing patches tree:
https://github.com/stefanha/qemu/commits/tracingCannot find it there though :)
I just pushed the 'tracing' branch, sorry for the delay!
Stefan