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

Expose a new limitOption for OpenJ9 #6842

Merged
merged 1 commit into from
Dec 14, 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
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