Skip to content

Commit

Permalink
Consider the compileMethod() API in replenishInvocationCount() Assertion
Browse files Browse the repository at this point in the history
Add a flag in the optimization plan for compilations triggered by
the compileMethod API, which can have the invocation count be any
positive integer; replenishInvocationCount will not raise the assertion
failure for unexpected count value.

Based on eclipse-openj9/openj9#15472

Signed-off-by: Luke Li <[email protected]>
  • Loading branch information
luke-li-2003 committed Dec 31, 2024
1 parent 3ddaad3 commit cd06d49
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/control/OptimizationPlan.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ class TR_OptimizationPlan
bool getDisableEDO() const { return _flags.testAny(DisableEDO); }
void setDisableEDO(bool b) { _flags.set(DisableEDO, b); }

bool getIsCompileMethodAPI() const { return _flags.testAny(IsCompileMethodAPI); }
void setIsCompileMethodAPI(bool b) { _flags.set(IsCompileMethodAPI, b); }

// --------------------------------------------------------------------------
// GPU
//
Expand Down Expand Up @@ -224,6 +227,7 @@ class TR_OptimizationPlan
DowngradedDueToSamplingJProfiling=0x00400000, // Compilation was downgraded to cold just because we wanted to do JProfiling
InducedByDLT = 0x00800000, // Compilation that follows a DLT compilation
DisableEDO = 0x01000000, // Do not insert EDO profiling trees for this compilation
IsCompileMethodAPI = 0x02000000, // plan created by TR_MethodEvent::CompileMethodAPI
};
private:
TR_OptimizationPlan *_next; // to link events in the pool
Expand Down

0 comments on commit cd06d49

Please sign in to comment.