projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ust_fork(): reset buffers_to_export to 0 when forking
[lttng-ust.git]
/
libust
/
tracectl.c
diff --git
a/libust/tracectl.c
b/libust/tracectl.c
index af0149a5cb82a9d41c59c253ff6343a5d7f2d028..220d37f6f0bb347b22587c98bbcee6ee6e0857cf 100644
(file)
--- a/
libust/tracectl.c
+++ b/
libust/tracectl.c
@@
-357,10
+357,7
@@
static int do_cmd_get_shmid(const char *recvbuf, struct ustcomm_source *src)
}
}
}
}
- if(found) {
- buffers_to_export--;
- }
- else {
+ if(!found) {
ERR("channel not found (%s)", channel_and_cpu);
}
ERR("channel not found (%s)", channel_and_cpu);
}
@@
-695,6
+692,14
@@
static int do_cmd_get_subbuffer(const char *recvbuf, struct ustcomm_source *src)
list_add(&bc->list, &blocked_consumers);
list_add(&bc->list, &blocked_consumers);
+ /* Being here is the proof the daemon has mapped the buffer in its
+ * memory. We may now decrement buffers_to_export.
+ */
+ if(atomic_long_read(&buf->consumed) == 0) {
+ DBG("decrementing buffers_to_export");
+ buffers_to_export--;
+ }
+
break;
}
}
break;
}
}
@@
-1473,9
+1478,10
@@
static void ust_fork(void)
list_del(&bc->list);
}
list_del(&bc->list);
}
+ buffers_to_export = 0;
have_listener = 0;
have_listener = 0;
- create_listener();
init_socket();
init_socket();
+ create_listener();
ltt_trace_setup("auto");
result = ltt_trace_set_type("auto", "ustrelay");
if(result < 0) {
ltt_trace_setup("auto");
result = ltt_trace_set_type("auto", "ustrelay");
if(result < 0) {
This page took
0.026517 seconds
and
4
git commands to generate.