Allow running art run-tests with simpleperf.

Add "--simpleperf" option to art/test/run-test and pass it to
art/test/etc/run-test-jar. With this option dalvikvm invocation is
wrapped in "simpleperf record ... simpleperf report".

The new option can be used with chroot-based testsing approach described
in art/test/README.chroot.md. For example, to profile 001-HelloWorld on
a sargo device with serial 8BLAY00EVN (64-bit), do the following steps:

  unset ART_TEST_ANDROID_ROOT
  unset CUSTOM_TARGET_LINKER
  unset ART_TEST_ANDROID_ART_ROOT
  unset ART_TEST_ANDROID_RUNTIME_ROOT
  unset ART_TEST_ANDROID_I18N_ROOT
  unset ART_TEST_ANDROID_TZDATA_ROOT

  export ART_TEST_CHROOT=/data/local/art-test-chroot
  export ANDROID_SERIAL=8BLAY00EVN
  export ART_HEAP_POISONING=true

  . ./build/envsetup.sh
  lunch aosp_sargo-userdebug

  art/tools/buildbot-build.sh --target -j72 # --installclean
  art/tools/buildbot-cleanup-device.sh
  art/tools/buildbot-setup-device.sh
  art/tools/buildbot-sync.sh

  art/test/run-test --simpleperf --chroot $ART_TEST_CHROOT --64 001-HelloWorld

  art/tools/buildbot-teardown-device.sh
  art/tools/buildbot-cleanup-device.sh

Bug: none
Test: Ran the above steps, observed simpleperf stats in the output.
Change-Id: I1ce14fa94add3a1a6e7cec59382909ad6d11ef2a
2 files changed