litl  0.1.5
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Macros | Functions
Functions for Recording Packed Events

Macros

#define __LITL_WRITE_ADD_ARG(ptr, param)
 For internal use only. Adds a parameter to a packed event. More...
 
#define litl_write_probe_pack_0(trace,code,retval)
 Records a packed event without parameters. More...
 
#define litl_write_probe_pack_1(trace,code,param1,retval)
 Records a packed event with 1 parameter. More...
 
#define litl_write_probe_pack_2(trace,code,param1,param2,retval)
 Records a packed event with 2 parameters. More...
 
#define litl_write_probe_pack_3(trace,code,param1,param2,param3,retval)
 Records a packed event with 3 parameters. More...
 
#define litl_write_probe_pack_4(trace,code,param1,param2,param3,param4,retval)
 Records a packed event with 4 parameters. More...
 
#define litl_write_probe_pack_5(trace,code,param1,param2,param3,param4,param5,retval)
 Records a packed event with 5 parameters. More...
 
#define litl_write_probe_pack_6(trace,code,param1,param2,param3,param4,param5,param6,retval)
 Records a packed event with 6 parameters. More...
 
#define litl_write_probe_pack_7(trace,code,param1,param2,param3,param4,param5,param6,param7,retval)
 Records a packed event with 7 parameters. More...
 
#define litl_write_probe_pack_8(trace,code,param1,param2,param3,param4,param5,param6,param7,param8,retval)
 Records a packed event with 8 parameters. More...
 
#define litl_write_probe_pack_9(trace,code,param1,param2,param3,param4,param5,param6,param7,param8,param9,retval)
 Records a packed event with 9 parameters. More...
 
#define litl_write_probe_pack_10(trace,code,param1,param2,param3,param4,param5,param6,param7,param8,param9,param10,retval)
 Records a packed event with 10 parameters. More...
 

Functions

litl_t__litl_write_get_event (litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
 For internal use only. Allocates an event. More...
 

Detailed Description

Macro Definition Documentation

#define __LITL_WRITE_ADD_ARG (   ptr,
  param 
)
Value:
do { \
typeof(param) _param = param; \
memcpy(ptr, &_param, sizeof(_param)); \
ptr = ((char*) ptr)+sizeof(_param); \
} while(0)

For internal use only. Adds a parameter to a packed event.

Parameters
ptrA pointer to an event where the parameter should be stored
paramA parameter to store

Definition at line 339 of file litl_write.h.

#define litl_write_probe_pack_0 (   trace,
  code,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE; \
litl_t* p_evt = __litl_write_get_event(trace, \
code, total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event without parameters.

Parameters
traceA pointer to the event recording object
codeAn event code

Definition at line 353 of file litl_write.h.

#define litl_write_probe_pack_1 (   trace,
  code,
  param1,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 1 parameter.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event

Definition at line 373 of file litl_write.h.

#define litl_write_probe_pack_10 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  param7,
  param8,
  param9,
  param10,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2) + \
sizeof(param3) + sizeof(param4) + sizeof(param5) + sizeof(param6) + \
sizeof(param7) + sizeof(param8) + sizeof(param9) + sizeof(param10); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
__LITL_WRITE_ADD_ARG(_ptr_, param3); \
__LITL_WRITE_ADD_ARG(_ptr_, param4); \
__LITL_WRITE_ADD_ARG(_ptr_, param5); \
__LITL_WRITE_ADD_ARG(_ptr_, param6); \
__LITL_WRITE_ADD_ARG(_ptr_, param7); \
__LITL_WRITE_ADD_ARG(_ptr_, param8); \
__LITL_WRITE_ADD_ARG(_ptr_, param9); \
__LITL_WRITE_ADD_ARG(_ptr_, param10); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 10 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event
param33rd parameter for this event
param44th parameter for this event
param55th parameter for this event
param66th parameter for this event
param77th parameter for this event
param88th parameter for this event
param99th parameter for this event
param1010th parameter for this event

Definition at line 718 of file litl_write.h.

#define litl_write_probe_pack_2 (   trace,
  code,
  param1,
  param2,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 2 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event

Definition at line 399 of file litl_write.h.

#define litl_write_probe_pack_3 (   trace,
  code,
  param1,
  param2,
  param3,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2) + \
sizeof(param3); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
__LITL_WRITE_ADD_ARG(_ptr_, param3); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 3 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event
param33rd parameter for this event

Definition at line 428 of file litl_write.h.

#define litl_write_probe_pack_4 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2) + \
sizeof(param3) + sizeof(param4); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
__LITL_WRITE_ADD_ARG(_ptr_, param3); \
__LITL_WRITE_ADD_ARG(_ptr_, param4); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 4 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event
param33rd parameter for this event
param44th parameter for this event

Definition at line 460 of file litl_write.h.

