Skip to content

Commit

Permalink
Made the flag experimental and added an assertion to set_can_hotswap_…
Browse files Browse the repository at this point in the history
…or_post_breakpoint()
  • Loading branch information
simonis committed Jan 24, 2024
1 parent 7b750da commit 2996663
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion src/hotspot/share/prims/jvmtiExport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,15 @@ class JvmtiExport : public AllStatic {
JVMTI_ONLY(_can_access_local_variables = (on != 0);)
}
inline static void set_can_hotswap_or_post_breakpoint(bool on) {
JVMTI_ONLY(_can_hotswap_or_post_breakpoint = (on != 0);)
#if INCLUDE_JVMTI
// Check that _can_hotswap_or_post_breakpoint is not reset once it
// was set to true. When _can_hotswap_or_post_breakpoint is set to true
// _all_dependencies_are_recorded is also set to true and never
// reset so we have to ensure that evol dependencies are always
// recorded from that point on.
assert(!_can_hotswap_or_post_breakpoint || on, "sanity check");
_can_hotswap_or_post_breakpoint = (on != 0);
#endif
}
inline static void set_can_walk_any_space(bool on) {
JVMTI_ONLY(_can_walk_any_space = (on != 0);)
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/globals.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2010,7 +2010,7 @@ const int ObjectAlignmentInBytes = 8;
product(bool, ProfileExceptionHandlers, true, \
"Profile exception handlers") \
\
product(bool, AlwaysRecordEvolDependencies, true, DIAGNOSTIC, \
product(bool, AlwaysRecordEvolDependencies, true, EXPERIMENTAL, \
"Unconditionally record nmethod dependencies on class " \
"rewriting/transformation independently of the JVMTI " \
" can_{retransform/redefine}_classes capabilities.") \
Expand Down

0 comments on commit 2996663

Please sign in to comment.