Skip to content

Commit

Permalink
trace/simple: Allow enabling simple traces from command line
Browse files Browse the repository at this point in the history
The simple trace backend is enabled / disabled with a call
to st_set_trace_file_enabled().  When initializing tracing
from the command-line, this must be enabled on startup.
(Prior to db25d56, command-line initialization of
simple trace worked because every call to st_set_trace_file
enabled tracing.)

Fixes: db25d56
Signed-off-by: Josh DuBois <josh@joshdubois.com>
Message-id: 20200723053359.256928-1-josh@joshdubois.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
Josh DuBois authored and stefanhaRH committed Jul 29, 2020
1 parent 5772f2b commit 1b7157b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions trace/control.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ void trace_init_file(const char *file)
{
#ifdef CONFIG_TRACE_SIMPLE
st_set_trace_file(file);
st_set_trace_file_enabled(true);
#elif defined CONFIG_TRACE_LOG
/*
* If both the simple and the log backends are enabled, "--trace file"
Expand Down

0 comments on commit 1b7157b

Please sign in to comment.