Skip to content

Commit

Permalink
Merge pull request #6842 from cjjdespres/aot-cache-exclusion
Browse files Browse the repository at this point in the history
Expose a new limitOption for OpenJ9
  • Loading branch information
dsouzai committed Dec 14, 2022
2 parents 8f5212d + 4d23e85 commit 9c865e1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
1 change: 1 addition & 0 deletions compiler/ras/Debug.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ class TR_Debug
virtual char * limitfileOption(char *, void *, TR::OptionTable *, TR::Options *, bool loadLimit, TR_PseudoRandomNumbersListElement **pseudoRandomListHeadPtr = 0);
virtual char * inlinefileOption(char *, void *, TR::OptionTable *, TR::Options *);
virtual char * limitOption(char *, void *, TR::OptionTable *, TR::Options *, bool loadLimit);
char * limitOption(char *, void *, TR::OptionTable *, TR::Options *, TR::CompilationFilters * &);
virtual int32_t * loadCustomStrategy(char *optFileName);
virtual bool methodCanBeCompiled(TR_Memory *mem, TR_ResolvedMethod *, TR_FilterBST * &);
virtual bool methodCanBeRelocated(TR_Memory *mem, TR_ResolvedMethod *, TR_FilterBST * &);
Expand Down
21 changes: 17 additions & 4 deletions compiler/ras/LimitFile.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2000, 2020 IBM Corp. and others
* Copyright (c) 2000, 2022 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 @@ -612,12 +612,12 @@ TR_Debug::limitfileOption(char *option, void *base, TR::OptionTable *entry, TR::
}

char *
TR_Debug::limitOption(char *option, void *base, TR::OptionTable *entry, TR::Options * cmdLineOptions, bool loadLimit)
TR_Debug::limitOption(char *option, void *base, TR::OptionTable *entry, TR::Options * cmdLineOptions, TR::CompilationFilters *&filters)
{
char *p = option;

// this use the old interface
TR_FilterBST *filter = addFilter(p, static_cast<int32_t>(entry->parm1), 0, 0, loadLimit);
filters = findOrCreateFilters(filters);
TR_FilterBST *filter = addFilter(p, static_cast<int32_t>(entry->parm1), 0, 0, filters);

if (!filter)
return option;
Expand Down Expand Up @@ -682,6 +682,19 @@ TR_Debug::limitOption(char *option, void *base, TR::OptionTable *entry, TR::Opti
return p;
}

char *
TR_Debug::limitOption(char *option, void *base, TR::OptionTable *entry, TR::Options * cmdLineOptions, bool loadLimit)
{
if (loadLimit)
{
return limitOption(option, base, entry, cmdLineOptions, _relocationFilters);
}
else
{
return limitOption(option, base, entry, cmdLineOptions, _compilationFilters);
}
}


void * TR_FilterBST::operator new(size_t size, TR::PersistentAllocator &allocator)
{
Expand Down

0 comments on commit 9c865e1

Please sign in to comment.