Skip to content

Commit

Permalink
Merge pull request #4383 from liqunl/unsafe
Browse files Browse the repository at this point in the history
Turn off Unsafe illegal write notification
  • Loading branch information
andrewcraik committed Jan 22, 2019
2 parents b5e3c2a + ce7532a commit acb728d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions runtime/compiler/optimizer/InlinerTempForJ9.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2018 IBM Corp. and others
* Copyright (c) 2000, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -1106,10 +1106,10 @@ TR_J9InlinerPolicy::createUnsafePutWithOffset(TR::ResolvedMethodSymbol *calleeSy
traceMsg(comp(),"\t Duplicate Tree for ordered call, orderedCallNode = %p\n",orderedCallNode);
}

static char *disableIllegalWriteReport = feGetEnv("TR_DisableIllegalWriteReport");
static char *enableIllegalWriteReport = feGetEnv("TR_EnableIllegalWriteReport");
TR::TreeTop* callTreeForIllegalWriteReport = NULL;
// Keep the call for illegal write report
if (!disableIllegalWriteReport && !comp()->getOption(TR_DisableGuardedStaticFinalFieldFolding))
if (enableIllegalWriteReport && !comp()->getOption(TR_DisableGuardedStaticFinalFieldFolding))
callTreeForIllegalWriteReport = callNodeTreeTop->duplicateTree();

TR::Node * unsafeAddress = createUnsafeAddressWithOffset(unsafeCall);
Expand Down
6 changes: 3 additions & 3 deletions runtime/compiler/optimizer/J9RecognizedCallTransformer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2017, 2018 IBM Corp. and others
* Copyright (c) 2017, 2019 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -271,9 +271,9 @@ void J9::RecognizedCallTransformer::processUnsafeAtomicCall(TR::TreeTop* treetop
if (enableTrace)
traceMsg(comp(), "Created isNotLowTagged test node n%dn, static field will fall through to Block_%d\n", isNotLowTaggedNode->getGlobalIndex(), treetop->getEnclosingBlock()->getNumber());

static char *disableIllegalWriteReport = feGetEnv("TR_DisableIllegalWriteReport");
static char *enableIllegalWriteReport = feGetEnv("TR_EnableIllegalWriteReport");
// Test if the call is a write to a static final field
if (!disableIllegalWriteReport
if (enableIllegalWriteReport
&& !comp()->getOption(TR_DisableGuardedStaticFinalFieldFolding)
&& TR_J9MethodBase::isUnsafePut(unsafeCall->getSymbol()->castToMethodSymbol()->getMandatoryRecognizedMethod()))
{
Expand Down

0 comments on commit acb728d

Please sign in to comment.