simpleperf: detect hardware counters on emulators.

We may run arm64 tests on emulators, which may not have hardware
counters. So use fingerprint to check if we are running on an emulator,
and dynamically detect if hardware counters are available.

Bug: 202840384
Bug: 191278807
Test: run CtsSimpleperfTestCases on emulators.

Change-Id: I3b6ea439e72188d5b4cf23662b0ee00bfa3b28cd
(cherry picked from commit 8c426d91c940ddfdb480dec9369a21f1c6907bc9)
1 file changed