ftrace2otf
==========
This script converts the output of ftrace to the Open Trace Format (OTF).
The trace file can then be visualized with vampir or analyzed with other
OTF capable tools.


Requirements:
=============

 * Python 2

 * The OTF library (open-trace-format), configured with python bindings
   - http://tu-dresden.de/zih/otf/dateien/OTF-1.12.4salmon.tar.gz
   - ./configure --enable-python-bindings
   - PYTHONPATH needs to be set properly, e.g. including
     /opt/otf/lib/python2.7/site-packages
   - LD_LIBRARY_PATH needs to be set properly, e.g. including
     /opt/otf/lib
   Note: Do not use otf2.

How to use:
===========

Generate a trace using ftrace-record.sh:
NOTE: This must be run as root or with a user with access to /sys/kernel/debug/tracing

  # use 32 MB per CPU
  export FTRACE_BUFFER_SIZE=32768
  # you can blacklist and whitelist functions
  # by setting FTRACE_TRACE and FTRACE_NO_TRACE
  # we do not do this here
  ./ftrace-record.sh <my_application>

After you traced, you shoud have a file named "trace", this file will be
used by the ftrace2otf.py script.

Then you can run the following command to convert the trace into otf:

  python ftrace2otf.py

You will get two trace files. One will be CPU centric, the other will
be process centric.

 
Runtime configuration (environment variables):
==============================================

Recording:

FTRACE_NO_TRACE
This will allow you to filter out events
separate different events with colons and use *'s as wildcards
This uses the set_ftrace_notrace option from the ftraces debugfs entries.

FTRACE_TRACE
This will allow you to define events you want to have traced
separate different events with colons and use *'s as wildcards
This uses the set_ftrace_filter option from the ftraces debugfs entries.

set FTRACE_BUFFER_SIZE
This will define the per CPU buffer size of ftrace in kByte.
The total buffer size will be 2 * $FTRACE_BUFFER_SIZE * <nr. of CPUs>
This uses the buffer_size_kb option from the ftraces debugfs entries.
  
Authors:
========

Please contact the authors with any questions or suggestions.

Robert Schöne     <robert.schoene@tu-dresden.de>
Danny Rotscher    <danny.rotscher@tu-dresden.de>
Joseph Schuchart  <joseph.schuchart@tu-dresden.de>
Daniel Hackenberg <daniel.hackenberg@tu-dresden.de>
Thomas Ilsche     <thomas.ilsche@tu-dresden.de>


  
