diff options
| author | Man Cao <manc@google.com> | 2015-06-11 20:14:34 -0700 |
|---|---|---|
| committer | Man Cao <manc@google.com> | 2015-06-24 13:29:29 -0700 |
| commit | cfa78b2080e590ca3b28dbf59e6d6f6e7ece7764 (patch) | |
| tree | 0d368991bb80d010cb68d4cae36f67aa3eb03701 /core/java/android/app/ApplicationThreadNative.java | |
| parent | 5acb30de6f65ff9ab47138b022a724ec489bdd9d (diff) | |
Add an AM option to start with allocation tracking
The new option "--track-allocation" is to work with the new
allocation tracker in ART.
Bug:20037135
Change-Id: Ic5f8945ab4c1f167c27b05ad0d11d04bac680c1f
Diffstat (limited to 'core/java/android/app/ApplicationThreadNative.java')
| -rw-r--r-- | core/java/android/app/ApplicationThreadNative.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/java/android/app/ApplicationThreadNative.java b/core/java/android/app/ApplicationThreadNative.java index eb3ddb28c367..6c8b182feb8e 100644 --- a/core/java/android/app/ApplicationThreadNative.java +++ b/core/java/android/app/ApplicationThreadNative.java @@ -284,6 +284,7 @@ public abstract class ApplicationThreadNative extends Binder IUiAutomationConnection.Stub.asInterface(binder); int testMode = data.readInt(); boolean openGlTrace = data.readInt() != 0; + boolean trackAllocation = data.readInt() != 0; boolean restrictedBackupMode = (data.readInt() != 0); boolean persistent = (data.readInt() != 0); Configuration config = Configuration.CREATOR.createFromParcel(data); @@ -291,7 +292,7 @@ public abstract class ApplicationThreadNative extends Binder HashMap<String, IBinder> services = data.readHashMap(null); Bundle coreSettings = data.readBundle(); bindApplication(packageName, info, providers, testName, profilerInfo, testArgs, - testWatcher, uiAutomationConnection, testMode, openGlTrace, + testWatcher, uiAutomationConnection, testMode, openGlTrace, trackAllocation, restrictedBackupMode, persistent, config, compatInfo, services, coreSettings); return true; } @@ -961,13 +962,14 @@ class ApplicationThreadProxy implements IApplicationThread { data.recycle(); } + @Override public final void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo, Bundle testArgs, IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, int debugMode, - boolean openGlTrace, boolean restrictedBackupMode, boolean persistent, - Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services, - Bundle coreSettings) throws RemoteException { + boolean openGlTrace, boolean trackAllocation, boolean restrictedBackupMode, + boolean persistent, Configuration config, CompatibilityInfo compatInfo, + Map<String, IBinder> services, Bundle coreSettings) throws RemoteException { Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeString(packageName); @@ -990,6 +992,7 @@ class ApplicationThreadProxy implements IApplicationThread { data.writeStrongInterface(uiAutomationConnection); data.writeInt(debugMode); data.writeInt(openGlTrace ? 1 : 0); + data.writeInt(trackAllocation ? 1 : 0); data.writeInt(restrictedBackupMode ? 1 : 0); data.writeInt(persistent ? 1 : 0); config.writeToParcel(data, 0); |
