Merge "Frameworks/base: Make profile buffer adjustable" into nyc-dev

am: a2723ca88c

* commit 'a2723ca88c630f62ac413e562fe335b5fc623f1c':
  Frameworks/base: Make profile buffer adjustable

Change-Id: Ica4a50834a2b1da2644e85d28ee1e7196c3feb2b
This commit is contained in:
Andreas Gampe
2016-05-10 04:30:22 +00:00
committed by android-build-merger

View File

@@ -557,8 +557,9 @@ public final class ActivityThread {
return; return;
} }
try { try {
int bufferSize = SystemProperties.getInt("debug.traceview-buffer-size-in-mb", 8);
VMDebug.startMethodTracing(profileFile, profileFd.getFileDescriptor(), VMDebug.startMethodTracing(profileFile, profileFd.getFileDescriptor(),
8 * 1024 * 1024, 0, samplingInterval != 0, samplingInterval); bufferSize * 1024 * 1024, 0, samplingInterval != 0, samplingInterval);
profiling = true; profiling = true;
} catch (RuntimeException e) { } catch (RuntimeException e) {
Slog.w(TAG, "Profiling failed on path " + profileFile); Slog.w(TAG, "Profiling failed on path " + profileFile);