TizenRT Libs&Environment  v2.0 M2
Collaboration diagram for TTRACE:

Files

file  ttrace.h
 ttrace APIs
 

Data Structures

struct  sched_message
 
union  trace_message
 
struct  trace_packet
 

Macros

#define TTRACE_START   's'
 
#define TTRACE_OVERWRITE   'o'
 
#define TTRACE_FINISH   'f'
 
#define TTRACE_INFO   'i'
 
#define TTRACE_SELECTED_TAG   't'
 
#define TTRACE_FUNC_TAG   'g'
 
#define TTRACE_SET_BUFSIZE   'z'
 
#define TTRACE_USED_BUFSIZE   'u'
 
#define TTRACE_BUFFER   'b'
 
#define TTRACE_DUMP   'd'
 
#define TTRACE_PRINT   'p'
 
#define TTRACE_CODE_VARIABLE   0
 
#define TTRACE_CODE_UNIQUE   (1 << 7)
 
#define TTRACE_MSG_BYTES   32
 
#define TTRACE_COMM_BYTES   12
 
#define TTRACE_BYTE_ALIGN   4
 
#define TTRACE_NODATA   -2
 
#define TTRACE_INVALID   -1
 
#define TTRACE_VALID   0
 
#define TTRACE_TAG_ALL   -1
 
#define TTRACE_TAG_OFF   0
 
#define TTRACE_TAG_APPS   (1 << 0)
 
#define TTRACE_TAG_LIBS   (1 << 1)
 
#define TTRACE_TAG_LOCK   (1 << 2)
 
#define TTRACE_TAG_TASK   (1 << 3)
 
#define TTRACE_TAG_IPC   (1 << 4)
 

Functions

int trace_begin (int tag, char *str,...)
 writes a trace log with string to indicate that a event has begun More...
 
int trace_begin_uid (int tag, int8_t uniqueid)
 writes a trace log with unique id to indicate that a event has begun More...
 
int trace_end (int tag)
 writes a trace log to indicate that the event has ended More...
 
int trace_end_uid (int tag)
 writes a trace log to indicate that a event has ended More...
 
int trace_sched (struct tcb_s *prev, struct tcb_s *next)
 writes a trace log for scheduler events More...
 

Detailed Description

Macro Definition Documentation

#define TTRACE_BUFFER   'b'

Definition at line 56 of file ttrace.h.

#define TTRACE_BYTE_ALIGN   4

Definition at line 65 of file ttrace.h.

#define TTRACE_CODE_UNIQUE   (1 << 7)

Definition at line 61 of file ttrace.h.

#define TTRACE_CODE_VARIABLE   0

Definition at line 60 of file ttrace.h.

#define TTRACE_COMM_BYTES   12

Definition at line 64 of file ttrace.h.

#define TTRACE_DUMP   'd'

Definition at line 57 of file ttrace.h.

#define TTRACE_FINISH   'f'

Definition at line 50 of file ttrace.h.

#define TTRACE_FUNC_TAG   'g'

Definition at line 53 of file ttrace.h.

#define TTRACE_INFO   'i'

Definition at line 51 of file ttrace.h.

#define TTRACE_INVALID   -1

Definition at line 68 of file ttrace.h.

#define TTRACE_MSG_BYTES   32

Definition at line 63 of file ttrace.h.

#define TTRACE_NODATA   -2

Definition at line 67 of file ttrace.h.

#define TTRACE_OVERWRITE   'o'

Definition at line 49 of file ttrace.h.

#define TTRACE_PRINT   'p'

Definition at line 58 of file ttrace.h.

#define TTRACE_SELECTED_TAG   't'

Definition at line 52 of file ttrace.h.

#define TTRACE_SET_BUFSIZE   'z'

Definition at line 54 of file ttrace.h.

#define TTRACE_START   's'

Definition at line 48 of file ttrace.h.

#define TTRACE_TAG_ALL   -1

Definition at line 71 of file ttrace.h.

#define TTRACE_TAG_APPS   (1 << 0)

Definition at line 73 of file ttrace.h.

#define TTRACE_TAG_IPC   (1 << 4)

Definition at line 77 of file ttrace.h.

#define TTRACE_TAG_LIBS   (1 << 1)

Definition at line 74 of file ttrace.h.

#define TTRACE_TAG_LOCK   (1 << 2)

Definition at line 75 of file ttrace.h.

#define TTRACE_TAG_OFF   0

Definition at line 72 of file ttrace.h.

#define TTRACE_TAG_TASK   (1 << 3)

Definition at line 76 of file ttrace.h.

#define TTRACE_USED_BUFSIZE   'u'

Definition at line 55 of file ttrace.h.

#define TTRACE_VALID   0

Definition at line 69 of file ttrace.h.

Function Documentation

int trace_begin ( int  tag,
char *  str,
  ... 
)

writes a trace log with string to indicate that a event has begun

#include <tinyara/ttrace.h>

Parameters
[in]tagnumber for tag
[in]strunique strings like function name for distinguishing events
Returns
On success, TTRACE_VALID is returned. On failure, ERROR is returned and errno is set appropriately.
Since
TizenRT v1.1
int trace_begin_uid ( int  tag,
int8_t  uniqueid 
)

writes a trace log with unique id to indicate that a event has begun

#include <tinyara/ttrace.h>

Parameters
[in]tagnumber for tag
[in]uniqueidunique id for distinguishing events
Returns
On success, TTRACE_VALID is returned. On failure, TTRACE_INVALID is returned and errno is set appropriately.
Since
TizenRT v1.1
int trace_end ( int  tag)

writes a trace log to indicate that the event has ended

#include <tinyara/ttrace.h>

Parameters
[in]tagnumber for tag
Returns
On success, TTRACE_VALID is returned. On failure, TTRACE_INVALID is returned and errno is set appropriately.
Since
TizenRT v1.1
int trace_end_uid ( int  tag)

writes a trace log to indicate that a event has ended

#include <tinyara/ttrace.h>

Parameters
[in]tagnumber for tag
Returns
On success, TTRACE_VALID is returned. On failure, TTRACE_INVALID is returned and errno is set appropriately.
Since
TizenRT v1.1
int trace_sched ( struct tcb_s prev,
struct tcb_s next 
)

writes a trace log for scheduler events

#include <tinyara/ttrace.h>

Parameters
[in]prevtcb of current task
[in]nexttcb of next task which will be switched
Returns
On success, TTRACE_VALID is returned. On failure, TTRACE_INVALID is returned and errno is set appropriately.
Since
TizenRT v1.1