Only start timer in IncrementDisableThreadFlip when waiting
IncrementDisableThreadFlip is a hot function in System Server when
processing many binder transactions. There was code to track how much
time was spent waiting and log long waits. These days, long waits rarely
happen, but we were starting the timer even when we did not have to
wait. This led to NanoTime() showing up high in profiles.
This changes moves the first call to NanoTime() until after we know we
will spend at least some time waiting. After this change, NanoTime() did
not show up in the profile at all.
Bug: 150326920
Test: device boots
Change-Id: I6dc4cee7d18a3fbd6d2f73281cddba407e481d67
1 file changed