Skip to content

Commit

Permalink
tools/power/x86/intel_pstate_tracer: Fix non root execution for post …
Browse files Browse the repository at this point in the history
…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 fbe3138 (tools/power/x86/intel_pstate_tracer: Free the
trace buffer memory) introduced a bug that breaks that option.

Commit 3545910 (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: 3545910 (tools/power/x86/intel_pstate_tracer: Add optional ...)
Signed-off-by: Doug Smythies <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
Doug Smythies authored and rafaeljw committed Dec 18, 2018
1 parent 67e4eb3 commit 6635469
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,9 @@ def signal_handler(signal, frame):

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:
Expand Down

0 comments on commit 6635469

Please sign in to comment.