commit | 750f7187a8d0ad2d72a0261261bc9a7d81fbae93 | [log] [tgz] |
---|---|---|
author | Patrick Bellasi <patrick.bellasi@arm.com> | Wed Jun 14 11:41:33 2017 +0100 |
committer | KP Singh <kpsingh@google.com> | Thu Jun 15 00:18:40 2017 +0200 |
tree | 01445ba3be61ef6616d2bad14c37c57e61ef418f | |
parent | 663f1042f35a3dad09f8610bf60d4ecb30efec24 [diff] |
trappy/ftrace: add support to account line numbers Knowing the line number of a trace event into the original trace file can be super useful for two main reasons: 1. it can be used as a truly unique ID of each DF entry, since it is not subject to the possible index collisions due to the timestamp resoluton 2. it can be super-useful to correlate DF entries with the original trace If this ID is also tracked the same way tools like kernelshark does, than we have a definitive and easy tool to match DF records with kernelshark. Since kernelshark uses a 0-based indexing for trace events, let's account for proper trace events line numbers starting from 0. This number is available as a class property, in case we are interested to know to real total number of events which are available in the original trace. Moreover, it will be used by a following patch to add a unique ID to each DF entry. Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com> Reviewed-by: KP Singh <kpsingh@google.com>
TRAPpy (Trace Analysis and Plotting in Python) is a visualization tool to help analyze data generated on a device. It parses ftrace-like logs and creates in-memory data structures to be used for plotting and data analysis.
The following instructions are for Ubuntu 14.04 LTS but they should also work with Debian jessie. Older versions of Ubuntu or Debian (e.g. Ubuntu 12.04 or Debian wheezy) will likely require to install more packages from pip as the ones present in Ubuntu 12.04 or Debian wheezy will probably be too old.
$ sudo apt install trace-cmd kernelshark
$ sudo apt install python-pip python-dev
$ sudo apt install libfreetype6-dev libpng12-dev python-nose $ sudo pip install numpy matplotlib pandas ipython[all]
$ sudo pip install --upgrade trappy
Now launch the ipython notebook server:
$ ipython notebook
This should pop up a browser. If it doesn't, open a web browser and go to http://localhost:8888/tree/
In the doc/
folder there's a 00 - Quick start
which describes how to run TRAPpy. Other notebooks in that directory describe other functions of TRAPpy.
API reference can be found in https://pythonhosted.org/TRAPpy/
The code of the TRAPpy toolkit with all the supported tests and Notebooks can be cloned from the official GitHub repository with this command:
$ git clone https://github.com/ARM-software/trappy.git
An easy way to test your installation is to use the nosetests
command from TRAPpy's home directory:
$ nosetests
If the installation is correct all tests will succeed.