commit | dc3a78354e5a25432825ec0ef11cfcb6a75fad52 | [log] [tgz] |
---|---|---|
author | Dmitri Plotnikov <dplotnikov@google.com> | Tue Jun 29 15:47:32 2021 -0700 |
committer | Dmitri Plotnikov <dplotnikov@google.com> | Thu Jul 01 22:04:28 2021 -0700 |
tree | 0844f13d966891908f421c8faaf1c29f5f19299f | |
parent | fb0faec367832e8fdc05508d831a697972dfa4f2 [diff] |
Address race condition in procstate time tracking The issue occurs when the application proc state changes rapidly, e.g. from FOREGROUND to BACKGROUND to CACHED. The original code would sometimes attribute the time slice to the wrong proc state. Bug: 192550308 Test: (on cuttlefish) atest --rerun-until-failure 300 FrameworksCoreTests:com.android.internal.os.BstatsCpuTimesValidationTest -- --abi x86_64 Change-Id: Ic22bbfa3aae701014fc016ec9e2d32b1c528d462