X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;ds=sidebyside;f=libust%2Ftracectl.c;h=2d4341d3b418cd4957b8ab2efc95fbf564f6520e;hb=c5fdc88852bc232e24fb3941ea5d5719b4490a87;hp=f9d035dd84277b56df856430d7c6cab1482e0c76;hpb=00c475d60474005a643313f8f80f23ac908d8ae4;p=lttng-ust.git diff --git a/libust/tracectl.c b/libust/tracectl.c index f9d035dd..2d4341d3 100644 --- a/libust/tracectl.c +++ b/libust/tracectl.c @@ -63,10 +63,6 @@ struct tracecmd { /* no padding */ /* volatile because shared between the listener and the main thread */ volatile sig_atomic_t buffers_to_export = 0; -//struct listener_arg { -// int pipe_fd; -//}; - struct trctl_msg { /* size: the size of all the fields except size itself */ uint32_t size; @@ -778,15 +774,18 @@ void create_listener(void) { #ifdef USE_CLONE static char listener_stack[16384]; + int result; #else pthread_t thread; #endif - if(have_listener) + if(have_listener) { + WARN("not creating listener because we already had one"); return; + } #ifdef USE_CLONE - result = clone(listener_main, listener_stack+sizeof(listener_stack)-1, CLONE_FS | CLONE_FILES | CLONE_VM | CLONE_SIGHAND | CLONE_THREAD, NULL); + result = clone((int (*)(void *)) listener_main, listener_stack+sizeof(listener_stack)-1, CLONE_FS | CLONE_FILES | CLONE_VM | CLONE_SIGHAND | CLONE_THREAD, NULL); if(result == -1) { perror("clone"); return; @@ -892,7 +891,7 @@ static void auto_probe_connect(struct marker *m) } -static void __attribute__((constructor(1000))) init() +static void __attribute__((constructor)) init() { int result; char* autoprobe_val = NULL; @@ -1128,10 +1127,12 @@ static void __attribute__((destructor)) keepalive() ustcomm_fini_app(&ustcomm_app); } -noinline void ust_potential_exec(void) +void ust_potential_exec(void) { trace_mark(ust, potential_exec, MARK_NOARGS); + DBG("test"); + keepalive(); } @@ -1141,7 +1142,7 @@ noinline void ust_potential_exec(void) * of the new process will not be collected. */ -noinline void ust_fork(void) +void ust_fork(void) { struct blocked_consumer *bc; struct blocked_consumer *deletable_bc = NULL;