Message ID | 4FD96B84.6080907@ozlabs.ru |
---|---|
State | New, archived |
Headers | show |
On Thu, Jun 14, 2012 at 02:41:40PM +1000, Alexey Kardashevskiy wrote: > 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> > --- > 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 -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 14/06/12 23:18, Stefan Hajnoczi wrote: > On Thu, Jun 14, 2012 at 02:41:40PM +1000, Alexey Kardashevskiy wrote: >> 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> >> --- >> 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 :)
On Fri, Jun 15, 2012 at 5:36 AM, Alexey Kardashevskiy <aik@ozlabs.ru> wrote: > On 14/06/12 23:18, Stefan Hajnoczi wrote: >> On Thu, Jun 14, 2012 at 02:41:40PM +1000, Alexey Kardashevskiy wrote: >>> 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> >>> --- >>> 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 :) I just pushed the 'tracing' branch, sorry for the delay! Stefan -- To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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);
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> --- trace/control.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)