projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
marker: remove printf and add debug msg
[lttng-ust.git]
/
libust
/
tracectl.c
diff --git
a/libust/tracectl.c
b/libust/tracectl.c
index a68dc7bd7e9e4a1684d753b6be5ce9da24d4f2a5..97ab2eb1fb768433c4561733dcfded9b25cee235 100644
(file)
--- a/
libust/tracectl.c
+++ b/
libust/tracectl.c
@@
-26,6
+26,8
@@
#include <fcntl.h>
#include <poll.h>
#include <fcntl.h>
#include <poll.h>
+#include <urcu.h>
+
#include "marker.h"
#include "tracer.h"
#include "localerr.h"
#include "marker.h"
#include "tracer.h"
#include "localerr.h"
@@
-106,8
+108,13
@@
void do_command(struct tracecmd *cmd)
{
}
{
}
-void receive_commands()
+/* This needs to be called whenever a new thread is created. It notifies
+ * liburcu of the new thread.
+ */
+
+void ust_register_thread(void)
{
{
+ rcu_register_thread();
}
int fd_notif = -1;
}
int fd_notif = -1;
@@
-164,7
+171,8
@@
void process_blocked_consumers(void)
idx++;
}
idx++;
}
- result = poll(fds, n_fds, 0);
+ while((result = poll(fds, n_fds, 0)) == -1 && errno == EINTR)
+ /* nothing */;
if(result == -1) {
PERROR("poll");
return;
if(result == -1) {
PERROR("poll");
return;
@@
-223,6
+231,8
@@
void *listener_main(void *p)
{
int result;
{
int result;
+ ust_register_thread();
+
DBG("LISTENER");
for(;;) {
DBG("LISTENER");
for(;;) {
@@
-802,6
+812,12
@@
static void auto_probe_connect(struct marker *m)
static void __attribute__((constructor(101))) init0()
{
static void __attribute__((constructor(101))) init0()
{
+ /* Initialize RCU in case the constructor order is not good. */
+ urcu_init();
+
+ /* It is important to do this before events start to be generated. */
+ ust_register_thread();
+
DBG("UST_AUTOPROBE constructor");
if(getenv("UST_AUTOPROBE")) {
marker_set_new_marker_cb(auto_probe_connect);
DBG("UST_AUTOPROBE constructor");
if(getenv("UST_AUTOPROBE")) {
marker_set_new_marker_cb(auto_probe_connect);
This page took
0.026141 seconds
and
4
git commands to generate.