#define litl_write_probe_pack_5 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2) + \
sizeof(param3) + sizeof(param4) +sizeof(param5); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
__LITL_WRITE_ADD_ARG(_ptr_, param3); \
__LITL_WRITE_ADD_ARG(_ptr_, param4); \
__LITL_WRITE_ADD_ARG(_ptr_, param5); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 5 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event
param33rd parameter for this event
param44th parameter for this event
param55th parameter for this event

Definition at line 495 of file litl_write.h.

#define litl_write_probe_pack_6 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2) + \
sizeof(param3) + sizeof(param4) + sizeof(param5) + sizeof(param6); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
__LITL_WRITE_ADD_ARG(_ptr_, param3); \
__LITL_WRITE_ADD_ARG(_ptr_, param4); \
__LITL_WRITE_ADD_ARG(_ptr_, param5); \
__LITL_WRITE_ADD_ARG(_ptr_, param6); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 6 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event
param33rd parameter for this event
param44th parameter for this event
param55th parameter for this event
param66th parameter for this event

Definition at line 533 of file litl_write.h.

#define litl_write_probe_pack_7 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  param7,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2) + \
sizeof(param3) + sizeof(param4) + sizeof(param5) + sizeof(param6) \
+ sizeof(param7); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
__LITL_WRITE_ADD_ARG(_ptr_, param3); \
__LITL_WRITE_ADD_ARG(_ptr_, param4); \
__LITL_WRITE_ADD_ARG(_ptr_, param5); \
__LITL_WRITE_ADD_ARG(_ptr_, param6); \
__LITL_WRITE_ADD_ARG(_ptr_, param7); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 7 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event
param33rd parameter for this event
param44th parameter for this event
param55th parameter for this event
param66th parameter for this event
param77th parameter for this event

Definition at line 574 of file litl_write.h.

#define litl_write_probe_pack_8 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  param7,
  param8,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2) + \
sizeof(param3) + sizeof(param4) + sizeof(param5) + sizeof(param6) \
+ sizeof(param7) + sizeof(param8); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
__LITL_WRITE_ADD_ARG(_ptr_, param3); \
__LITL_WRITE_ADD_ARG(_ptr_, param4); \
__LITL_WRITE_ADD_ARG(_ptr_, param5); \
__LITL_WRITE_ADD_ARG(_ptr_, param6); \
__LITL_WRITE_ADD_ARG(_ptr_, param7); \
__LITL_WRITE_ADD_ARG(_ptr_, param8); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 8 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event
param33rd parameter for this event
param44th parameter for this event
param55th parameter for this event
param66th parameter for this event
param77th parameter for this event
param88th parameter for this event

Definition at line 619 of file litl_write.h.

#define litl_write_probe_pack_9 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  param7,
  param8,
  param9,
  retval 
)
Value:
do { \
int total_size = LITL_BASE_SIZE + sizeof(param1) + sizeof(param2) + \
sizeof(param3) + sizeof(param4) + sizeof(param5) + sizeof(param6) \
+ sizeof(param7) + sizeof(param8) + sizeof(param9); \
litl_t* p_evt = __litl_write_get_event(trace, \
code, \
total_size); \
if(p_evt){ \
p_evt->parameters.packed.size = total_size - LITL_BASE_SIZE; \
void* _ptr_ = &p_evt->parameters.packed.param[0]; \
__LITL_WRITE_ADD_ARG(_ptr_, param1); \
__LITL_WRITE_ADD_ARG(_ptr_, param2); \
__LITL_WRITE_ADD_ARG(_ptr_, param3); \
__LITL_WRITE_ADD_ARG(_ptr_, param4); \
__LITL_WRITE_ADD_ARG(_ptr_, param5); \
__LITL_WRITE_ADD_ARG(_ptr_, param6); \
__LITL_WRITE_ADD_ARG(_ptr_, param7); \
__LITL_WRITE_ADD_ARG(_ptr_, param8); \
__LITL_WRITE_ADD_ARG(_ptr_, param9); \
} \
retval = p_evt; \
} while(0)
#define LITL_BASE_SIZE
Definition: litl_types.h:457
#define __LITL_WRITE_ADD_ARG(ptr, param)
For internal use only. Adds a parameter to a packed event.
Definition: litl_write.h:339
litl_t * __litl_write_get_event(litl_write_trace_t *trace, litl_type_t type, litl_code_t code, int size)
For internal use only. Allocates an event.
Definition: litl_write.c:506

Records a packed event with 9 parameters.

Parameters
traceA pointer to the event recording object
codeAn event code
param11st parameter for this event
param22nd parameter for this event
param33rd parameter for this event
param44th parameter for this event
param55th parameter for this event
param66th parameter for this event
param77th parameter for this event
param88th parameter for this event
param99th parameter for this event

Definition at line 667 of file litl_write.h.

Function Documentation

litl_t* __litl_write_get_event ( litl_write_trace_t trace,
litl_type_t  type,
litl_code_t  code,
int  size 
)

For internal use only. Allocates an event.

Parameters
traceA pointer to the event recording object
typeAn event type
codeAn event code
sizeSize of the event (in Bytes)
Returns
The allocated event or NULL in case of error

Definition at line 506 of file litl_write.c.