-
Notifications
You must be signed in to change notification settings - Fork 720
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
Comment and reword assert in Recompilation for jProfiling #2349
Comment and reword assert in Recompilation for jProfiling #2349
Conversation
@andrewcraik @fjeremic This PR contains changes related to switching to counting based recompilation for jProfiling body similar to JIT Profiling. Can you please review this? |
@@ -167,7 +167,7 @@ TR::Instruction *TR_PPCRecompilation::generatePrologue(TR::Instruction *cursor) | |||
else | |||
{ | |||
// This only applies to JitProfiling, as JProfiling uses sampling | |||
TR_ASSERT(_compilation->getProfilingMode() == JitProfiling, "JProfiling should use sampling to trigger recompilation"); | |||
//TR_ASSERT(_compilation->getProfilingMode() == JitProfiling, "JProfiling should use sampling to trigger recompilation"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't comment out asserts - if it is supposed to be removed please delete it
@@ -182,7 +182,7 @@ TR::Instruction *TR_X86Recompilation::generatePrologue(TR::Instruction *cursor) | |||
else | |||
{ | |||
// This only applies to JitProfiling, as JProfiling uses sampling | |||
TR_ASSERT(_compilation->getProfilingMode() == JitProfiling, "JProfiling should use sampling to trigger recompilation"); | |||
//TR_ASSERT(_compilation->getProfilingMode() == JitProfiling, "JProfiling should use sampling to trigger recompilation"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
@@ -207,7 +207,8 @@ J9::Recompilation::beforeOptimization() | |||
// | |||
if (self()->isProfilingCompilation()) // this asks the bodyInfo | |||
{ | |||
_useSampling = _compilation->getProfilingMode() != JitProfiling; | |||
//_useSampling = _compilation->getProfilingMode() != JitProfiling; | |||
_useSampling = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't leave old code around - if this should be false make it false.
The expert on compilation control is @mpirvu so we should get his thoughts on this change. It seems reasonable to me, but I am too close to the change to make an objective assessment. |
@r30shah please fix the copyright check |
68fbbf1
to
ce84ae6
Compare
@mpirvu I think a review from you on this would be best. |
On the surface the code looks good, but I remember that long time ago we wanted to retire counting compilations completely. |
@mpirvu So JProfiling wants to use its own counters to determine when the method should be recompiled. We don't want sampling to see the slower profiling body and trigger a compilation before we are ready if that makes sense. |
Sampling for "sampling body" can be disabled with bodyInfo->setDisableSampling(true); we do this in a few places in the code. |
Looking in to the J9Recompilation code : https://github.com/eclipse/openj9/blob/91b1c6a3bfe90390f4fdc59f230794be2e692b17/runtime/compiler/control/J9Recompilation.cpp#L297 |
12ba774
to
708f02b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@r30shah please fix the copyright issue so this can be merged |
@mpirvu could you handle this one since I'm going to be away? |
708f02b
to
15f1fb0
Compare
jProfiling should not use either sampling or counting to trip recompilation. For this kind of method bodies, we have emitted recompilation test to check method invocation count and loop frequency against tuned threshold to trip recompilation. Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
15f1fb0
to
9163a4f
Compare
Fixwed copyright and also title. This just rewords the Assert we had in Recompilation for both x86 and PPC platform in jProfiling. |
jenkins test all |
Windows error is because of #2129 |
jProfiling should not use either sampling or counting to trip recompilation. For this kind of method bodies, we have emitted recompilation test to check method invocation count and loop frequency against tuned threshold to trip recompilation.
Signed-off-by: Rahil Shah rahil@ca.ibm.com