Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fa6d2da authored by Kean Mariotti's avatar Kean Mariotti
Browse files

sysui: bump perfetto shmem buffer size to 1 MB

Increase Perfetto's shmem buffer from to 512 KB to 1 MB.

We observed that sysui can have >100 threads which is close
to the limit imposed by the current buffer size:
512KB -> 128 chunks -> max 128 threads writing to perfetto

Bug: b/420587648
Flag: android.tracing.sysui_large_perfetto_shmem_buffer
Test: presubmit
Change-Id: I745468b3296cd0e15896468d4687abc62bb92852
parent 27709754
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -86,12 +86,12 @@ public class SystemUIApplication extends Application implements
        super();
        if (!isSubprocess()) {
            if (android.tracing.Flags.sysuiLargePerfettoShmemBuffer()) {
                // Explicitly initialize a 512 KB shmem buffer for Perfetto producers (b/420587648).
                // This increases the Perfetto's shmem buffer from default size (256 KB) to 512 KB,
                // Explicitly initialize a 1MB shmem buffer for Perfetto producers (b/420587648).
                // This increases the Perfetto's shmem buffer from default size (256 KB) to 1MB,
                // thus avoiding crashes or packet loss caused by shmem chunks exhaustion when too
                // many threads are tracing data.
                android.tracing.perfetto.Producer.init(new InitArguments(
                        InitArguments.PERFETTO_BACKEND_SYSTEM, 512));
                        InitArguments.PERFETTO_BACKEND_SYSTEM, 1024));
            }
            Trace.registerWithPerfetto();
        }