summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityManagerNative.java
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2011-07-21 14:56:34 -0700
committerRomain Guy <romainguy@google.com>2011-07-21 14:56:34 -0700
commit7eabe55db6b113f83c2cefcd06812648927de877 (patch)
treea105d90d8addbce9bb457b4bef974ce2f699fc81 /core/java/android/app/ActivityManagerNative.java
parentac4159549c10dbe428d42980278c0e43ecc8d93f (diff)
Add looper profiling to adb shell am
To profile the looper, run the following command: adb shell am profile looper start <process> <file> adb shell am profile looper stop <process> Change-Id: I781f156e473d7bdbb6d13aaffeeaae88bc01a69f
Diffstat (limited to 'core/java/android/app/ActivityManagerNative.java')
-rw-r--r--core/java/android/app/ActivityManagerNative.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/java/android/app/ActivityManagerNative.java b/core/java/android/app/ActivityManagerNative.java
index 2a731a3999fc..2178971a3453 100644
--- a/core/java/android/app/ActivityManagerNative.java
+++ b/core/java/android/app/ActivityManagerNative.java
@@ -1107,7 +1107,8 @@ public abstract class ActivityManagerNative extends Binder implements IActivityM
String path = data.readString();
ParcelFileDescriptor fd = data.readInt() != 0
? data.readFileDescriptor() : null;
- boolean res = profileControl(process, start, path, fd);
+ int profileType = data.readInt();
+ boolean res = profileControl(process, start, path, fd, profileType);
reply.writeNoException();
reply.writeInt(res ? 1 : 0);
return true;
@@ -2888,7 +2889,7 @@ class ActivityManagerProxy implements IActivityManager
}
public boolean profileControl(String process, boolean start,
- String path, ParcelFileDescriptor fd) throws RemoteException
+ String path, ParcelFileDescriptor fd, int profileType) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
@@ -2902,6 +2903,7 @@ class ActivityManagerProxy implements IActivityManager
} else {
data.writeInt(0);
}
+ data.writeInt(profileType);
mRemote.transact(PROFILE_CONTROL_TRANSACTION, data, reply, 0);
reply.readException();
boolean res = reply.readInt() != 0;