reactor-c 1.0
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
trace.h
Go to the documentation of this file.
1
14
15#ifndef TRACE_H
16#define TRACE_H
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22#include <stdint.h>
23#include <stdbool.h>
24
25#include "lf_core_version.h"
26
31const version_t* lf_version_tracing();
32
47
66
71typedef struct {
73 void* pointer;
74 int src_id;
75 int dst_id;
76 int64_t logical_time;
77 int64_t microstep;
79 void* trigger;
80 int64_t extra_delay;
82
97void lf_tracing_global_init(char* process_name, char* process_names, int process_id, int max_num_local_threads);
98
109
117
123
131
132#ifdef __cplusplus
133}
134#endif
135
136#endif // TRACE_H
void lf_tracing_global_init(char *process_name, char *process_names, int process_id, int max_num_local_threads)
Initialize the tracing module.
void lf_tracing_register_trace_event(object_description_t description)
Register a kind of trace event.
void lf_tracing_set_start_time(int64_t start_time)
Give the tracing module access to the start time.
void lf_tracing_global_shutdown()
Shut down the tracing module.
const version_t * lf_version_tracing()
Return a description of the compile-time properties of the current plugin.
void lf_tracing_tracepoint(int worker, trace_record_nodeps_t *tr)
Submit a tracepoint from the given worker to the tracing module.
_lf_trace_object_t
Identifier for what is in the object table.
Definition trace.h:37
@ trace_trigger
A trigger (timer or action), identified by its trigger pointer.
Definition trace.h:42
@ trace_user
A user-defined trace object.
Definition trace.h:45
@ trace_reactor
A reactor instance, identified by its self struct pointer.
Definition trace.h:39
Definition trace.h:53
void * pointer
Pointer-sized value that uniquely identifies the object.
Definition trace.h:55
void * trigger
Pointer to the trigger (action or timer) or other secondary ID.
Definition trace.h:58
char * description
A NULL terminated string describing the object.
Definition trace.h:64
_lf_trace_object_t type
The type of trace object.
Definition trace.h:61
Trace record without dependencies.
Definition trace.h:71
int src_id
Definition trace.h:74
int64_t physical_time
Definition trace.h:78
int64_t extra_delay
Definition trace.h:80
int event_type
Definition trace.h:72
int dst_id
Definition trace.h:75
void * pointer
Definition trace.h:73
int64_t logical_time
Definition trace.h:76
void * trigger
Definition trace.h:79
int64_t microstep
Definition trace.h:77
instant_t start_time