Event Log Debugging

- Main Page
- Related Pages
- Modules
- Namespaces
- Data Structures
- Files
- Examples

Data Structures | Typedefs | Functions
Event Log Debugging
Eina

These functions are use internally by EFL in general for profiling. More...

## Data Structures
struct | _Eina_Evlog_Item
struct | _Eina_Evlog_Buf

## Typedefs
typedef struct _Eina_Evlog_Item | Eina_Evlog_Item
typedef struct _Eina_Evlog_Buf | Eina_Evlog_Buf

## Functions
void | eina_evlog (const char *event, void *obj, double srctime, const char *detail)
| Log an event in our event log for profiling data. More...
Eina_Evlog_Buf * | eina_evlog_steal (void)
| Steal an event log buffer from the evlog core. More...
void | eina_evlog_start (void)
| Begin logging - until now eina_evlog is a NOOP. More...
void | eina_evlog_stop (void)
| Stop logging. More...

## Detailed Description

These functions are use internally by EFL in general for profiling.

This API is not considered stable or intended for use outside of EFL itself at this stage, so do not use this unless you wish to keep up. The format of debug logs may and likely will change as this feature matures.

Since
  1.15

## Function Documentation

void eina_evlog | ( | const char * | event,
|  | void * | obj,
|  | double | srctime,
|  | const char * | detail
| ) |  |

Log an event in our event log for profiling data.

Log some interesting event inside of EFL, eg a wakeup (and why etc.). The `event` string must alwasy be provided and be of the form:

"+eventname" "-eventname" ">eventname" "<eventname" "!eventname" "*eventname"

etc. The "+" char means an event is beginning (and any subsequent events logged are really children of this event). The "-" char means an event is ending and so all child events SHOULD have ended by now. A "!" character means the event is a one-off with no beginning or end. A"*" Means this is special metadata and the defail field may need special parsing based on the eventname, so ignroe unless known. A ">" character means we begin this "state" of the process (these are separate to "+" and "-" events and don't nest - arenot related to a thread or any other event, but just a state). "<" Ends the given state given by the "eventname" spart of the string. Any string following this initial character is the event or state name (and must be provided in the exact same string at both "+", "<" and "-", ">" events). This is what will be displayed in a debugger (and may be a well known string thus given a nice UI flourish with icons, labels and colors, so don't change this string unless you want to impact such visibility of these events). The event string after the first character as above can be anything, including white space. It is suggested to keep it human readable and as short as feasible.

The `object` is optional, and if not used, pass in NULL. If it is used, it can be a pointer to anything. It is intended simply to be of use to indicate an event happens on object A vs object B. What this points to is irrelevant as the pointer is never de-references or used other than as a label to differentiate an event on 2 different objects.

The `srctime` parameter is 0.0 if not used, or if used, contains a timepoint for an event that triggered this one. For example, if a device or hardware interrupt causes this event, that device may provide a timestamp/timepoint as part of the device information to indicate the exact time the hardware interrupt happened. This can be useful to have more information as to the latency of an actual source of an event such as the hardware interrupt time, and when the code actually begins seeing or processing it.

The `detail` string is optional (and if unused should be NULL). This is for providing more detailed information to log such as perhaps a the state at the time of the log events or a series of parameters and input that caused this event.

Parameters

  event | The event string - see above for format
  obj | An optional object "pointer" to associate
  srctime | An optional source event timestamp that caused this event
  detail | An optional event detail string with more info

Since
  1.15

Referenced by ecore_main_loop_begin(), and eina_init().

Eina_Evlog_Buf* eina_evlog_steal | ( | void |  | ) |

Steal an event log buffer from the evlog core.

Only one buffer can be stolen at any time. If you steal a new buffer, the old stolen buffer is "released" back to the evlog core.

Returns
  The stolen evlog buffer

Since
  1.15

void eina_evlog_start | ( | void |  | ) |

Begin logging - until now eina_evlog is a NOOP.

Since
  1.15

void eina_evlog_stop | ( | void |  | ) |

Stop logging.

You must not be using any evlog buffers stolen by eina_evlog_steal() by the time you call this function.

Since
  1.15