summaryrefslogtreecommitdiffstats
path: root/runtime/runtime.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r--runtime/runtime.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index bafc0fc..c0bb36a 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -78,6 +78,7 @@
namespace art {
+static constexpr bool kEnableJavaStackTraceHandler = true;
Runtime* Runtime::instance_ = NULL;
Runtime::Runtime()
@@ -525,12 +526,11 @@ bool Runtime::Init(const Options& raw_options, bool ignore_unrecognized) {
if (options->explicit_checks_ != (ParsedOptions::kExplicitSuspendCheck |
ParsedOptions::kExplicitNullCheck |
- ParsedOptions::kExplicitStackOverflowCheck)) {
- // Initialize the fault manager.
+ ParsedOptions::kExplicitStackOverflowCheck) || kEnableJavaStackTraceHandler) {
fault_manager.Init();
- // These need to be in a specific order. The null point check must be
- // the last in the list.
+ // These need to be in a specific order. The null point check handler must be
+ // after the suspend check and stack overflow check handlers.
if ((options->explicit_checks_ & ParsedOptions::kExplicitSuspendCheck) == 0) {
suspend_handler_ = new SuspensionHandler(&fault_manager);
}
@@ -542,6 +542,10 @@ bool Runtime::Init(const Options& raw_options, bool ignore_unrecognized) {
if ((options->explicit_checks_ & ParsedOptions::kExplicitNullCheck) == 0) {
null_pointer_handler_ = new NullPointerHandler(&fault_manager);
}
+
+ if (kEnableJavaStackTraceHandler) {
+ new JavaStackTraceHandler(&fault_manager);
+ }
}
heap_ = new gc::Heap(options->heap_initial_size_,