reactor-c
1.0
C Runtime for Lingua Franca
Toggle main menu visibility
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
19
extern
"C"
{
20
#endif
21
22
#include <stdint.h>
23
#include <stdbool.h>
24
25
#include "lf_core_version.h"
26
31
const
version_t*
lf_version_tracing
();
32
37
typedef
enum
{
39
trace_reactor
,
40
42
trace_trigger
,
43
45
trace_user
46
}
_lf_trace_object_t
;
47
52
typedef
struct
object_description_t
object_description_t
;
53
struct
object_description_t
{
55
void
*
pointer
;
56
58
void
*
trigger
;
59
61
_lf_trace_object_t
type
;
62
64
char
*
description
;
65
};
66
71
typedef
struct
{
72
int
event_type
;
73
void
*
pointer
;
74
int
src_id
;
75
int
dst_id
;
76
int64_t
logical_time
;
77
int64_t
microstep
;
78
int64_t
physical_time
;
79
void
*
trigger
;
80
int64_t
extra_delay
;
81
}
trace_record_nodeps_t
;
82
97
void
lf_tracing_global_init
(
char
* process_name,
char
* process_names,
int
process_id,
int
max_num_local_threads);
98
108
void
lf_tracing_register_trace_event
(
object_description_t
description);
109
116
void
lf_tracing_set_start_time
(int64_t
start_time
);
117
122
void
lf_tracing_tracepoint
(
int
worker,
trace_record_nodeps_t
* tr);
123
130
void
lf_tracing_global_shutdown
();
131
132
#ifdef __cplusplus
133
}
134
#endif
135
136
#endif
// TRACE_H
lf_tracing_global_init
void lf_tracing_global_init(char *process_name, char *process_names, int process_id, int max_num_local_threads)
Initialize the tracing module.
lf_tracing_register_trace_event
void lf_tracing_register_trace_event(object_description_t description)
Register a kind of trace event.
lf_tracing_set_start_time
void lf_tracing_set_start_time(int64_t start_time)
Give the tracing module access to the start time.
lf_tracing_global_shutdown
void lf_tracing_global_shutdown()
Shut down the tracing module.
lf_version_tracing
const version_t * lf_version_tracing()
Return a description of the compile-time properties of the current plugin.
lf_tracing_tracepoint
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
_lf_trace_object_t
Identifier for what is in the object table.
Definition
trace.h:37
trace_trigger
@ trace_trigger
A trigger (timer or action), identified by its trigger pointer.
Definition
trace.h:42
trace_user
@ trace_user
A user-defined trace object.
Definition
trace.h:45
trace_reactor
@ trace_reactor
A reactor instance, identified by its self struct pointer.
Definition
trace.h:39
object_description_t
Definition
trace.h:53
object_description_t::pointer
void * pointer
Pointer-sized value that uniquely identifies the object.
Definition
trace.h:55
object_description_t::trigger
void * trigger
Pointer to the trigger (action or timer) or other secondary ID.
Definition
trace.h:58
object_description_t::description
char * description
A NULL terminated string describing the object.
Definition
trace.h:64
object_description_t::type
_lf_trace_object_t type
The type of trace object.
Definition
trace.h:61
trace_record_nodeps_t
Trace record without dependencies.
Definition
trace.h:71
trace_record_nodeps_t::src_id
int src_id
Definition
trace.h:74
trace_record_nodeps_t::physical_time
int64_t physical_time
Definition
trace.h:78
trace_record_nodeps_t::extra_delay
int64_t extra_delay
Definition
trace.h:80
trace_record_nodeps_t::event_type
int event_type
Definition
trace.h:72
trace_record_nodeps_t::dst_id
int dst_id
Definition
trace.h:75
trace_record_nodeps_t::pointer
void * pointer
Definition
trace.h:73
trace_record_nodeps_t::logical_time
int64_t logical_time
Definition
trace.h:76
trace_record_nodeps_t::trigger
void * trigger
Definition
trace.h:79
trace_record_nodeps_t::microstep
int64_t microstep
Definition
trace.h:77
start_time
instant_t start_time
Users
runner
work
reactor-c
reactor-c
trace
api
trace.h
Generated on
for reactor-c by
1.17.0