aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2017-02-16 11:50:38 -0500
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2017-04-26 10:49:42 -0400
commite0a5f0a59d0f4fe26cbfd3a05f8f45baab7cec3a (patch)
tree0019cf9d06e0e2894de8d9d6e56f209f3463aeb7
parentee713313d7e14097626e72e6c0241bebc9210e80 (diff)
downloadtrace-cmd-e0a5f0a59d0f4fe26cbfd3a05f8f45baab7cec3a.tar.gz
trace-cmd: Do not initialize profiler if it isn't being used
The profiler requires scheduler tracepoints enabled, and will bug out if they are not. The profiler initialization will error without these tracepoints defined. There's no reason to initialize the profiler on reading a trace.dat file especially since it could cause that reading to fail if the profiler required tracepoints are not there. Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r--trace-read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/trace-read.c b/trace-read.c
index 48a603ca..c8a5b59d 100644
--- a/trace-read.c
+++ b/trace-read.c
@@ -1177,7 +1177,8 @@ static void read_data_info(struct list_head *handle_list, enum output_type otype
last_hook->next = tracecmd_hooks(handles->handle);
else
hooks = tracecmd_hooks(handles->handle);
- trace_init_profile(handles->handle, hooks, global);
+ if (profile)
+ trace_init_profile(handles->handle, hooks, global);
process_filters(handles);