summaryrefslogtreecommitdiff
path: root/tools/power/x86/intel_pstate_tracer
diff options
context:
space:
mode:
authorDoug Smythies <doug.smythies@gmail.com>2018-12-17 23:34:04 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-12-18 10:44:17 +0100
commit663546903c835fe46308b1b1e53d32d1f2b33da9 (patch)
tree12f712830c4ca777ae7568164de2cee18ba9391c /tools/power/x86/intel_pstate_tracer
parent67e4eb30ea833e1a97f70e3aba00c6b165fd298c (diff)
tools/power/x86/intel_pstate_tracer: Fix non root execution for post processing a trace file
This script is supposed to be allowed to run with regular user privileges if a previously captured trace is being post processed. Commit fbe313884d7d (tools/power/x86/intel_pstate_tracer: Free the trace buffer memory) introduced a bug that breaks that option. Commit 35459105deb2 (tools/power/x86/intel_pstate_tracer: Add optional setting of trace buffer memory allocation) moved the code but kept the bug. This patch fixes the issue. Fixes: 35459105deb2 (tools/power/x86/intel_pstate_tracer: Add optional ...) Signed-off-by: Doug Smythies <dsmythies@telus.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power/x86/intel_pstate_tracer')
-rwxr-xr-xtools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
index 84e2b648e622..2fa3c5757bcb 100755
--- a/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
+++ b/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
@@ -585,9 +585,9 @@ current_max_cpu = 0
read_trace_data(filename)
-clear_trace_file()
-# Free the memory
if interval:
+ clear_trace_file()
+ # Free the memory
free_trace_buffer()
if graph_data_present == False: