EM-ODP  3.7.0
Event Machine on ODP
event_machine_debug.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  em_debug_tsp_t { EM_DEBUG_TSP_SCHED_ENTRY, EM_DEBUG_TSP_SCHED_RETURN, EM_DEBUG_TSP_LAST }
 

Functions

uint64_t em_debug_timestamp (em_debug_tsp_t tsp)
 

Detailed Description

Event Machine helper functions for debug support

Not for normal application use, may lower performance or cause latency.

Definition in file event_machine_debug.h.

Enumeration Type Documentation

◆ em_debug_tsp_t

EM dispatcher debug timestamp points EM_DEBUG_TSP_SCHED_ENTRY: EM core local timestamp taken by the dispatcher before asking the scheduler for new events. EM_DEBUG_TSP_SCHED_RETURN: EM core local timestamp taken by the dispatcher after returning from the scheduler.

Definition at line 53 of file event_machine_debug.h.

Function Documentation

◆ em_debug_timestamp()

uint64_t em_debug_timestamp ( em_debug_tsp_t  tsp)

Returns a per core timestamp from the EM dispatcher.

Not intended for normal application use! These debug timestamps are disabled by default and must be enabled by the user (see configure option '–enable-debug-timestamps=...' or the EM_DEBUG_TIMESTAMP_ENABLE define).

Timestamps are taken with odp_time_global/_strict() and converted to ns. The timestamps can be used to e.g. measure the EM dispatcher overhead from EM_DEBUG_TSP_SCHED_RETURN to the EO-receive() including all code and hooks in between.

If debug timestamps are disabled or the given timestamp point does not exist, 0 will be returned.

Parameters
tsptimestamp point, selects which EM internal timestamp to return
Returns
timestamp in ns
Return values
0if debug timestamps are disabled or the given timestamp point does not exist
See also
em_debug_tsp_t
Examples
scheduling_latency.c.

Definition at line 129 of file event_machine_helper.c.