Add scripts to generate and collect PGO profile

Added a script collect_profile.py, which provides a simple way for user
to generate and collect PGO profile data based on each benchmark. Also
added mechanism in autotest to pull profraw data files to local
directory, which can be used as a helper util for the profile collecting
script.

The collect_profile.py mainly have three parts:
1) Call run.py with flags set to -fprofile-generate, so that the
benchmark wil be built with PGO instrumentation and run on the devices
to generate profraw data.
2) Use autotest framework to pull the profraw data to a local directory.
Since autotest provides a method which can only send one file at a time,
I compressed all the profraw data on the devices to a single tar file
and transfer it.
3) Call llvm-profdata command locally to convert the profraw data into
the format that llvm can recognize.

The users need to specify which benchmark to collect, may also tell the
device serial, remote machine address, and the path to store the
profdata.

Test: None.
Change-Id: I4d7ed5f056806eb8099fe2e9e1b912adb7962d33
2 files changed