projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clarify and simplify the Java agent "Hello" examples
[lttng-ust.git]
/
liblttng-ust
/
lttng-ring-buffer-metadata-client.h
diff --git
a/liblttng-ust/lttng-ring-buffer-metadata-client.h
b/liblttng-ust/lttng-ring-buffer-metadata-client.h
index 8d725f2a8e1e7622a854a8a4867f031e99aaf55f..f3c4a67c8843ea0e9514ff994e04ed16ef979c08 100644
(file)
--- a/
liblttng-ust/lttng-ring-buffer-metadata-client.h
+++ b/
liblttng-ust/lttng-ring-buffer-metadata-client.h
@@
-52,7
+52,7
@@
static inline uint64_t lib_ring_buffer_clock_read(struct channel *chan)
}
static inline
}
static inline
-
unsigned char
record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
+
size_t
record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
struct channel *chan, size_t offset,
size_t *pre_header_padding,
struct lttng_ust_lib_ring_buffer_ctx *ctx)
struct channel *chan, size_t offset,
size_t *pre_header_padding,
struct lttng_ust_lib_ring_buffer_ctx *ctx)
@@
-101,6
+101,9
@@
static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t
handle);
struct lttng_channel *lttng_chan = channel_get_private(chan);
handle);
struct lttng_channel *lttng_chan = channel_get_private(chan);
+ assert(header);
+ if (!header)
+ return;
header->magic = TSDL_MAGIC_NUMBER;
memcpy(header->uuid, lttng_chan->uuid, sizeof(lttng_chan->uuid));
header->checksum = 0; /* 0 if unused */
header->magic = TSDL_MAGIC_NUMBER;
memcpy(header->uuid, lttng_chan->uuid, sizeof(lttng_chan->uuid));
header->checksum = 0; /* 0 if unused */
@@
-129,6
+132,9
@@
static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts
handle);
unsigned long records_lost = 0;
handle);
unsigned long records_lost = 0;
+ assert(header);
+ if (!header)
+ return;
header->content_size = data_size * CHAR_BIT; /* in bits */
header->packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */
/*
header->content_size = data_size * CHAR_BIT; /* in bits */
header->packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */
/*
@@
-200,7
+206,7
@@
struct lttng_channel *_channel_create(const char *name,
unsigned int read_timer_interval,
unsigned char *uuid,
uint32_t chan_id,
unsigned int read_timer_interval,
unsigned char *uuid,
uint32_t chan_id,
- const
char *shm_path
)
+ const
int *stream_fds, int nr_stream_fds
)
{
struct lttng_channel chan_priv_init;
struct lttng_ust_shm_handle *handle;
{
struct lttng_channel chan_priv_init;
struct lttng_ust_shm_handle *handle;
@@
-216,7
+222,7
@@
struct lttng_channel *_channel_create(const char *name,
&chan_priv_init,
buf_addr, subbuf_size, num_subbuf,
switch_timer_interval, read_timer_interval,
&chan_priv_init,
buf_addr, subbuf_size, num_subbuf,
switch_timer_interval, read_timer_interval,
- s
hm_path
);
+ s
tream_fds, nr_stream_fds
);
if (!handle)
return NULL;
lttng_chan = priv;
if (!handle)
return NULL;
lttng_chan = priv;
This page took
0.024115 seconds
and
4
git commands to generate.