summaryrefslogtreecommitdiffstats
path: root/tools/power/x86/intel_pstate_tracer/intel_pstate_tracer.py
AgeCommit message (Collapse)AuthorFilesLines
2022-03-09tools/power/x86/intel_pstate_tracer: make tracer as a moduleJinzhou Su1-131/+129
Make intel_pstate_tracer as a module. Other trace event can import this module to analyze their trace data. Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com> Acked-by: Doug Smythies <dsmythies@telus.net> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-12-08tweewide: Fix most Shebang linesFinn Behrens1-1/+1
Change every shebang which does not need an argument to use /usr/bin/env. This is needed as not every distro has everything under /usr/bin, sometimes not even bash. Signed-off-by: Finn Behrens <me@kloenk.de> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-03-26tools/power/x86/intel_pstate_tracer: fix a broken y-axis scaleDoug Smythies1-1/+0
A fixed y-axis scale was missed during a change to autoscale. Correct it. Fixes: 709bd70d070ee ("tools/power/x86/intel_pstate_tracer: change several graphs to autoscale y-axis") Signed-off-by: Doug Smythies <dsmythies@telus.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-01-28tools/power/x86/intel_pstate_tracer: change several graphs to autoscale y-axisDoug Smythies1-9/+7
Processors have exceeded some of the fixed y-axis scale maximum values. Change them to autoscale the y-axis. Signed-off-by: Doug Smythies <dsmythies@telus.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-01-28tools/power/x86/intel_pstate_tracer: changes for python 3 compatibilityDoug Smythies1-11/+11
Some syntax needs to be more rigorous for python 3. Backwards compatibility tested with python 2.7 Signed-off-by: Doug Smythies <dsmythies@telus.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-06-19treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 466Thomas Gleixner1-0/+1
Based on 1 normalized pattern(s): license__ = gpl version 2 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to add the SPDX identifier to this file. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Enrico Weigelt <info@metux.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190604081202.640009675@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-18tools/power/x86/intel_pstate_tracer: Fix non root execution for post ↵Doug Smythies1-2/+2
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>
2018-05-17tools/power/x86/intel_pstate_tracer: Add optional setting of trace buffer ↵Doug Smythies1-19/+35
memory allocation Allow the user to override the default trace buffer memory allocation by adding a command line option to override the default. The patch also: Adds a SIGINT (i.e. CTRL C exit) handler, so that things can be cleaned up before exit. Moves the postion of some other cleanup from after to before the potential "No valid data to plot" exit. Replaces all quit() calls with sys.exit, because quit() is not supposed to be used in scripts. Signed-off-by: Doug Smythies <dsmythies@telus.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-01-10tools/power/x86/intel_pstate_tracer: Free the trace buffer memoryDoug Smythies1-0/+15
The trace buffer memory should be, mostly, freed after the buffer has been output. This patch is required before a future patch that will allow the user to override the default, and specify the trace buffer memory allocation as a command line option. Signed-off-by: Doug Smythies <dsmythies@telus.net> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-04-19tools/power/x86/intel_pstate_tracer: Adjust directory ownershipDoug Smythies1-0/+17
The intel_pstate_tracer.py script only needs to be run as root when it is also used to actually acquire the trace data that it will post process. Otherwise it is generally preferable that it be run as a regular user. If run the first time as root the results directory will be incorrect for any subsequent run as a regular user. For any run as root the specific testname subdirectory will not allow any subsequent file saves by a regular user. Typically, and for example, the regular user might be attempting to save a .csv file converted to a spreadsheet with added calculations or graphs. Set the directories and files owner and groups IDs to be the regular user, if required. Signed-off-by: Doug Smythies <dsmythies@telus.net> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-02-16tools/power/x86: Debug utility for intel_pstate driverDoug Smythies1-0/+569
This utility can be used to debug and tune the performance of the intel_pstate driver. This utility can be used in two ways: - If there is Linux trace file with pstate_sample events enabled, then this utility can parse the trace file and generate performance plots. - If user has not specified a trace file as input via command line parameters, then this utility enables and collects trace data for a user-specified interval and generates performance plots. Signed-off-by: Doug Smythies <dsmythies@telus.net> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>