]> git.lttng.org Git - lttng-ust.git/commitdiff
Fix: Expand the shmobj size for the sequence number
authorLiguang Li <liguang.li@windriver.com>
Thu, 22 Jun 2017 08:56:29 +0000 (16:56 +0800)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Jun 2017 15:36:52 +0000 (11:36 -0400)
This patch fixes a bug which was introduced by:
1ff31389b ("Generate and export the sequence number")

Signed-off-by: Liguang Li <liguang.li@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/ring_buffer_backend.c

index 961f118a088f587ed60172d265d6c09c578b5106..2a181ef8be94910ca838bd9ec880c148c7a4253b 100644 (file)
@@ -118,7 +118,7 @@ int lib_ring_buffer_backend_allocate(const struct lttng_ust_lib_ring_buffer_conf
                bufb->buf_rsb.id = subbuffer_id(config, 0, 1, 0);
 
        /* Allocate subbuffer packet counter table */
-       align_shm(shmobj, __alignof__(struct lttng_ust_lib_ring_buffer_backend_subbuffer));
+       align_shm(shmobj, __alignof__(struct lttng_ust_lib_ring_buffer_backend_counts));
        set_shmp(bufb->buf_cnt, zalloc_shm(shmobj,
                                sizeof(struct lttng_ust_lib_ring_buffer_backend_counts)
                                * num_subbuf));
@@ -333,6 +333,8 @@ int channel_backend_init(struct channel_backend *chanb,
        shmsize += sizeof(struct lttng_ust_lib_ring_buffer_backend_pages) * num_subbuf_alloc;
        shmsize += offset_align(shmsize, __alignof__(struct lttng_ust_lib_ring_buffer_backend_subbuffer));
        shmsize += sizeof(struct lttng_ust_lib_ring_buffer_backend_subbuffer) * num_subbuf;
+       shmsize += offset_align(shmsize, __alignof__(struct lttng_ust_lib_ring_buffer_backend_counts));
+       shmsize += sizeof(struct lttng_ust_lib_ring_buffer_backend_counts) * num_subbuf;
        /* Per-cpu buffer size: control (after backend) */
        shmsize += offset_align(shmsize, __alignof__(struct commit_counters_hot));
        shmsize += sizeof(struct commit_counters_hot) * num_subbuf;
This page took 0.029737 seconds and 4 git commands to generate.