Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Re-enables JNI-direct for AOT on Power" #14945

Merged
merged 1 commit into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions runtime/compiler/env/VMJ9.h
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,8 @@ class TR_J9VMBase : public TR_FrontEnd

virtual TR::TreeTop *lowerTree(TR::Compilation *, TR::Node *, TR::TreeTop *);

virtual bool canRelocateDirectNativeCalls() {return true; }

virtual bool storeOffsetToArgumentsInVirtualIndirectThunks() { return false; }


Expand Down Expand Up @@ -1406,6 +1408,7 @@ class TR_J9SharedCacheVM : public TR_J9VM
// replacing calls to isAOT
virtual bool canUseSymbolValidationManager() { return true; }
virtual bool supportsCodeCacheSnippets() { return false; }
virtual bool canRelocateDirectNativeCalls() { return false; }
virtual bool needClassAndMethodPointerRelocations() { return true; }
virtual bool inlinedAllocationsMustBeVerified() { return true; }
virtual bool needRelocationsForHelpers() { return true; }
Expand Down
1 change: 1 addition & 0 deletions runtime/compiler/env/VMJ9Server.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ class TR_J9SharedCacheServerVM: public TR_J9ServerVM
// replacing calls to isAOT
virtual bool canUseSymbolValidationManager() override { return true; }
virtual bool supportsCodeCacheSnippets() override { return false; }
virtual bool canRelocateDirectNativeCalls() override { return false; }
virtual bool needClassAndMethodPointerRelocations() override { return true; }
virtual bool inlinedAllocationsMustBeVerified() override { return true; }
virtual bool needRelocationsForHelpers() override { return true; }
Expand Down
4 changes: 2 additions & 2 deletions runtime/compiler/p/codegen/J9CodeGenerator.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2022 IBM Corp. and others
* Copyright (c) 2000, 2021 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 @@ -747,7 +747,7 @@ J9::Power::CodeGenerator::deriveCallingLinkage(TR::Node *node, bool isIndirect)
static char * disableDirectNativeCall = feGetEnv("TR_DisableDirectNativeCall");

// Clean-up: the fej9 checking seemed unnecessary
if (!isIndirect && callee->isJNI() &&
if (!isIndirect && callee->isJNI() && fej9->canRelocateDirectNativeCalls() &&
(node->isPreparedForDirectJNI() ||
(disableDirectNativeCall == NULL && callee->getResolvedMethodSymbol()->canDirectNativeCall())))
return self()->getLinkage(TR_J9JNILinkage);
Expand Down
1 change: 0 additions & 1 deletion runtime/compiler/p/codegen/J9CodeGenerator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class OMR_EXTENSIBLE CodeGenerator : public J9::CodeGenerator
* \brief Determines whether the code generator supports stack allocations
*/
bool supportsStackAllocations() { return true; }
bool supportsDirectJNICallsForAOT() { return true; }

// See J9::CodeGenerator::guaranteesResolvedDirectDispatchForSVM
bool guaranteesResolvedDirectDispatchForSVM() { return true; }
Expand Down