summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorVladimir Marko <vmarko@google.com>2016-06-21 18:21:53 +0100
committerVladimir Marko <vmarko@google.com>2016-06-27 12:44:50 +0100
commit3ea7c9e552bc8a87439b6e6db9d143e2716bc62c (patch)
treee19509217d06156f093753e959c41f3327b0c709 /compiler/optimizing/graph_visualizer.cc
parentb94b5706f0b8e2e1c7e1db22274f9f4bae0c4b5a (diff)
Fix 004-ThreadStress.
Synchronize the start of performing the tasks after all threads have been created and runners reported their start. This prevents a daemon thread from allocating all memory before the main thread tries to allocate the next daemon thread, which is the likely culprit of failing to print any output whatsoever (the main thread exits due to an uncaught OOME and printing the message also fails due to OOME). Instead of repeating attempts to print "Finishing worker" until it succeeds, print the message through JNI which does not require any Java heap memory. Similarly, print caught Throwables through JNI. Also make sure to preallocate Strings that are used once we start running tasks to avoid const-string throwing OOME. This also prevents a partial success followed by a retry; we have seen a failure to print the EOL, yielding "Finishing workerFinishing worker". Change the "Thread exited..." message to be printed only in DEBUG mode and compare the full output, ignoring different numbers as the "Starting worker for <id>" may be reordered. Test: "make -j 32 test-art-host-run-test-004-ThreadStress" (4 configs: with or without gcstress, 32-bit and 64-bit) 100 times while also keeping the machine under load with "make -j 32" to repeatedly build another full AOSP tree. Bug: 27371304 Change-Id: I28286d70a08be64c36d0e49dd5558686813ff264
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions