reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
trace_util.h
Go to the documentation of this file.
1
32#define LF_TRACE
33#include "reactor.h"
34#include "trace.h"
35
39extern const char* trace_event_names[];
40
42#define _LF_TRACE_FAILURE(trace_file) \
43 do { \
44 fprintf(stderr, "ERROR: Access to trace file failed.\n"); \
45 fclose(trace_file); \
46 trace_file = NULL; \
47 exit(1); \
48 } while (0)
49
51#define BUFFER_SIZE 1024
52
54extern trace_record_t trace[];
55
57extern FILE* trace_file;
58
60extern FILE* output_file;
61
63extern FILE* summary_file;
64
68void usage();
69
72
75extern int object_table_size;
76
78extern char* top_level;
79
88char* root_name(const char* path);
89
97FILE* open_file(const char* path, const char* mode);
98
110char* get_object_description(void* reactor, int* index);
111
121char* get_trigger_name(void* trigger, int* index);
122
126void print_table();
127
132size_t read_header();
133
139int read_trace();
Definitions for the C target of Lingua Franca shared by threaded and unthreaded versions.
Definition trace.h:32
int64_t instant_t
Definition tag.h:63
FILE * open_file(const char *path, const char *mode)
Open the specified file for reading or writing. This function records the file for closing at termina...
Definition trace_util.c:110
char * get_object_description(void *reactor, int *index)
Definition trace_util.c:139
instant_t start_time
Definition tag.c:33
FILE * output_file
Definition trace_to_chrome.c:53
void usage()
Definition trace_to_chrome.c:58
object_description_t * object_table
Definition trace_util.c:55
FILE * trace_file
Definition trace_to_chrome.c:50
int read_trace()
Definition trace_util.c:272
int object_table_size
Definition trace_util.c:56
size_t read_header()
Definition trace_util.c:202
char * root_name(const char *path)
Return the root file name from the given path. Given a path to a file, this function returns a dynami...
Definition trace_util.c:89
char * get_trigger_name(void *trigger, int *index)
Definition trace_util.c:164
char * top_level
Definition trace_util.c:51
trace_record_t trace[]
Definition trace_util.c:45
FILE * summary_file
Definition trace_to_csv.c:50
void print_table()
Definition trace_util.c:183
const char * trace_event_names[]