Skip to content

Commit

Permalink
Merge pull request #4253 from cathyzhyi/enablefw
Browse files Browse the repository at this point in the history
Enable JITInlineFieldwatch when option specified
  • Loading branch information
gacholio authored Jan 14, 2019
2 parents dbefa63 + be81426 commit 184f00e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runtime/compiler/control/CompilationThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7909,6 +7909,14 @@ TR::CompilationInfoPerThreadBase::compile(
// GC can go ahead now.
}

// The inlineFieldWatches flag is set when Field Watch is actually triggered at runtime.
// When it happens, all the methods on stack are decompiled and those in
// the compilation queue are invalidated. Set the option here to guarantee the
// mode is detected at the right moment so that all methods compiled after respect the
// data watch point.
if (_jitConfig->inlineFieldWatches)
compiler->setOption(TR_EnableFieldWatch);

// Compile the method
//

Expand Down
6 changes: 6 additions & 0 deletions runtime/compiler/control/J9Options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2312,6 +2312,12 @@ bool J9::Options::feLatePostProcess(void * base, TR::OptionSet * optionSet)
self()->setOption(TR_DisableNextGenHCR);
}

#if !defined(TR_HOST_X86)
//The bit is set when -XX:+JITInlineWatches is specified
if (J9_ARE_ANY_BITS_SET(javaVM->extendedRuntimeFlags, J9_EXTENDED_RUNTIME_JIT_INLINE_WATCHES))
TR_ASSERT_FATAL(false, "this platform doesn't support JIT inline field watch");
#endif

// GCR and JProfiling are disabled under FSD for a number of reasons
// First, there is confusion between the VM and the JIT as to whether a call to jitRetranslateCallerWithPreparation is a decompilation point.
// Having the JIT agree with the VM could not be done by simply marking the symbol canGCandReturn, as this would affect other parts of the JIT
Expand Down

0 comments on commit 184f00e

Please sign in to comment.