projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tests: list ust-elf test data explicitly in EXTRA_DIST
[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 921549faff4c8cc95ff5e3afe2c41aa653cc4c1c..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 */
/*
This page took
0.033577 seconds
and
4
git commands to generate.