Data File Format
The data file is binary, structured as
follows (all values are stored in little-endian order):
* File format:
* header
* record 0
* record 1
* ...
*
* Header format:
* u4 magic 0x574f4c53 ('SLOW')
* u2 version
* u2 offset to data
* u8 start date/time in usec
*
* Record format:
* u1 thread ID
* u4 method ID | method action
* u4 time delta since start, in usec
The application is expected to parse all of the header fields, then seek
to "offset to data" from the start of the file. From there it just
reads
9-byte records until EOF is reached.
u8 start date/time in usec is the output from gettimeofday().
It's mainly there so that you can tell if the output was generated yesterday
or three months ago.
method action sits in the two least-significant bits of the
method word. The currently defined meanings are:
- 0 - method entry
- 1 - method exit
- 2 - method "exited" when unrolled by exception handling
- 3 - (reserved)
An unsigned 32-bit integer can hold about 70 minutes of time in microseconds.