summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2018-02-02 09:25:31 -0800
committerAlex Light <allight@google.com>2018-02-02 11:04:38 -0800
commitca97ada4ec14373242de2452a6d0c16804007d66 (patch)
tree483cba96eb8cbc8e06a2ef8651f66d208626e30b /compiler/optimizing/graph_visualizer.cc
parent2e40c1c2e9c8cfc2d41a8960247bfa48e2500889 (diff)
Change ClassFileLoadHook to lazily compute dex file
Creating a dex file from the quickened or compact-dex'd internal format for calling the JVMTI ClassFileLoadHook is quite expensive. This meant that agents could not generally listen for this event without causing unacceptable performance problems. Since agents will generally not touch the buffer, needing to instrument only a handful of classes we will fix this problem by doing the de-quickening lazily. This is done by mmaping an empty buffer with PROT_NONE and then filling it in when the program has a SEGV in the appropriate address range. This should improve the performance of any agent that listens for the ClassFileLoadHook but does not commonly do anything to the buffer. This does have the disadvantage that we can no longer ensure that the buffer size we pass down in class_data_len might no longer be fully accurate. Some agents that assert that class_data_len is exactly the same as the dex-file will need to be updated. Bug: 72402467 Bug: 72064989 Test: ./test.py --host -j50 Test: ./test.py --host --redefine-stress -j50 Change-Id: I39354837f1417ae10a57c5b42cbb4f38f8a563dc
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions