Clean up benchmarks.

Use the MemoryTracker class to remove copy pasted code in benchmarks.
Switch to using MALLOC_PURGE_ALL now since it is more accurate.
purging code.

Move the MemoryTracker objects out of the test classes, and create them
around the benchmark loop.

Renamed all of the BM_elf_and_symbol to just BM_symbol_lookup since
this allows running those tests easily using a filter.

Change the GatherRss() to GetRSSBytes() with a return value. It didn't
make sense to pass in a variable to set, so the new function returns
the total RSS instead.

Fix the eval benchmarks to do the calculations of memory during the
loop.

Fix bug that initialized the min_rss_bytes_ variable incorrectly.

Change all benchmark loops from for (auto _ : state) to
for (const auto& _ : state).

Test: Ran benchmarks and verified RSS numbers seem realistic.
Change-Id: I354dc47c5d95feb2a1c88df4c834d7dcb757b0fe
10 files changed
tree: acb40ac61dc6655e04da9f01fdf3550562f35198
  1. libunwindstack/
  2. OWNERS
  3. PREUPLOAD.cfg