From 0f03a01ca328b354e812751b2b307f244fcc463b Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Mon, 9 May 2016 14:26:07 -0700 Subject: Frameworks/base: Make profile buffer adjustable Add a debug system property to change the profile buffer size. Bug: 26877591 Change-Id: Idd13f2bc6563fd88daadd1d6679f3243dab1a0ef --- core/java/android/app/ActivityThread.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java index cf2ef4521291..938339410416 100644 --- a/core/java/android/app/ActivityThread.java +++ b/core/java/android/app/ActivityThread.java @@ -557,8 +557,9 @@ public final class ActivityThread { return; } try { + int bufferSize = SystemProperties.getInt("debug.traceview-buffer-size-in-mb", 8); VMDebug.startMethodTracing(profileFile, profileFd.getFileDescriptor(), - 8 * 1024 * 1024, 0, samplingInterval != 0, samplingInterval); + bufferSize * 1024 * 1024, 0, samplingInterval != 0, samplingInterval); profiling = true; } catch (RuntimeException e) { Slog.w(TAG, "Profiling failed on path " + profileFile); -- cgit v1.2.3-59-g8ed1b