projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Namespace lttng/align.h macros
[lttng-ust.git]
/
liblttng-ust
/
lttng-ring-buffer-client.h
diff --git
a/liblttng-ust/lttng-ring-buffer-client.h
b/liblttng-ust/lttng-ring-buffer-client.h
index 0fae88787c8b263a93f29b865153f22aff7ca3cf..3233f199a210c694a6e9c712f6198d1ce383363e 100644
(file)
--- a/
liblttng-ust/lttng-ring-buffer-client.h
+++ b/
liblttng-ust/lttng-ring-buffer-client.h
@@
-20,6
+20,7
@@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <stddef.h>
#include <stdint.h>
#include <lttng/ust-events.h>
#include "lttng/bitfield.h"
#include <stdint.h>
#include <lttng/ust-events.h>
#include "lttng/bitfield.h"
@@
-473,7
+474,7
@@
static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts
header->ctx.content_size =
(uint64_t) data_size * CHAR_BIT; /* in bits */
header->ctx.packet_size =
header->ctx.content_size =
(uint64_t) data_size * CHAR_BIT; /* in bits */
header->ctx.packet_size =
- (uint64_t)
PAGE_ALIGN(data_size) * CHAR_BIT;
/* in bits */
+ (uint64_t)
LTTNG_UST_PAGE_ALIGN(data_size) * CHAR_BIT;
/* in bits */
records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf);
records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf);
records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf);
records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf);
@@
-580,12
+581,11
@@
static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf,
struct lttng_ust_shm_handle *handle,
uint64_t *stream_id)
{
struct lttng_ust_shm_handle *handle,
uint64_t *stream_id)
{
- struct packet_header *header;
+ struct channel *chan = shmp(handle, buf->backend.chan);
+ struct lttng_channel *lttng_chan = channel_get_private(chan);
+
+ *stream_id = lttng_chan->id;
- header = client_packet_header(buf, handle);
- if (!header)
- return -1;
- *stream_id = header->stream_id;
return 0;
}
return 0;
}
@@
-608,6
+608,8
@@
static int client_sequence_number(struct lttng_ust_lib_ring_buffer *buf,
struct packet_header *header;
header = client_packet_header(buf, handle);
struct packet_header *header;
header = client_packet_header(buf, handle);
+ if (!header)
+ return -1;
*seq = header->ctx.packet_seq_num;
return 0;
}
*seq = header->ctx.packet_seq_num;
return 0;
}
@@
-616,10
+618,8
@@
static int client_instance_id(struct lttng_ust_lib_ring_buffer *buf,
struct lttng_ust_shm_handle *handle,
uint64_t *id)
{
struct lttng_ust_shm_handle *handle,
uint64_t *id)
{
-
struct packet_header *header
;
+
*id = buf->backend.cpu
;
- header = client_packet_header(buf, handle);
- *id = header->stream_instance_id;
return 0;
}
return 0;
}
This page took
0.024904 seconds
and
4
git commands to generate.