Capture profiling information from RIP.
More...
Capture profiling information from RIP.
- See also
- Lightweight tracing API.
◆ ALIGN_UP_8
#define ALIGN_UP_8 |
( |
|
s_ | ) |
(((s_) + 7) & ~7) |
Round a size up to an 8 byte multiple.
◆ tracelog_entry_t
A single entry in the memory resident log. Explicitly sizes, because this is the same for all architectures. A trace entry contains:
- A 64-bit timestamp, in tickspersec units;
- A 64-bit duration, in tickspersec units;
- A 64-bit thread ID (64-bits because this is a pointer on Unix/MacOS);
- A 32-bit trace ID corresponding to a valid name in the trace name table;
- A 32-bit trace type corresponding to a valid name in the trace type table;
- A 64-bit trace designator, used for each different trace type to denote an object, count, amount, or value of interest.
Trace entries are individually aligned to 8 bytes.
◆ tracelog_header_t
The header for the memory mapped log. Explicit sizes, because this is the save for all architectures. The memory mapped log contains:
- An 8-byte magic number containing the characters 'HQNplog' followed by LF. This is used to determine that a logfile is in binary format.
- An 8-byte byte order marker. This is initialised to the 64-bit integer 0x0807060504030201. The order of bytes in a saved logfile can be used to check whether the logfile was produced on a different architecture, and swap byte order if necessary.
- A 64-bit size of this header structure in bytes;
- A 64-bit timebase, indicating the number of ticks per second in time fields;
- A 64-bit start time, giving an offset from a known reference such that multiple RIPs or trace logs within the same boot cycle can be compared.
- A 64-bit offset field indicating the number of bytes from the start of the header (also the start of the file) to the trace name table. All table offsets are 64-bit aligned;
- A 64-bit offset field indicating the number of bytes from the start of the header (also the start of the file) to the trace type name table;
- A 64-bit offset field indicating the number of bytes from the start of the header (also the start of the file) to the trace entry table;
- A 64-bit size of each trace entry.
- A 64-bit count of the number of entries in the trace entry table.
◆ save_trace_names()
size_t save_trace_names |
( |
void * |
dest, |
|
|
const char ** |
names, |
|
|
int |
nnames |
|
) |
| |
Save a name mapping table to a memory location, and/or compute the size of the storage for the mapping table.
- Parameters
-
dest | Where to save the name mapping table. If this is NULL, the table will not be saved, but the size required to store the table will be returned. |
names | The names in the name mapping table. |
nnames | The number of names in the name mapping table. |
- Returns
- The size of the table, in bytes, rounded up to 8 bytes.
◆ g_nTraceNames
Number of trace names in trace name array
◆ g_nTraceTypeNames
Number of trace type names in trace type list
◆ g_pabTraceEnabled
This pointer will point to either the default enabled/disable state array, or an array that was specified in the init function.
◆ g_ppTraceNames
const char** g_ppTraceNames |
|
extern |
This pointer will point to either the default trace name array, or an array that was specified in the init function.
◆ g_ppTraceTypeNames
const char** g_ppTraceTypeNames |
|
extern |
This pointer will point to either the default trace type name array, or an array that was specified in the init function.