File tree 2 files changed +10
-3
lines changed
runtime/compiler/x/codegen 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1473,7 +1473,11 @@ void TR::X86CallSite::computeProfiledTargets()
1473
1473
(!profiledInterfaceMethod->isInterpreted () ||
1474
1474
profiledInterfaceMethod->isJITInternalNative ()))
1475
1475
{
1476
- if (frequency < getMinProfiledCallFrequency ())
1476
+ float minProfiledCallFrequency = getMinProfiledCallFrequency ();
1477
+ if (comp ()->getMethodHotness () > warm)
1478
+ minProfiledCallFrequency = 0 .0f ;
1479
+
1480
+ if (frequency < minProfiledCallFrequency)
1477
1481
{
1478
1482
if (comp ()->getOption (TR_TraceCG))
1479
1483
traceMsg (comp (), " - Too infrequent" );
@@ -1508,7 +1512,10 @@ void TR::X86CallSite::computeProfiledTargets()
1508
1512
1509
1513
_useLastITableCache = !comp ()->getOption (TR_DisableLastITableCache) ? true : false ;
1510
1514
// Disable lastITable logic if all the implementers can fit into the pic slots during non-startup state
1511
- if (_useLastITableCache && comp ()->target ().is64Bit () && _interfaceClassOfMethod && comp ()->getPersistentInfo ()->getJitState () != STARTUP_STATE)
1515
+ // Since instruction cache pressure is not very significant at higher opt levels, and new classes could be loaded in the future.
1516
+ // So, keep this opt enabled at higher opt levels to save path length.
1517
+ //
1518
+ if (_useLastITableCache && comp ()->target ().is64Bit () && (comp ()->getMethodHotness () <= warm) && _interfaceClassOfMethod && comp ()->getPersistentInfo ()->getJitState () != STARTUP_STATE)
1512
1519
{
1513
1520
J9::X86::PrivateLinkage *privateLinkage = static_cast <J9::X86::PrivateLinkage *>(getLinkage ());
1514
1521
int32_t numPICSlots = numStaticPICSlots + privateLinkage->IPicParameters .defaultNumberOfSlots ;
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ class X86CallSite
171
171
uint8_t *getThunkAddress () {return _thunkAddress;}
172
172
void setThunkAddress (uint8_t *t) {_thunkAddress = t;}
173
173
174
- float getMinProfiledCallFrequency (){ return .075F ; } // Tuned for megamorphic site in jess; so bear in mind before changing
174
+ float getMinProfiledCallFrequency (){ return .025F ; }
175
175
176
176
public:
177
177
You can’t perform that action at this time.
0 commit comments