Add basic tracing lib files

This commit is contained in:
Christophe Bedard 2019-05-16 12:54:01 +02:00
parent 7c51d23850
commit 5583fa68d1
4 changed files with 67 additions and 0 deletions

3
tracetools/src/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
# generated files (LTTng)
tp_call.c
tp_call.h

14
tracetools/src/status.c Normal file
View file

@ -0,0 +1,14 @@
#include <stdio.h>
#include "tracetools/tracetools.h"
int main()
{
printf("Tracing ");
if (ros_trace_compile_status()) {
printf("enabled\n");
return 0;
} else {
printf("disabled\n");
return 1;
}
}

View file

@ -0,0 +1,20 @@
#include "tracetools/tracetools.h"
#ifdef WITH_LTTNG
#include "tp_call.h"
#endif
bool ros_trace_compile_status() {
#ifdef WITH_LTTNG
return true;
#else
return false;
#endif
}
void ros_trace_rcl_init() {
#ifdef WITH_LTTNG
tracepoint(ros2, rcl_init);
#endif
}