summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex/Second.java
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2019-02-06 15:10:58 -0800
committerAlex Light <allight@google.com>2019-02-11 11:03:22 -0800
commit3611fdf703a6417c08a2e3d6e642d5936318de18 (patch)
treeef152ff80f42b6486e5a02eee3fb7a02fbef15e7 /test/ProfileTestMultiDex/Second.java
parent794350fd0e21aa9e259b6c45394494871e7fdb13 (diff)
Prevent agents from delaying system daemon threads
The runtime starts several important daemon threads that are responsible for various GC related tasks (i.e. FinalizerDaemon, etc). The runtime cannot be considered fully started until these threads have been started or will be started soon. It was possible for agents to delay the startup of these daemons arbitrarily (while calling arbitrary java code) by never leaving the VMInit event or by never returning from the daemons ThreadStart events. This could cause deadlocks or other errors when using some agents, such as libjdwp. In order to prevent these issues and more closely match other java language runtimes we launch these threads before sending the VMInit event and suppress their ThreadStart events. The openjdkjvmti plugin then waits for the Daemon threads to actually begin executing before calling the VMInit event or any other agent code. This prevents the agents from seeing threads appear from nowhere. Bug: 123696564 Test: while atest CtsJdwpTestCases; do; done; Change-Id: I7e07187f3e8670f32df0490cb419585c13d81765
Diffstat (limited to 'test/ProfileTestMultiDex/Second.java')
0 files changed, 0 insertions, 0 deletions