qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 10/11] trace: document how to specify multiple --trace pattern


From: Paolo Bonzini
Subject: Re: [PULL 10/11] trace: document how to specify multiple --trace patterns
Date: Tue, 2 Feb 2021 14:12:59 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 02/02/21 13:41, Markus Armbruster wrote:
Since trace_opt_parse() deletes, this always creates an empty one.

         const char *file = qemu_opt_get(opts, "file");

This is always null.

     #ifdef CONFIG_TRACE_SIMPLE
         st_set_trace_file(file);
         if (init_trace_on_startup) {
             st_set_trace_file_enabled(true);
         }
     #elif defined CONFIG_TRACE_LOG
         /*
          * If both the simple and the log backends are enabled, "--trace file"
          * only applies to the simple backend; use "-D" for the log
          * backend. However we should only override -D if we actually have
          * something to override it with.
          */
         if (file) {
             qemu_set_log_filename(file, &error_fatal);
         }
     #else
         if (file) {
             fprintf(stderr, "error: --trace file=...: "
                     "option not supported by the selected tracing backends\n");
             exit(1);
         }
     #endif
     }

Bug: option parameter "file" has no effect.  I suspect this was broken
in commit 92eecfff32 "trace: remove argument from trace_init_file",
2020-11-11.

Indeed, and I'll fix it.

Paolo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]