9 Commits

Author SHA1 Message Date
Benoit Lamarche
9f17dfcba6 Fail when there is an ASM error
Otherwise during a build, Locked Region Code Injection may encounter an
ASM Analyzer exception, and the build will not fail, even though
injection won't have succeeded.

Test: make
Change-Id: Iee69f1a78fde735db62c7f73405b8cec4e410793
2018-01-22 17:42:21 +01:00
Colin Cross
eb652a47a1 Convert services to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: I417409281c928ea667d937090d2a0d9d72a449a2
Merged-In: I417409281c928ea667d937090d2a0d9d72a449a2
Exempt-From-Owner-Approval: trivial conversion
(cherry-picked from commit e0b2ee52d2f274a2d46b2e6695e42d2764c39fa7)
2017-12-12 23:22:25 +00:00
Colin Cross
a218b561e8 Convert lockregioncodeinjection to Android.bp
See build/soong/README.md for more information

Test: m checkbuild
Change-Id: I78e91a70e786df8e6722c6ec3fe762371e8f475a
2017-10-24 16:09:01 -07:00
Benoit Lamarche
a7eb610b15 Use ASM6 Opcodes everywhere in locked_region_code_injection
And use the same constant everywhere.

Test: treehugger
Bug: 67676752
Change-Id: I5735aba76266118471677f962fab50dbb0be187b
2017-10-23 11:39:03 +02:00
Colin Cross
8aa184a395 Use final release of ASM 6.0
Test: m checkbuild
Change-Id: I8b39c7887763a1a5efce2622421906f9b2e1994a
2017-10-20 12:57:56 -07:00
Tobias Thierer
95aa2ea9d8 Update locked_region_code_injection tool to ASM 6.0-BETA.
ASM 6 is required to read version 53 (OpenJDK 9) class files.

Test: make EXPERIMENTAL_USE_OPENJDK9=true services.core
      (in the presence of other unsubmitted CLs that fix
      other issues)
Test: Copied all required dependencies into a subdirectory lib/,
      then ran the steps from TestMain.java, both for OpenJDK 8
      and OpenJDK 9 toolchains.
Bug: 67676752

Change-Id: If324d8ea28450d9a8426a2279190b2f4d9213ed5
2017-10-12 21:14:31 +01:00
Colin Cross
3b0ea225ab Use guava 21.0
guava 20.0 is being removed.

Test: m -j checkbuild
Change-Id: I48ac4f641da3567985339c061dad5d60829aeee0
2017-08-25 11:27:46 -07:00
Colin Cross
cebc382d5f Move inserted method after end of try block
Methods inserted at the end of a synchronized {} block also need to
be outside of the implicit try{} block.  Make sure the next
instruction is the virtual end label for the try block, and put
the inserted method after the label.

Bug: 64301866
Test: locked_region_code_injection test
Test: m -j checkbuild
Change-Id: I6626aa45580b4df692e02fc6127a2947a6075e2e
2017-08-03 20:55:37 -07:00
Alan Leung
ed36ba52bf ASM Priority Boost Tool
This tool is a replacement for the Jack plugin that allows injection
of static method calls before lock enter and exit.

A common use case would be to boost a thread's priority as soon as
it acquires a heavily contented lock and resetting the priority upon
release.

This tool is meant to be optionally invoked from /build/core/ rules
during the build process.

Test: JUnit Tests / resulting image on a bullhead.

Change-Id: If400414a0bf50f03768a1de2ebee42086a9d701f
Merged-In: If400414a0bf50f03768a1de2ebee42086a9d701f
(cherry picked from commit 93db63059ad5e9e1d59c8ce013559069d566ef4c)
2017-06-22 14:00:04 -07:00