OSDN Git Service

Generate SHA-1 build ID for host-generated *.oat files (1/2).
authorAlexey Alexandrov <aalexand@google.com>
Mon, 19 Sep 2016 16:33:49 +0000 (09:33 -0700)
committerAlexey Alexandrov <aalexand@google.com>
Thu, 6 Oct 2016 02:20:14 +0000 (19:20 -0700)
commitab40c1108330caee9a01317628a28dac4c5a8bf1
tree0e03c80a8a74cc4bed3f8dba8f238ce6ba2f6f0a
parent2f61867045ffbd0c38a4ecec5f59632004f7efff
Generate SHA-1 build ID for host-generated *.oat files (1/2).

For host-generated *.oat files, generate a SHA-1 build ID based on the
file content and write it to .note.gnu.build-id ELF section.  This
should allow various developer tools like profilers correlate the data
captured for files like boot.oat on the device with the corresponding
known version of the file during an offline analysis.

Test: Verified that boot.oat contains the build ID section now (with
      this change and https://android-review.googlesource.com/#/c/275630
      applied)
Test: Added ElfWriterTest::CheckBuildIdPresent test.
Test: make test-art-host
Bug: 31292208
Change-Id: Ie5e89da2ef87e34c27c0237ab34ddc7d2dc0aa3b
build/Android.oat.mk
compiler/Android.bp
compiler/driver/compiler_options.cc
compiler/driver/compiler_options.h
compiler/elf_builder.h
compiler/elf_writer_quick.cc
compiler/elf_writer_test.cc
dex2oat/dex2oat.cc