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

Commit d9381ac8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "system server: configure 4 MB perfetto shmem buffer" into main

parents 9433b813 9f337098
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -70,3 +70,11 @@ flag {
    is_fixed_read_only: true
    bug: "352538294"
}

flag {
    name: "system_server_large_perfetto_shmem_buffer"
    namespace: "windowing_tools"
    description: "Large perfetto shmem buffer"
    is_fixed_read_only: true
    bug: "382369925"
}
+7 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ import android.server.ServerProtoEnums;
import android.system.ErrnoException;
import android.system.Os;
import android.text.TextUtils;
import android.tracing.perfetto.InitArguments;
import android.util.ArrayMap;
import android.util.DisplayMetrics;
import android.util.Dumpable;
@@ -792,6 +793,12 @@ public final class SystemServer implements Dumpable {
    private void run() {
        TimingsTraceAndSlog t = new TimingsTraceAndSlog();
        try {
            if (android.tracing.Flags.systemServerLargePerfettoShmemBuffer()) {
                // Explicitly initialize a 4 MB shmem buffer for Perfetto producers (b/382369925)
                android.tracing.perfetto.Producer.init(new InitArguments(
                        InitArguments.PERFETTO_BACKEND_SYSTEM, 4 * 1024));
            }

            t.traceBegin("InitBeforeStartServices");

            // Record the process start information in sys props.