Fix a couple trace issues

- Adding trace tokens since we can be starting/ending traces out of order
- Fixing issue with draw hitting twice causing the trace stack to be
  popped twice
- Fix issue with endFlagOverrides not removing from the stack

Bug: 142803200

Change-Id: I8649b94249910a352f00f2f2c2459c355d2bab00
This commit is contained in:
Winson Chung
2019-10-16 11:32:41 -07:00
parent 3aefb6d776
commit 5cc62c7d0b
7 changed files with 80 additions and 47 deletions

View File

@@ -180,7 +180,7 @@ public class LoaderTask implements Runnable {
"LoaderTask2 " + this);
}
TraceHelper.INSTANCE.beginSection(TAG);
Object traceToken = TraceHelper.INSTANCE.beginSection(TAG);
TimingLogger logger = TestProtocol.sDebugTracing ?
new TimingLogger(TAG, "run") {
@Override
@@ -281,7 +281,7 @@ public class LoaderTask implements Runnable {
} finally {
logger.dumpToLog();
}
TraceHelper.INSTANCE.endSection();
TraceHelper.INSTANCE.endSection(traceToken);
}
public synchronized void stopLocked() {