summaryrefslogtreecommitdiff
path: root/runtime/native_stack_dump.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix golem buildDavid Srbecky2020-07-161-1/+1
| | | | | | | | ART_CLANG_PATH is not defined (or needed) on golem. Bug: 147817558 Test: m build-art-target-golem build-art-host-golem Change-Id: I635b7b86fb8120954d206601590df42b505e87cf
* Fixes for gtests in eng-prodDavid Srbecky2020-07-151-8/+6
| | | | | | Bug: 147817558 Test: art/art-host-gtest on forrest Change-Id: I0ecfbc81fe6998d4c8c69ce6fbeb35bdd5908b55
* Don't use addr2line for dex and jar files.Orion Hodson2019-11-201-5/+10
| | | | | | | Bug: 144594370 Test: Modify a run-test to invoke String.length interpreter intrinsic \ and call Runtime::Abort from interpreter intrinsic implementation Change-Id: I2997dbfa59ce2bbe9d725f1d7fe7eed565f698fe
* Fully remove DumpKernelStack.Elliott Hughes2019-08-271-45/+0
| | | | | | | | As explained in the previous commit touching this code, these days only root can get the kernel stack trace anyway. Test: treehugger Change-Id: I9924951afa1f8511720c479598c3bd74f5a55c66
* Don't complain if we can't read /proc/self/task/pid/stack.Elliott Hughes2019-08-271-1/+2
| | | | | | | | | | | Why do we see the warning on every stack in an ANR? Because normally on Android you either won't have CONFIG_STACKTRACE, or you won't have PTRACE_MODE_ATTACH_FSCREDS. I'm assuming this code still has some value on the host, so I'm just silencing the warning rather than deleting the code. Test: treehugger Change-Id: I2f203bde87a6613d1b300a0020290c62bea4ac48
* ART: Remove file_utils' ReadFileToStringAndreas Gampe2019-05-161-1/+2
| | | | | | | Replace with libbase. Test: mmma art Change-Id: Id042f4879485e743e3dc7548434be1634370ee66
* Fix DumpNativeStack function for traced methods. (part 2)David Srbecky2019-02-151-4/+3
| | | | | | | | The alignment didn't work for thumb due to least significant bit set. Bug: 123510633 Test: ./art/test.py -b -r -t 163 Change-Id: I173bdef1050c79a7431955034e3eb001d1efae05
* Fix DumpNativeStack function for traced methods.David Srbecky2019-02-131-0/+8
| | | | | | | | The art_quick_instrumentation_exit stub does not have oat header. Bug: 123510633 Test: test.py -b -r --host --trace -r -t 163 Change-Id: I56d72816daf836440feccb42c81031f120e8c4c5
* Merge "Fix DumpNativeStack function for trampolines."Treehugger Robot2019-02-041-3/+11
|\
| * Fix DumpNativeStack function for trampolines.David Srbecky2019-01-301-3/+11
| | | | | | | | | | | | | | | | | | | | Trampolines are not preceded by OatQuickMethodHeader, so we should not be trying to read it in those cases. Bug: 123510633 Test: Added temporary checks when reading the header. Test: test.py -b --host -r -t 061 -t 064 Change-Id: I3507efcb1ac342fc3d65dd4d38408d9a18f1877a
* | Use prebuilt addr2line on hostDavid Srbecky2019-01-301-2/+15
|/ | | | | | | | The build system rightfully warns if we use the system addr2line. Bug: 123562439 Test: Crash dex2oat during built and check the log output. Change-Id: I236df48bb49ab914da372de337da091b00a7459e
* ART: Fix internal addr2lineAndreas Gampe2018-11-061-1/+1
| | | | | Test: m test-art-host Change-Id: I555a196577eeef995746b6292a4728c4814f0875
* Modernise code to use std::make_uniqueYi Kong2018-10-291-4/+5
| | | | | | | Generated by clang-tidy. Test: m checkbuild Change-Id: Idb24960d9326c0d94ab5d04b18deb0894d23da9f
* Re-enable ART code paths and tests for ASan that were disabled for Valgrind.Roland Levillain2018-06-141-5/+0
| | | | | | Test: SANITIZE_HOST=address ASAN_OPTIONS='detect_leaks=0' make test-art-host Bug: 29282211 Change-Id: I127a8c11c7d3b778c8d538aec0782a10f042225c
* Revert^2 "Remove support for Valgrind in ART."Roland Levillain2018-06-111-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Disable test configuration art-gtest-valgrind64 (art-gtest-valgrind32 was already disabled). - Remove Makefile logic regarding testing with Valgrind. - Remove occurrences of `TEST_DISABLED_FOR_MEMORY_TOOL_VALGRIND`. - Replace occurrences of `TEST_DISABLED_FOR_MEMORY_TOOL_ASAN` with `TEST_DISABLED_FOR_MEMORY_TOOL`. - Replace the potentially dynamically evaluated `RUNNING_ON_MEMORY_TOOL` expression with constant `kRunningOnMemoryTool`. - Simplify and fold the logic of `art::ArenaAllocatorMemoryToolCheckImpl` and `art::ArenaAllocatorMemoryToolCheck` into `art::ArenaAllocatorMemoryTool`. - Adjust comments regarding memory tools. - Remove Valgrind suppression files. - Remove `--callgrind` option from tools/art. This reverts commit 8b362a87d52a6668ffd2283ef6ffc274315f41c8. Change-Id: I23c76845e6ccf766f19b22b58a0d5161f60842a9 Test: art/test.py Test: art/test/testrunner/run_build_test_target.py art-asan Bug: 77856586 Bug: 29282211
* Revert "Remove support for Valgrind in ART."Andreas Gampe2018-05-221-4/+2
| | | | | | | | | | | This reverts commit 8268cb677bd92bfbcfec7e803775c29687494e53. Reason for revert: ASAN failures Change-Id: I7e66d3f3fb461ae4f6dea6ec7d506b7dface3402 Test: SANITIZE_HOST=address m test-art-host Bug: 77856586 Bug: 29282211
* Remove support for Valgrind in ART.Roland Levillain2018-05-141-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | - Disable test configuration art-gtest-valgrind64 (art-gtest-valgrind32 was already disabled). - Remove Makefile logic regarding testing with Valgrind. - Remove occurrences of `TEST_DISABLED_FOR_MEMORY_TOOL_VALGRIND`. - Replace occurrences of `TEST_DISABLED_FOR_MEMORY_TOOL_ASAN` with `TEST_DISABLED_FOR_MEMORY_TOOL`. - Replace the potentially dynamically evaluated `RUNNING_ON_MEMORY_TOOL` expression with constant `kRunningOnMemoryTool`. - Simplify and fold the logic of `art::ArenaAllocatorMemoryToolCheckImpl` and `art::ArenaAllocatorMemoryToolCheck` into `art::ArenaAllocatorMemoryTool`. - Adjust comments regarding memory tools. - Remove Valgrind suppression files. - Remove `--callgrind` option from tools/art. Test: art/test.py Bug: 77856586 Bug: 29282211 Change-Id: Ifdcbfccc1830104c455760457df66ede4a4cd135
* Fix mac build.Christopher Ferris2018-03-271-1/+2
| | | | | | | | | Add extra parameter to DumpNativeStack for mac definition. Bug: 74121887 Test: NA Change-Id: I7b9ec40fb1f81a4e38e2ce06313df6ca6706312b
* Display all stack frames on a crash.Christopher Ferris2018-03-261-1/+3
| | | | | | | | Bug: 74121887 Test: Forced a crash in the unwind code and verified the frames Test: in the unwinder are present. Change-Id: Id158dadea25e986a0d2e9feba0873a921644fd22
* Ignore vdex files for addr2line.Christopher Ferris2018-03-071-2/+5
| | | | | | | | Bug: 74349704 Test: Ran the 141 art test with a patch to cause a crash. Observed no addr2line Test: errors, and all non-vdex mapped lines properly have line information. Change-Id: I82a9f351f33353f3a17ed03bfaa8f28a92e75ee2
* Change Addr2line to use poll.Christopher Ferris2018-03-061-18/+16
| | | | | | | | | | | | | | | | | | Moving from select to poll avoids any problems with the fd being too large for the call to FD_SET. It also slightly simplifies the code. Make sure that the call to read only ever occurs if there is really data to be read. There was a case with the previous use of the select call where the read would be called when there was no data to be read which caused the process to hang forever. Test: Ran the 137 test forcing a crash and verified the addr2line Test: information is correct. Test: Ran the 141 test forcing a crash and verifying that when more than Test: two lines are returned by addr2line, it still display them all. Test: Modified the Addr2line call to pass in an emptry string for the Test: executable and verified there are no hangs. Change-Id: I3d750e7796d0c70122686aad1eb40856157c9770
* Move most of runtime/base to libartbase/baseDavid Sehr2018-03-051-2/+2
| | | | | | | | | | | | | | Enforce the layering that code in runtime/base should not depend on runtime by separating it into libartbase. Some of the code in runtime/base depends on the Runtime class, so it cannot be moved yet. Also, some of the tests depend on CommonRuntimeTest, which itself needs to be factored (in a subsequent CL). Bug: 22322814 Test: make -j 50 checkbuild make -j 50 test-art-host Change-Id: I8b096c1e2542f829eb456b4b057c71421b77d7e2
* Add offset for native stack dump.Christopher Ferris2018-02-091-0/+3
| | | | | | | | | | | When dumping the stack from a shared library loaded out of an apk, the art stack dumper didn't match the backtrace unwinding code and include an offset. Add that back in so that this backtrace can be passed to go/as. Test: Loaded an app with a shared library from an apk and did a kill -3. Test: Observed that the offset value is set properly. Change-Id: I881946330e76b9aab28cf7dbd94fe406bac7895a
* Merge "Fix NE when DumpKernelStack"Treehugger Robot2018-02-031-0/+4
|\
| * Fix NE when DumpKernelStackyuanhao2018-02-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | Before kernel_stack_frames.pop_back(), check whether kernel_stack_frames is empty. Bug: 72759265 Test: manual Change-Id: I3e52d0a38ff868a278da94b2b80d44a324514934 Signed-off-by: yuanhao <yuanhao@xiaomi.com>
* | Update to track libbacktrace API changes.Christopher Ferris2018-01-181-6/+6
| | | | | | | | | | | | | | Bug: 65682279 Test: Compiles. Ran art host unit tests. Change-Id: I2077e61cc89cdb93a04a70612b01596fcc273d8c
* | Allow map name to be empty in DumpNativeStack.Christopher Ferris2018-01-081-2/+10
|/ | | | | | | | | For the gdb jit interface, functions in the stack trace will come from maps that have no names. Print a special name for these maps and also do not allow addr2line to run on these maps either. Test: Build and ran a stack through that use the jit gdb interface. Change-Id: I39d3f7e24a38df0a02214d1014a5d0b2e0174dd7
* ART: Factor out gAbortingAndreas Gampe2017-12-071-1/+1
| | | | | | | | Cut dependencies on base/logging.h by moving gAborting to its own header. Leave the static storage in logging.cc. Test: m Change-Id: Ib2ca880e15f9cb50cb9aab803784826bb46efb5e
* ART: Move runtime-debug flags to own filesAndreas Gampe2017-12-071-0/+1
| | | | | | | To reduce the need for base/logging.h and separate out concerns. Test: m Change-Id: Ib373357325c6e622f608ada341594c3bea2fce2e
* Separate file utilities from utils.ccDavid Sehr2017-11-011-0/+1
| | | | | | | | Reduce the dependencies from utils.cc to arch/ subdirectories, etc. Bug: 22322814 Test: make test-art-host Change-Id: I4decd15ff4ec460735bfb58cebb1c6a1bf32b68f
* Use the rel_pc instead of computing it.Christopher Ferris2017-07-191-1/+1
| | | | | | | Bug: 23762183 Test: Compiles. Change-Id: I5fe96c444bed89b4b9d3e96ffc37555678428be1
* ART: Introduce thread-current-inl.hAndreas Gampe2017-06-021-1/+1
| | | | | | | | | | | Factor out Thread::Current() code into its own -inl file to remove transitive includes. This requires at the same time correcting mutex.h, i.e., moving some functions into mutex-inl.h. Test: m test-art-host Change-Id: I88f888b604e0897368d9b483edce6ce4332dd9c9
* Close the right fd in native_stack_dumpCalin Juravle2017-03-271-1/+1
| | | | | Test: m test-art-host Change-Id: I7edbeba699f3e957b915c5fcd52337ee64b878e2
* ART: Move to libbase StringPrintfAndreas Gampe2016-12-151-1/+4
| | | | | | | | Remove ART's StringPrintf implementation. Fix up clients. Add missing includes where necessary. Test: m test-art-host Change-Id: I564038d5868595ac3bb88d641af1000cea940e5a
* Class Hierarchy Analysis (CHA)Mingyao Yang2016-12-011-1/+1
| | | | | | | | | | | | | | | | | | | The class linker now tracks whether a method has a single implementation and if so, the JIT compiler will try to devirtualize a virtual call for the method into a direct call. If the single-implementation assumption is violated due to additional class linking, compiled code that makes the assumption is invalidated. Deoptimization is triggered for compiled code live on stack. Instead of patching return pc's on stack, a CHA guard is added which checks a hidden should_deoptimize flag for deoptimization. This approach limits the number of deoptimization points. This CL does not devirtualize abstract/interface method invocation. Slides on CHA: https://docs.google.com/a/google.com/presentation/d/1Ax6cabP1vM44aLOaJU3B26n5fTE9w5YU-1CRevIDsBc/edit?usp=sharing Change-Id: I18bf716a601b6413b46312e925a6ad9e4008efa4 Test: ART_TEST_JIT=true m test-art-host/target-run-test test-art-host-gtest
* ART: Fix tidy warningsAndreas Gampe2016-11-081-1/+1
| | | | | | | | | | | | | Switch to char versions of find variants. Add "explicit" constructor variants or refactor and remove defaults. Use const references. Bug: 32619234 Test: m test-art-host Change-Id: I970cc2f47d6cf8f0c74104b994b075b2fafb3d45
* Remove mirror:: and ArtMethod deps in utils.{h,cc}David Sehr2016-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | The latest chapter in the ongoing saga of attempting to dump a DEX file without having to start a whole runtime instance. This episode finds us removing references to ArtMethod/ArtField/mirror. One aspect of this change that I would like to call out specfically is that the utils versions of the "Pretty*" functions all were written to accept nullptr as an argument. I have split these functions up as follows: 1) an instance method, such as PrettyClass that obviously requires this != nullptr. 2) a static method, that behaves the same way as the util method, but calls the instance method if p != nullptr. This requires using a full class qualifier for the static methods, which isn't exactly beautiful. I have tried to remove as many cases as possible where it was clear p != nullptr. Bug: 22322814 Test: test-art-host Change-Id: I21adee3614aa697aa580cd1b86b72d9206e1cb24
* ART: Use cerr for host unexpected errorsAndreas Gampe2016-10-111-4/+4
| | | | | | | | | | | Use cerr and endl when dumping unexpected signals on Linux. This simulates the previous special-casing of INTERNAL_FATAL to immediately print output. Bug: 31338270 Test: m test-art-host Test: manual segfault Change-Id: I9d4471836339bf69681cc4aa43df6d558e7f123d
* ART: Improve addr2lineAndreas Gampe2016-08-041-52/+210
| | | | | | | | | | | | Change addr2line handling: use the tool in "server" mode of operation, keeping a connection open for the same file. This reduces the time of a dump of sleeping 001-HelloWorld from fifteen to ten seconds. Bug: 30351473 Test: m test-art-host Test: manual host testing with a test that times out Change-Id: Idbe424f85c566f5bb39d12644ce104fff54a2146
* ART: Factor out native stack dumpingAndreas Gampe2016-08-041-0/+264
Move DumpNativeStack and DumpKernelStack into a new file to keep concerns separated. Clean up the file. In preparation for modifications to how we use addr2line. Bug: 30351473 Test: m test-art-host Test: manual host testing with a test that times out Change-Id: I02d5645952fe94fd8e73bcf0522721547f6cef66