commit | 8f49e09d04c471ea2c929c9b23355c7bf736971e | [log] [tgz] |
---|---|---|
author | Chris Mumford <[email protected]> | Thu May 09 20:02:18 2019 |
committer | Commit Bot <[email protected]> | Thu May 09 20:02:18 2019 |
tree | 9f1c6a83181abdb2f143cfd402c8ac4823c83486 | |
parent | f985332d1f5c16975545b079b68deedbf2d14b92 [diff] [blame] |
Ensure JNI_ChildProcessService_DumpProcessStack is in the stack. It is possible that JNI_ChildProcessService_DumpProcessStack might not appear in the stack dumps if the linker decided to either inline it or combine with another identical function via ICF. BUG=934317 Change-Id: If2769f0b465d0585d71b7cfc3bb8c45b15f3933a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1594032 Reviewed-by: Yaron Friedman <[email protected]> Commit-Queue: Chris Mumford <[email protected]> Cr-Commit-Position: refs/heads/master@{#658234}
diff --git a/base/android/child_process_service.cc b/base/android/child_process_service.cc index 8ec6e62..0418e60 100644 --- a/base/android/child_process_service.cc +++ b/base/android/child_process_service.cc
@@ -71,7 +71,11 @@ _exit(0); } -void JNI_ChildProcessService_DumpProcessStack(JNIEnv* env) { +// Make sure this isn't inlined so it shows up in stack traces. +// the function body unique by adding a log line, so it doesn't get merged +// with other functions by link time optimizations (ICF). +NOINLINE void JNI_ChildProcessService_DumpProcessStack(JNIEnv* env) { + LOG(ERROR) << "Dumping as requested."; base::debug::DumpWithoutCrashing(); }