litl  0.1.1
 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)
 Records a packed event without parameters. More...
 
#define litl_write_probe_pack_1(trace,code,param1)
 Records a packed event with 1 parameter. More...
 
#define litl_write_probe_pack_2(trace,code,param1,param2)
 Records a packed event with 2 parameters. More...
 
#define litl_write_probe_pack_3(trace,code,param1,param2,param3)
 Records a packed event with 3 parameters. More...
 
#define litl_write_probe_pack_4(trace,code,param1,param2,param3,param4)
 Records a packed event with 4 parameters. More...
 
#define litl_write_probe_pack_5(trace,code,param1,param2,param3,param4,param5)
 Records a packed event with 5 parameters. More...
 
#define litl_write_probe_pack_6(trace,code,param1,param2,param3,param4,param5,param6)
 Records a packed event with 6 parameters. More...
 
#define litl_write_probe_pack_7(trace,code,param1,param2,param3,param4,param5,param6,param7)
 Records a packed event with 7 parameters. More...
 
#define litl_write_probe_pack_8(trace,code,param1,param2,param3,param4,param5,param6,param7,param8)
 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)
 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)
 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 327 of file litl_write.h.

#define litl_write_probe_pack_0 (   trace,
  code 
)
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; \
} \
} 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:495

Records a packed event without parameters.

Parameters
traceA pointer to the event recording object
codeAn event code

Definition at line 341 of file litl_write.h.

#define litl_write_probe_pack_1 (   trace,
  code,
  param1 
)
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); \
} \
} 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:327
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:495

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 359 of file litl_write.h.

#define litl_write_probe_pack_10 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  param7,
  param8,
  param9,
  param10 
)
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); \
} \
} 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:327
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:495

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 684 of file litl_write.h.

#define litl_write_probe_pack_2 (   trace,
  code,
  param1,
  param2 
)
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); \
} \
} 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:327
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:495

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 382 of file litl_write.h.

#define litl_write_probe_pack_3 (   trace,
  code,
  param1,
  param2,
  param3 
)
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); \
} \
} 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:327
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:495

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 408 of file litl_write.h.

#define litl_write_probe_pack_4 (   trace,
  code,
  param1,
  param2,
  param3,
  param4 
)
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); \
} \
} 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:327
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:495

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 438 of file litl_write.h.

#define litl_write_probe_pack_5 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5 
)
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); \
} \
} 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:327
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:495

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 471 of file litl_write.h.

#define litl_write_probe_pack_6 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6 
)
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); \
} \
} 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:327
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:495

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 507 of file litl_write.h.

#define litl_write_probe_pack_7 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  param7 
)
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); \
} \
} 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:327
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:495

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 546 of file litl_write.h.

#define litl_write_probe_pack_8 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  param7,
  param8 
)
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); \
} \
} 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:327
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:495

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 589 of file litl_write.h.

#define litl_write_probe_pack_9 (   trace,
  code,
  param1,
  param2,
  param3,
  param4,
  param5,
  param6,
  param7,
  param8,
  param9 
)
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); \
} \
} 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:327
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:495

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 635 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 495 of file litl_write.c.