diff --git a/Makefile.objs b/Makefile.objs index 036a4eb6ab..26b885bfeb 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -384,6 +384,8 @@ trace-nested-$(CONFIG_TRACE_DEFAULT) += default.o trace-nested-$(CONFIG_TRACE_SIMPLE) += simple.o trace-obj-$(CONFIG_TRACE_SIMPLE) += qemu-timer-common.o +trace-nested-$(CONFIG_TRACE_STDERR) += stderr.o + trace-nested-y += control.o trace-obj-y += $(addprefix trace/, $(trace-nested-y)) diff --git a/configure b/configure index 4f9b27ced4..300d34bd32 100755 --- a/configure +++ b/configure @@ -3078,6 +3078,7 @@ if test "$trace_backend" = "simple"; then fi if test "$trace_backend" = "stderr"; then echo "CONFIG_TRACE_STDERR=y" >> $config_host_mak + trace_default=no fi if test "$trace_backend" = "ust"; then echo "CONFIG_TRACE_UST=y" >> $config_host_mak diff --git a/docs/tracing.txt b/docs/tracing.txt index d1d4e8cba2..4b27ab0c2a 100644 --- a/docs/tracing.txt +++ b/docs/tracing.txt @@ -178,11 +178,6 @@ effectively turns trace events into debug printfs. This is the simplest backend and can be used together with existing code that uses DPRINTF(). -Note that with this backend trace events cannot be programmatically -enabled/disabled. Thus, in order to trim down the amount of output and the -performance impact of tracing, you might want to add the "disable" property in -the "trace-events" file for those events you are not interested in. - === Simpletrace === The "simple" backend supports common use cases and comes as part of the QEMU diff --git a/qemu-options.hx b/qemu-options.hx index edd181bb8e..f672365e42 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2454,7 +2454,8 @@ Immediately enable events listed in @var{file}. The file must contain one event name (as listed in the @var{trace-events} file) per line. -This option is only available when using the @var{simple} tracing backend. +This option is only available when using the @var{simple} and @var{stderr} +tracing backends. @item file=@var{file} Log output traces to @var{file}. diff --git a/scripts/tracetool b/scripts/tracetool index c740080ebb..743d246289 100755 --- a/scripts/tracetool +++ b/scripts/tracetool @@ -241,7 +241,12 @@ linetoh_begin_stderr() { cat < +#include "trace/stderr.h" + +extern TraceEvent trace_list[]; EOF + + stderr_event_num=0 } linetoh_stderr() @@ -260,29 +265,47 @@ linetoh_stderr() cat <