Reputation: 1
I' using lttng to trace the execution of a program and compute the average exectuion time of some functions. As there are millions of traces generated, Python bindings for babeltrace result to be really slow analysing them.
I was wondering if it is possible to read the traces using the libbabeltrace library on a C program for a faster analysis, since I wasn't able to find much documentation regarding the API and its usage. I'd be interested on extracting the timestamp and two fields of each event. I use Babeltrace 2.0.0-pre4.
Furthermore, what I did found about libbabeltrace is http://mcs.une.edu.au/doc/libbabeltrace/API.txt.
Considering this, I wrote a simple program to start with and create a context of the trace:
#include <stdio.h>
#include <babeltrace/context.h>
int main(void){
struct bt_context *ctx = bt_context_create();
int a = bt_context_add_trace(ctx, "./CTF/TRACE/PATH", "ctf", NULL, NULL, NULL);
return a;
}
However, I get the following error:
[error] [Context] Format "ctf" unknown.
Can someone help me with this?
Thanks in advance
Upvotes: 0
Views: 348