X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=libust%2Ftracectl.c;h=f9d035dd84277b56df856430d7c6cab1482e0c76;hb=00c475d60474005a643313f8f80f23ac908d8ae4;hp=d6726d4fc53290ffcd7d7b05cc6ed062d8d32e0a;hpb=0b2026f29acabd8676db5272f9149769ecb18d69;p=ust.git diff --git a/libust/tracectl.c b/libust/tracectl.c index d6726d4..f9d035d 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -27,7 +27,7 @@ #include #include -#include +#include #include "marker.h" #include "tracer.h" @@ -121,7 +121,7 @@ static void print_markers(FILE *fp) marker_iter_start(&iter); while(iter.marker) { - fprintf(fp, "marker: %s_%s %d \"%s\"\n", iter.marker->channel, iter.marker->name, (int)imv_read(iter.marker->state), iter.marker->format); + fprintf(fp, "marker: %s/%s %d \"%s\"\n", iter.marker->channel, iter.marker->name, (int)imv_read(iter.marker->state), iter.marker->format); marker_iter_next(&iter); } unlock_markers(); @@ -772,7 +772,7 @@ void *listener_main(void *p) } } -int have_listener = 0; +volatile sig_atomic_t have_listener = 0; void create_listener(void) { @@ -1006,13 +1006,15 @@ static void __attribute__((constructor(1000))) init() return; } - inform_consumer_daemon(trace_name); - result = ltt_trace_start(trace_name); if(result < 0) { ERR("ltt_trace_start failed"); return; } + + /* Do this after the trace is started in order to avoid creating confusion + * if the trace fails to start. */ + inform_consumer_daemon(trace_name); } @@ -1126,7 +1128,7 @@ static void __attribute__((destructor)) keepalive() ustcomm_fini_app(&ustcomm_app); } -void ust_potential_exec(void) +noinline void ust_potential_exec(void) { trace_mark(ust, potential_exec, MARK_NOARGS); @@ -1139,7 +1141,7 @@ void ust_potential_exec(void) * of the new process will not be collected. */ -void ust_fork(void) +noinline void ust_fork(void) { struct blocked_consumer *bc; struct blocked_consumer *deletable_bc = NULL;