commit | ee3097ce79889c5e0bbaec34cda8becebcc9f64f | [log] [tgz] |
---|---|---|
author | Yabin Cui <yabinc@google.com> | Thu Jul 22 13:33:24 2021 -0700 |
committer | Yabin Cui <yabinc@google.com> | Fri Jul 30 22:16:57 2021 +0000 |
tree | dd72a84514306c5cc0c9025a1fb9e9e3976ced32 | |
parent | d09092fd6d2632e6e2787af06ad6fdb69099966c [diff] |
simpleperf: replace InCloudAndroid() with runtime check. On x86 and x86_64, it's likely to run on an emulator or vm without hardware perf counters. It's hard to enumerate them all. So check if hardware perf counters are available at runtime. Bug: 191277482 Test: run simpleperf_unit_test Change-Id: I38cc89bc7f81f8d6d6165a4b8f344c0660c10364 (cherry picked from commit 1f6f51aee77235b1fb374a917f0b46c9c09f0933)