projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename LTTng index in CTF index
[lttng-tools.git]
/
src
/
common
/
consumer.c
diff --git
a/src/common/consumer.c
b/src/common/consumer.c
index 8aa8903490080c8a598e267339742dcf5f8d2bbe..341f8a7fe4ecf29a570b0d577156385242d64012 100644
(file)
--- a/
src/common/consumer.c
+++ b/
src/common/consumer.c
@@
-879,7
+879,6
@@
struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
channel->uid = uid;
channel->gid = gid;
channel->relayd_id = relayd_id;
channel->uid = uid;
channel->gid = gid;
channel->relayd_id = relayd_id;
- channel->output = output;
channel->tracefile_size = tracefile_size;
channel->tracefile_count = tracefile_count;
channel->monitor = monitor;
channel->tracefile_size = tracefile_size;
channel->tracefile_count = tracefile_count;
channel->monitor = monitor;
@@
-887,6
+886,20
@@
struct lttng_consumer_channel *consumer_allocate_channel(uint64_t key,
pthread_mutex_init(&channel->lock, NULL);
pthread_mutex_init(&channel->timer_lock, NULL);
pthread_mutex_init(&channel->lock, NULL);
pthread_mutex_init(&channel->timer_lock, NULL);
+ switch (output) {
+ case LTTNG_EVENT_SPLICE:
+ channel->output = CONSUMER_CHANNEL_SPLICE;
+ break;
+ case LTTNG_EVENT_MMAP:
+ channel->output = CONSUMER_CHANNEL_MMAP;
+ break;
+ default:
+ assert(0);
+ free(channel);
+ channel = NULL;
+ goto end;
+ }
+
/*
* In monitor mode, the streams associated with the channel will be put in
* a special list ONLY owned by this channel. So, the refcount is set to 1
/*
* In monitor mode, the streams associated with the channel will be put in
* a special list ONLY owned by this channel. So, the refcount is set to 1
@@
-1341,7
+1354,7
@@
ssize_t lttng_consumer_on_read_subbuffer_mmap(
struct lttng_consumer_local_data *ctx,
struct lttng_consumer_stream *stream, unsigned long len,
unsigned long padding,
struct lttng_consumer_local_data *ctx,
struct lttng_consumer_stream *stream, unsigned long len,
unsigned long padding,
- struct
lttng
_packet_index *index)
+ struct
ctf
_packet_index *index)
{
unsigned long mmap_offset;
void *mmap_base;
{
unsigned long mmap_offset;
void *mmap_base;
@@
-1549,7
+1562,7
@@
ssize_t lttng_consumer_on_read_subbuffer_splice(
struct lttng_consumer_local_data *ctx,
struct lttng_consumer_stream *stream, unsigned long len,
unsigned long padding,
struct lttng_consumer_local_data *ctx,
struct lttng_consumer_stream *stream, unsigned long len,
unsigned long padding,
- struct
lttng
_packet_index *index)
+ struct
ctf
_packet_index *index)
{
ssize_t ret = 0, written = 0, ret_splice = 0;
loff_t offset = 0;
{
ssize_t ret = 0, written = 0, ret_splice = 0;
loff_t offset = 0;
@@
-3226,7
+3239,7
@@
int consumer_add_relayd_socket(uint64_t net_seq_idx, int sock_type,
uint64_t relayd_session_id)
{
int fd = -1, ret = -1, relayd_created = 0;
uint64_t relayd_session_id)
{
int fd = -1, ret = -1, relayd_created = 0;
- enum ltt
ng_error_code ret_code = LTTNG_OK
;
+ enum ltt
comm_return_code ret_code = LTTCOMM_CONSUMERD_SUCCESS
;
struct consumer_relayd_sock_pair *relayd = NULL;
assert(ctx);
struct consumer_relayd_sock_pair *relayd = NULL;
assert(ctx);
@@
-3262,7
+3275,7
@@
int consumer_add_relayd_socket(uint64_t net_seq_idx, int sock_type,
}
/* First send a status message before receiving the fds. */
}
/* First send a status message before receiving the fds. */
- ret = consumer_send_status_msg(sock, LTT
NG_OK
);
+ ret = consumer_send_status_msg(sock, LTT
COMM_CONSUMERD_SUCCESS
);
if (ret < 0) {
/* Somehow, the session daemon is not responding anymore. */
lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_FATAL);
if (ret < 0) {
/* Somehow, the session daemon is not responding anymore. */
lttng_consumer_send_error(ctx, LTTCOMM_CONSUMERD_FATAL);
@@
-3623,9
+3636,9
@@
int consumer_send_status_channel(int sock,
assert(sock >= 0);
if (!channel) {
assert(sock >= 0);
if (!channel) {
- msg.ret_code =
-LTTNG_ERR_UST_CHAN
_FAIL;
+ msg.ret_code =
LTTCOMM_CONSUMERD_CHANNEL
_FAIL;
} else {
} else {
- msg.ret_code = LTT
NG_OK
;
+ msg.ret_code = LTT
COMM_CONSUMERD_SUCCESS
;
msg.key = channel->key;
msg.stream_count = channel->streams.count;
}
msg.key = channel->key;
msg.stream_count = channel->streams.count;
}
This page took
0.024175 seconds
and
4
git commands to generate.