#include <oski/common.h>
#include <oski/simplelist.h>
Go to the source code of this file.
Data Structures | |
| struct | oski_tracerec_t |
| A trace record that stores the number of times a kernel has been (and/or will be) called with a particular argument list. More... | |
Defines | |
| #define | INC_OSKI_TRACE_H |
| oski/trace.h included. | |
| #define | INVALID_TRACEREC ((oski_tracerec_t *)NULL) |
| NULL trace record. | |
| #define | INVALID_TRACE ((oski_trace_t)NULL) |
| NULL trace. | |
| #define | TIME_NOT_AVAIL ((double)(-1.0)) |
| Time not available. | |
| #define | oski_RecordCall(trace, id, args, args_size, func, time_elapsed) oski_RecordCalls(trace, id, args, args_size, func, 1, time_elapsed) |
| Wrapper around oski_RecordCalls assuming just 1 call. | |
Typedefs | |
| typedef int(* | oski_traceargscmp_funcpt )(const void *a, const void *b) |
| Type for a function to compare two trace arguments of the same type. | |
| typedef simplelist_t * | oski_trace_t |
| A trace is a list of kernel calls and their argument signatures. | |
Functions | |
| oski_trace_t | oski_CreateTrace (void) |
| Create and return a new trace. | |
| void | oski_DestroyTrace (oski_trace_t trace) |
| Destroy a trace. | |
| int | oski_RecordCalls (oski_trace_t trace, oski_id_t kernel_id, const void *args, size_t args_bytes, oski_traceargscmp_funcpt func_compare, size_t num_new_calls, double time_elapsed) |
| Save a kernel call to a trace. | |
| size_t | oski_GetNumCalls (const oski_trace_t trace, oski_id_t kernel_id, const void *args, size_t args_bytes, oski_traceargscmp_funcpt func_compare) |
| Returns the frequency of a particular kernel call for all matching records. | |
| int | oski_MatchesTraceRecord (const oski_tracerec_t *rec, oski_id_t kernel_id, const void *args, size_t args_bytes, oski_traceargscmp_funcpt func_compare) |
| Returns 1 if a given trace record matches a query request, or 0 otherwise. | |
|
|
Type for a function to compare two trace arguments of the same type. This type is a pointer to a comparison function f(a, b) where a and b are pointers to kernel-specific argument lists (i.e., the 'args' field of a oski_tracerec_t structure). When an object of this type is passed to one of the routines below, then the first argument `a' is ALWAYS the trace argument list for the record stored in the trace, and second argument `b' is the trace argument list being sought. |
|
||||||||||||||||||||||||
|
Returns the frequency of a particular kernel call for all matching records.
|
|
||||||||||||||||||||||||
|
Returns 1 if a given trace record matches a query request, or 0 otherwise.
|
|
||||||||||||||||||||||||||||||||
|
Save a kernel call to a trace.
If a matching record cannot be found, then a new one is created.
|
1.4.6