commit | f375f3f00bd6f6f2ebc681d6184c38d2222c593b | [log] [tgz] |
---|---|---|
author | Joel Fernandes <joelaf@google.com> | Sun Jun 11 20:39:07 2017 -0700 |
committer | KP Singh <kpsingh@google.com> | Wed Jun 14 23:39:15 2017 +0200 |
tree | cc1dec73f22a0ecea06b1ddd5fbcb5cf8baae142 | |
parent | e565c7adcddde8d11cb7c27b7d22310d4acafde2 [diff] |
trappy/ftrace: Parse data string along with special fields This is needed so that we're not dependent anymore on making sure data starts at something with '=' and will allow to parse custom systrace tracing_mark_write events which don't have an '=' in them. The new regex will also work for lines that do already have an '=' and doesn't change their behavior. The last line of the new regex in this patch works like this: r"(?P<timestamp>[0-9]+\.[0-9]+): (\w+:\s+)+(?P<data>.+)" We use skip over '<string>:<whitespace> ' and the next thing we find is considered the start of the data. This works well to find the start of a line for existing traces and is needed for systraces which don't have '='. Signed-off-by: Joel Fernandes <joelaf@google.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.