Harlequin RIP SDK

Capture profiling information from RIP. More...

#include "probelog.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "swtracegroups.h"

Functions

void SwLeProbeLogInit (void)
 Initialise timing probe logging. More...
 
void SwLeProbeLogFinish (void)
 Finish probe logging. More...
 
void SwLeProbeLogFilename (const char *pszLog)
 Set probe log file name. More...
 
HqBool SwLeProbeOption (const char *argname, const char *arg)
 Set the probe handler function for the specified arg. More...
 
HqBool SwLeProfileOption (const char *argname, const char *arg)
 Set the profile handler function for the specified arg. More...
 
void SwLeProbeOptionUsage (void)
 Display the default probe usage information. More...
 
size_t save_trace_names (void *dest, const char **names, int nnames)
 

Variables

static const char * default_trace_name [SKINKIT_TRACE_N]
 
const char ** g_ppTraceNames = &default_trace_name[0]
 
int g_nTraceNames = SKINKIT_TRACE_N
 
static int default_trace_enabled [SKINKIT_TRACE_N]
 
int * g_pabTraceEnabled = &default_trace_enabled[0]
 
static const char * default_tracetype_name [SKINKIT_TRACETYPE_N]
 
const char ** g_ppTraceTypeNames = &default_tracetype_name[0]
 
int g_nTraceTypeNames = SKINKIT_TRACETYPE_N
 
static const sw_tracegroup_t default_group_details []
 Default Group details struct. More...
 
char g_szProbeLog [260]
 Probe log filename.
 
static char g_szProbeArg [8]
 Probe logging command line arg For usage display purposes only.
 

Detailed Description

Capture profiling information from RIP.

See also
Lightweight tracing API.

Function Documentation

◆ 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
destWhere 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.
namesThe names in the name mapping table.
nnamesThe number of names in the name mapping table.
Returns
The size of the table, in bytes, rounded up to 8 bytes.

Variable Documentation

◆ default_group_details

const sw_tracegroup_t default_group_details[]
static

Default Group details struct.

This is used to construct detailed usage messages. The usage message is constructed using a function so that re-ordering names in the core doesn't cause the skin to be out of order.

Can be overridden when calling the init function.

◆ default_trace_enabled

int default_trace_enabled[SKINKIT_TRACE_N]
static

Default array for trace enabled/disabled state.

◆ default_trace_name

const char* default_trace_name[SKINKIT_TRACE_N]
static
Initial value:
= {
NULL,
NULL,
}
#define NULL
Definition of NULL pointer.
Definition: hqtypes.h:37

Default trace name array

◆ default_tracetype_name

const char* default_tracetype_name[SKINKIT_TRACETYPE_N]
static
Initial value:
= {
NULL,
NULL,
}

Default trace type name array

◆ g_nTraceNames

int g_nTraceNames = SKINKIT_TRACE_N

Number of trace names in trace name array

◆ g_nTraceTypeNames

int g_nTraceTypeNames = SKINKIT_TRACETYPE_N

Number of trace type names in trace type list

◆ g_pabTraceEnabled

int* g_pabTraceEnabled = &default_trace_enabled[0]

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 = &default_trace_name[0]

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 = &default_tracetype_name[0]

This pointer will point to either the default trace type name array, or an array that was specified in the init function.