From 7eabe55db6b113f83c2cefcd06812648927de877 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Thu, 21 Jul 2011 14:56:34 -0700 Subject: Add looper profiling to adb shell am To profile the looper, run the following command: adb shell am profile looper start adb shell am profile looper stop Change-Id: I781f156e473d7bdbb6d13aaffeeaae88bc01a69f --- core/java/android/app/ActivityManagerNative.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'core/java/android/app/ActivityManagerNative.java') 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; -- cgit v1.2.3