reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
trace.h
Go to the documentation of this file.
1#ifndef TRACE_H
2#define TRACE_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stdint.h>
9#include <stdbool.h>
10
11#include "lf_core_version.h"
12
18
22typedef enum {
23 trace_reactor, // Self struct.
24 trace_trigger, // Timer or action (argument to schedule()).
25 trace_user // User-defined trace object.
27
33 void* pointer; // Pointer-sized value that uniquely identifies the object.
34 void* trigger; // Pointer to the trigger (action or timer) or other secondary ID, if any.
35 _lf_trace_object_t type; // The type of trace object.
36 char* description; // A NULL terminated string.
37};
38
39typedef struct {
41 void* pointer;
42 int src_id;
43 int dst_id;
44 int64_t logical_time;
45 int64_t microstep;
47 void* trigger;
48 int64_t extra_delay;
50
63void lf_tracing_global_init(char* process_name, char* process_names, int process_id, int max_num_local_threads);
88
89#ifdef __cplusplus
90}
91#endif
92
93#endif // TRACE_H
API for runtime plugins to use to sanity-check compatibility with the core. Plugins APIs can include ...
instant_t start_time
Definition tag.c:33
void * worker(void *arg)
Definition reactor_threaded.c:875
Definition trace.h:32
void * pointer
Definition trace.h:33
void * trigger
Definition trace.h:34
char * description
Definition trace.h:36
_lf_trace_object_t type
Definition trace.h:35
Definition trace.h:39
int src_id
Definition trace.h:42
int64_t physical_time
Definition trace.h:46
int64_t extra_delay
Definition trace.h:48
int event_type
Definition trace.h:40
int dst_id
Definition trace.h:43
void * pointer
Definition trace.h:41
int64_t logical_time
Definition trace.h:44
void * trigger
Definition trace.h:47
int64_t microstep
Definition trace.h:45
Definition lf_core_version.h:28
void lf_tracing_global_init(char *process_name, char *process_names, int process_id, int max_num_local_threads)
Initialize the tracing module. Calling other API functions before calling this procedure is undefined...
Definition trace_impl.c:254
void lf_tracing_register_trace_event(object_description_t description)
Register a kind of trace event. This should be called before tracepoints are reached.
Definition trace_impl.c:211
void lf_tracing_set_start_time(int64_t start_time)
Give the tracing module access to the start time. This may be invoked after many tracepoints have alr...
Definition trace_impl.c:271
void lf_tracing_global_shutdown()
Shut down the tracing module. Calling other API functions after calling this procedure is undefined b...
Definition trace_impl.c:272
const version_t * lf_version_tracing()
Return a description of the compile-time properties of the current plugin.
Definition trace_impl.c:207
void lf_tracing_tracepoint(int worker, trace_record_nodeps_t *tr)
Submit a tracepoint from the given worker to the tracing module.
Definition trace_impl.c:222
_lf_trace_object_t
Definition trace.h:22
@ trace_trigger
Definition trace.h:24
@ trace_user
Definition trace.h:25
@ trace_reactor
Definition trace.h:23