Skip to content

Commit b020771

Browse files
JinzhouSurafaeljw
authored andcommitted
Documentation: amd-pstate: add tracer tool introduction
Add amd pstate tracer tool introduction Signed-off-by: Jinzhou Su <Jinzhou.Su@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 5e32adc commit b020771

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Documentation/admin-guide/pm/amd-pstate.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,32 @@ governor (for the policies it is attached to), or by the ``CPUFreq`` core (for t
369369
policies with other scaling governors).
370370

371371

372+
Tracer Tool
373+
-------------
374+
375+
``amd_pstate_tracer.py`` can record and parse ``amd-pstate`` trace log, then
376+
generate performance plots. This utility can be used to debug and tune the
377+
performance of ``amd-pstate`` driver. The tracer tool needs to import intel
378+
pstate tracer.
379+
380+
Tracer tool located in ``linux/tools/power/x86/amd_pstate_tracer``. It can be
381+
used in two ways. If trace file is available, then directly parse the file
382+
with command ::
383+
384+
./amd_pstate_trace.py [-c cpus] -t <trace_file> -n <test_name>
385+
386+
Or generate trace file with root privilege, then parse and plot with command ::
387+
388+
sudo ./amd_pstate_trace.py [-c cpus] -n <test_name> -i <interval> [-m kbytes]
389+
390+
The test result can be found in ``results/test_name``. Following is the example
391+
about part of the output. ::
392+
393+
common_cpu common_secs common_usecs min_perf des_perf max_perf freq mperf apef tsc load duration_ms sample_num elapsed_time common_comm
394+
CPU_005 712 116384 39 49 166 0.7565 9645075 2214891 38431470 25.1 11.646 469 2.496 kworker/5:0-40
395+
CPU_006 712 116408 39 49 166 0.6769 8950227 1839034 37192089 24.06 11.272 470 2.496 kworker/6:0-1264
396+
397+
372398
Reference
373399
===========
374400

0 commit comments

Comments
 (0)