Skip to the content.

Open Power/Performance Analysis Tool (OPPAT)

Table of Contents


Introduction

Open Power/Performance Analysis Tool (OPPAT) is a cross-OS, cross-architecture Power and Performance Analysis Tool.

The project web page is https://patinnc.github.io

The source code repo is https://github.com/patinnc/oppat

I’ve added an Operating system (OS_view) to the CPU block diagram feature. This based on Brendan Gregg’s pages such as http://www.brendangregg.com/linuxperf.html. Here is some example data for running an old version of Geekbench v2.4.2 (32bit code) on ARM 64bit Ubuntu Mate v18.04.2 Raspberry PI 3 b+, 4 ARM cortex A53 CPUs:

Here is some example data for running my spin benchmark (memory/cache bandwidth tests, a ‘spin’ keep-cpu-busy test) on Raspberry Pi 3 B+ (Cortex A53) CPUs:

Here is some example data for running Geekbench on Haswell CPUs:

Here is some data for running my ‘spin’ benchmark with 4 sub-tests on Haswell CPUs:

The Intel Haswell with CPU diagram data collections are for a 4-CPU Intel chip, linux OS, html file with 50+ hw events via perf sampling and other data collected. Cpu_diagram features:

Currently I only have cpu_diagram movies for Haswell and ARM A53 (since I don’t have other systems to test on) but it shouldn’t be hard to add other block diagrams. You still get all the charts but not the cpu_diagram.

Below is one of the OPPAT charts. The ‘cpu_busy’ chart shows what is running on each CPU and the events that happen on each cpu. For example, the green circle shows a spin.x thread running on CPU 1. The red circle shows some of the events occurring on CPU1. This chart is modeled after trace-cmd’s kernelshark chart. More info on the cpu_busy chart is in chart-types section. The callout box shows the event data (including callstack (if any)) for the event under the cursor. Unfortunately windows screenshot doesn’t capture the cursor. a screen shot of the cpu busy chart

Here are some sample html files. Most of the files are for a shorter ~2 interval but some are ‘full’ 8 second runs. The files won’t load directly from the repo but they will load from the project web page: https://patinnc.github.io

Some of the above files are ~2 second intervals extracted from ~8 second long runs. Here is the full 8 second run:


OPPAT data supported


OPPAT visualization

Here are some full sample visualzation html files: windows sample html file or this Linux sample html file. If you are on the repo (not the github.io project website) you will have to download the file and then load it into your browser. These are standalone web files created by OPPAT which could be, for example, emailed to others or (as here) posted on a web server.

OPPAT viz works better in Chrome than Firefox primarily because the zoom using touchpad 2 finger scrolling works better on Chrome.

OPPAT has 3 visualization modes:

  1. The usual chart mechanism (where OPPAT backend reads the data files and sends data to the browser)
  2. You can also create a standalone web page which is the equivalent of the ‘regular chart mechanism’ but can be exchanged with other users… the standalone web page has the all the scripts and data built-in so it could be emailed to someone and they could load it in their browser. See the html files in sample_html_files referenced above and (for a longer version of lnx_mem_bw4) see the compressed file sample_html_files/lnx_mem_bw4_full.html
  3. You can ‘–save ‘ a data json file and then –load the file later. The saved json file has is the data which OPPAT needs to send to the browser. This avoids re-reading the input perf/xperf files but it won’t pick up any changes made in charts.json. The full HTML file created with the –web_file option is only slightly bigger than the –save file. The –save/–load mode requires building oppat. See the sample ‘saved’ files in sample_data_json_files subdir.

Viz general info

chart features:

chart types:


Data collection for OPPAT

Collecting the performance and power data is very ‘situational’. One person will want to run scripts, another will want to start measurements with a button, then start a video and then end the collection with the press of a button. I have a script for Windows and a script for Linux which demonstrates:

The steps for data collection using the scripts:


PCM data support


Building OPPAT


Running OPPAT


Derived Events

‘Derived events’ are new events created from 1 or more events in a data file.


Using the browser GUI Interface

TBD


Defining events and charts in charts.json

TBD


Rules for input_data_files.json

{"root_dir":"/data/ppat/"},
{"cur_dir":"%root_dir%/oppat_data/lnx/mem_bw4"},
{"cur_tag":"lnx_mem_bw4"},
{"bin_file":"prf_energy.txt", "txt_file":"prf_energy2.txt", "wait_file":"wait.txt", "tag":"%cur_tag%", "type":"LUA"},
{"bin_file":"prf_trace.data", "txt_file":"prf_trace.txt", "tag":"%cur_tag%", "type":"PERF"},
{"bin_file":"tc_trace.dat",  "txt_file":"tc_trace.txt", "tag":"%cur_tag%", "type":"TRACE_CMD"},

Limitations

sudo apt-get install linux-tools-common linux-tools-generic linux-tools-`uname -r`