pipewire/spa/plugins
Barnabás Pőcze e2287f35db spa: support: loop: move struct members
Move the boolean members of `struct source_impl` to the end
of the struct. This changes the size of the struct from
104 bytes to 96 bytes on x86-64.

Before:

struct source_impl {
        struct spa_source          source;               /*     0    48 */
        struct impl *              impl;                 /*    48     8 */
        struct spa_list            link;                 /*    56    16 */
        /* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
        _Bool                      close;                /*    72     1 */

        /* XXX 7 bytes hole, try to pack */

        union {
                spa_source_io_func_t io;                 /*    80     8 */
                spa_source_idle_func_t idle;             /*    80     8 */
                spa_source_event_func_t event;           /*    80     8 */
                spa_source_timer_func_t timer;           /*    80     8 */
                spa_source_signal_func_t signal;         /*    80     8 */
        } func;                                          /*    80     8 */
        _Bool                      enabled;              /*    88     1 */

        /* XXX 7 bytes hole, try to pack */

        struct spa_source *        fallback;             /*    96     8 */

        /* size: 104, cachelines: 2, members: 7 */
        /* sum members: 90, holes: 2, sum holes: 14 */
        /* last cacheline: 40 bytes */
};

After:

struct source_impl {
        struct spa_source          source;               /*     0    48 */
        struct impl *              impl;                 /*    48     8 */
        struct spa_list            link;                 /*    56    16 */
        /* --- cacheline 1 boundary (64 bytes) was 8 bytes ago --- */
        union {
                spa_source_io_func_t io;                 /*    72     8 */
                spa_source_idle_func_t idle;             /*    72     8 */
                spa_source_event_func_t event;           /*    72     8 */
                spa_source_timer_func_t timer;           /*    72     8 */
                spa_source_signal_func_t signal;         /*    72     8 */
        } func;                                          /*    72     8 */
        struct spa_source *        fallback;             /*    80     8 */
        _Bool                      close;                /*    88     1 */
        _Bool                      enabled;              /*    89     1 */

        /* size: 96, cachelines: 2, members: 7 */
        /* padding: 6 */
        /* last cacheline: 32 bytes */
};
2022-03-06 18:40:43 +00:00
..
aec fix compilation 2022-02-17 16:11:22 +01:00
alsa alsa: improve latency update 2022-03-04 17:21:17 +01:00
audioconvert channelmix: improve disabled flag 2022-03-04 17:21:11 +01:00
audiomixer spa: clamp required alignment to cpu alignment 2022-01-28 11:49:06 +01:00
audiotestsrc Use configured quantum_limit instead of hardcoded value 2022-01-12 17:50:12 +01:00
bluez5 bluez5: a2dp-sink: stop flushing if source was removed 2022-03-06 16:47:25 +02:00
control buffers: make alignment optional 2022-01-03 12:32:26 +01:00
ffmpeg treewide: meson.build: use dependency variable for SPA 2021-12-28 18:34:06 +01:00
jack buffers: make alignment optional 2022-01-03 12:32:26 +01:00
libcamera buffers: make alignment optional 2022-01-03 12:32:26 +01:00
support spa: support: loop: move struct members 2022-03-06 18:40:43 +00:00
test buffers: make alignment optional 2022-01-03 12:32:26 +01:00
v4l2 meson: enable some more warnings 2022-01-27 11:07:17 +01:00
videoconvert buffers: make alignment optional 2022-01-03 12:32:26 +01:00
videotestsrc buffers: make alignment optional 2022-01-03 12:32:26 +01:00
volume Use configured quantum_limit instead of hardcoded value 2022-01-12 17:50:12 +01:00
vulkan buffers: make alignment optional 2022-01-03 12:32:26 +01:00
meson.build module-echo-cancel: Move backends to dynamic libaries 2022-02-15 15:45:46 +00:00