Loading core/java/android/tracing/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -71,3 +71,11 @@ flag { is_fixed_read_only: true bug: "410517697" } flag { name: "sysui_large_perfetto_shmem_buffer" namespace: "windowing_tools" description: "Large perfetto shmem buffer in sysui" is_fixed_read_only: true bug: "420587648" } packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +9 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.content.res.Configuration; import android.os.Bundle; import android.os.Process; import android.os.Trace; import android.tracing.perfetto.InitArguments; import android.util.Log; import android.util.TimingsTraceLog; import android.view.SurfaceControl; Loading Loading @@ -84,6 +85,14 @@ public class SystemUIApplication extends Application implements public SystemUIApplication() { 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, // 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)); } Trace.registerWithPerfetto(); } Log.v(TAG, "SystemUIApplication constructed."); Loading Loading
core/java/android/tracing/flags.aconfig +8 −0 Original line number Diff line number Diff line Loading @@ -71,3 +71,11 @@ flag { is_fixed_read_only: true bug: "410517697" } flag { name: "sysui_large_perfetto_shmem_buffer" namespace: "windowing_tools" description: "Large perfetto shmem buffer in sysui" is_fixed_read_only: true bug: "420587648" }
packages/SystemUI/src/com/android/systemui/SystemUIApplication.java +9 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import android.content.res.Configuration; import android.os.Bundle; import android.os.Process; import android.os.Trace; import android.tracing.perfetto.InitArguments; import android.util.Log; import android.util.TimingsTraceLog; import android.view.SurfaceControl; Loading Loading @@ -84,6 +85,14 @@ public class SystemUIApplication extends Application implements public SystemUIApplication() { 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, // 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)); } Trace.registerWithPerfetto(); } Log.v(TAG, "SystemUIApplication constructed."); Loading