toolchain-utils: Improve heatmap tool.

The overall goal of this patch is to improve heatmap tool in a way that
facilitates the tool to be integrated into crosperf. The patch needs to
make sure the heat_map.py is not only able to run as a standalone tool,
but also is compatible to crosperf. It also adds functionality to the
heatmap that when the address range of huge page (offset within the text
section) is provided, the heatmap displays symbols within and outside of
the region with different colors.

This patch adds following improvements:
1. It adds support in heat_map.py that skips copying perf.data into
the chroot again, if the provided path to perf.data is within a chroot.
2. It adds support in heatmap_generator.py to take in a range of huge page
as (start, end). Update corresponding unit test.
3. It adds extensive unit tests for heat_map.py. The unit test tests both
each functions and also makes sure it run as a standalone tool.

BUG=chromium:956109
TEST=Tested locally and pass unit tests.

Change-Id: I8008da51cceb0ad90df29042faf7a9d91d04f4b1
Reviewed-on: https://chromium-review.googlesource.com/1582523
Commit-Ready: Tiancong Wang <tcwang@google.com>
Tested-by: Tiancong Wang <tcwang@google.com>
Reviewed-by: Tiancong Wang <tcwang@google.com>
7 files changed