--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp Wed May 01 12:41:26 2019 -0400
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp Wed May 01 12:31:29 2019 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -40,6 +40,9 @@
#include "runtime/vframe_hp.hpp"
#include "services/management.hpp"
#include "utilities/growableArray.hpp"
+#if INCLUDE_JVMCI
+#include "jvmci/jvmci.hpp"
+#endif
class ReferenceLocateClosure : public OopClosure {
protected:
@@ -102,6 +105,7 @@
bool do_management_roots();
bool do_string_table_roots();
bool do_aot_loader_roots();
+ JVMCI_ONLY(bool do_jvmci_roots();)
bool do_roots();
@@ -188,6 +192,15 @@
return rcl.complete();
}
+#if INCLUDE_JVMCI
+bool ReferenceToRootClosure::do_jvmci_roots() {
+ assert(!complete(), "invariant");
+ ReferenceLocateClosure rcl(_callback, OldObjectRoot::_jvmci, OldObjectRoot::_type_undetermined, NULL);
+ JVMCI::oops_do(&rcl);
+ return rcl.complete();
+}
+#endif
+
bool ReferenceToRootClosure::do_roots() {
assert(!complete(), "invariant");
assert(OldObjectRoot::_system_undetermined == _info._system, "invariant");
@@ -238,6 +251,13 @@
return true;
}
+#if INCLUDE_JVMCI
+ if (do_jvmci_roots()) {
+ _complete = true;
+ return true;
+ }
+#endif
+
return false;
}