summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-04-26 15:24:18 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-04-26 15:24:18 -0700
commit8e6159b821c0782776c030ab588c3e0d1d0143f6 (patch)
tree38d1933c3cb0d57d4a0826c109a10c54c968c6f0 /services
parent2be1523ba9ee102dc0a2f825f6512fed2929a232 (diff)
parent1ded0b1f6af65c2f95f8327f7f3df4cee1bf2346 (diff)
downloadframeworks_base-8e6159b821c0782776c030ab588c3e0d1d0143f6.zip
frameworks_base-8e6159b821c0782776c030ab588c3e0d1d0143f6.tar.gz
frameworks_base-8e6159b821c0782776c030ab588c3e0d1d0143f6.tar.bz2
Merge "Add traces for window manager and activity manager." into jb-dev
Diffstat (limited to 'services')
-rwxr-xr-xservices/java/com/android/server/wm/WindowManagerService.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index 32700cb..b270cee 100755
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -91,6 +91,7 @@ import android.os.StrictMode;
import android.os.SystemClock;
import android.os.SystemProperties;
import android.os.TokenWatcher;
+import android.os.Trace;
import android.provider.Settings;
import android.util.DisplayMetrics;
import android.util.EventLog;
@@ -631,6 +632,7 @@ public class WindowManagerService extends IWindowManager.Stub
// Update animations of all applications, including those
// associated with exiting/removed apps
synchronized (mAnimator) {
+ Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "wmAnimate");
final ArrayList<WindowStateAnimator> winAnimators = mAnimator.mWinAnimators;
winAnimators.clear();
final int N = mWindows.size();
@@ -641,6 +643,7 @@ public class WindowManagerService extends IWindowManager.Stub
}
}
mAnimator.animate();
+ Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
}
}
}
@@ -7518,6 +7521,7 @@ public class WindowManagerService extends IWindowManager.Stub
return;
}
+ Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "wmLayout");
mInLayout = true;
boolean recoveringMemory = false;
@@ -7562,7 +7566,10 @@ public class WindowManagerService extends IWindowManager.Stub
mInLayout = false;
assignLayersLocked();
mLayoutNeeded = true;
+ // XXX this recursion seems broken!
+ Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
performLayoutAndPlaceSurfacesLocked();
+ Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "wmLayout");
} else {
mInLayout = false;
@@ -7587,6 +7594,8 @@ public class WindowManagerService extends IWindowManager.Stub
mInLayout = false;
Log.wtf(TAG, "Unhandled exception while laying out windows", e);
}
+
+ Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
}
private final void performLayoutLockedInner(boolean initial, boolean updateInputWindows) {
@@ -8814,6 +8823,7 @@ public class WindowManagerService extends IWindowManager.Stub
private boolean updateFocusedWindowLocked(int mode, boolean updateInputWindows) {
WindowState newFocus = computeFocusedWindowLocked();
if (mCurrentFocus != newFocus) {
+ Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "wmUpdateFocus");
// This check makes sure that we don't already have the focus
// change message pending.
mH.removeMessages(H.REPORT_FOCUS_CHANGE);
@@ -8856,6 +8866,8 @@ public class WindowManagerService extends IWindowManager.Stub
// doing this part.
finishUpdateFocusedWindowAfterAssignLayersLocked(updateInputWindows);
}
+
+ Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
return true;
}
return false;