projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change wfq usages for wfcq
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
main.c
diff --git
a/src/bin/lttng-relayd/main.c
b/src/bin/lttng-relayd/main.c
index 93b08fcaa4a32cddfb4deef66682e8a1b8ae6135..a3b8016db46d157dc44f478553011f489b60c591 100644
(file)
--- a/
src/bin/lttng-relayd/main.c
+++ b/
src/bin/lttng-relayd/main.c
@@
-251,7
+251,10
@@
int set_option(int opt, const char *arg, const char *optname)
if (arg) {
lttng_opt_verbose = config_parse_value(arg);
} else {
if (arg) {
lttng_opt_verbose = config_parse_value(arg);
} else {
- lttng_opt_verbose += 1;
+ /* Only 3 level of verbosity (-vvv). */
+ if (lttng_opt_verbose < 3) {
+ lttng_opt_verbose += 1;
+ }
}
break;
default:
}
break;
default:
@@
-879,11
+882,12
@@
restart:
new_conn->sock = newsock;
/* Enqueue request for the dispatcher thread. */
new_conn->sock = newsock;
/* Enqueue request for the dispatcher thread. */
- cds_wfq_enqueue(&relay_conn_queue.queue, &new_conn->qnode);
+ cds_wfcq_enqueue(&relay_conn_queue.head, &relay_conn_queue.tail,
+ &new_conn->qnode);
/*
* Wake the dispatch queue futex. Implicit memory barrier with
/*
* Wake the dispatch queue futex. Implicit memory barrier with
- * the exchange in cds_wfq_enqueue.
+ * the exchange in cds_wf
c
q_enqueue.
*/
futex_nto1_wake(&relay_conn_queue.futex);
}
*/
futex_nto1_wake(&relay_conn_queue.futex);
}
@@
-930,7
+934,7
@@
void *relay_thread_dispatcher(void *data)
{
int err = -1;
ssize_t ret;
{
int err = -1;
ssize_t ret;
- struct cds_wfq_node *node;
+ struct cds_wf
c
q_node *node;
struct relay_connection *new_conn = NULL;
DBG("[thread] Relay dispatcher started");
struct relay_connection *new_conn = NULL;
DBG("[thread] Relay dispatcher started");
@@
-953,7
+957,8
@@
void *relay_thread_dispatcher(void *data)
health_code_update();
/* Dequeue commands */
health_code_update();
/* Dequeue commands */
- node = cds_wfq_dequeue_blocking(&relay_conn_queue.queue);
+ node = cds_wfcq_dequeue_blocking(&relay_conn_queue.head,
+ &relay_conn_queue.tail);
if (node == NULL) {
DBG("Woken up but nothing in the relay command queue");
/* Continue thread execution */
if (node == NULL) {
DBG("Woken up but nothing in the relay command queue");
/* Continue thread execution */
@@
-1202,6
+1207,7
@@
int relay_add_stream(struct lttcomm_relayd_hdr *recv_hdr,
stream->session_id = session->id;
stream->index_fd = -1;
stream->read_index_fd = -1;
stream->session_id = session->id;
stream->index_fd = -1;
stream->read_index_fd = -1;
+ stream->ctf_stream_id = -1ULL;
lttng_ht_node_init_u64(&stream->node, stream->stream_handle);
pthread_mutex_init(&stream->lock, NULL);
lttng_ht_node_init_u64(&stream->node, stream->stream_handle);
pthread_mutex_init(&stream->lock, NULL);
@@
-1960,6
+1966,9
@@
int relay_recv_index(struct lttcomm_relayd_hdr *recv_hdr,
}
copy_index_control_data(index, &index_info);
}
copy_index_control_data(index, &index_info);
+ if (stream->ctf_stream_id == -1ULL) {
+ stream->ctf_stream_id = be64toh(index_info.stream_id);
+ }
if (index_created) {
/*
if (index_created) {
/*
@@
-2755,7
+2764,7
@@
int main(int argc, char **argv)
}
/* Init relay command queue. */
}
/* Init relay command queue. */
- cds_wf
q_init(&relay_conn_queue.queue
);
+ cds_wf
cq_init(&relay_conn_queue.head, &relay_conn_queue.tail
);
/* Set up max poll set size */
lttng_poll_set_max_size();
/* Set up max poll set size */
lttng_poll_set_max_size();
This page took
0.027791 seconds
and
5
git commands to generate.