- Notifications
You must be signed in to change notification settings - Fork 776
OpenJ9 support for new OMR compiler tracing and logging infrastructure #22751
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
base: master
Are you sure you want to change the base?
Conversation
dsouzai left a comment
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.
Overall LGTM, just had a couple of questions.
I see some places where a traceMsg is replaced with if (trace) log->printf; why not use trprintf(trace, log, ...)? I thought doing if (trace) was supposed to be an anti-pattern?
| if (debug("traceConditionalHelperEvaluator")) | ||
| { | ||
| diagnostic("conditionalHelperEvaluator: Adding deps from " POINTER_PRINTF_FORMAT "\n", cursor); | ||
| } | ||
| for (int32_t i = 0; i < cursorDeps->getNumPostConditions(); i++) | ||
| { | ||
| TR::RegisterDependency *cursorPostCondition = cursorDeps->getPostConditions()->getRegisterDependency(i); | ||
| postConditions->unionPostCondition(cursorPostCondition->getRegister(), cursorPostCondition->getRealRegister(), cg); | ||
| if (debug("traceConditionalHelperEvaluator")) | ||
| { | ||
| TR_Debug *debug = cg->getDebug(); | ||
| diagnostic("conditionalHelperEvaluator: [%s : %s]\n", debug->getName(cursorPostCondition->getRegister()), debug->getName(machine->getRealRegister(cursorPostCondition->getRealRegister()))); | ||
| } |
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.
Why are these removed?
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.
One of the early goals of this effort was to deprecate the diagnostic macros. They are only available in DEBUG mode which nobody builds with anymore and would frankly have to derive from first principles even how to do it. The effort involves not just deleting the diagnostic macros, but reasoning about which ones might actually be useful and then "promoting" them to the production build.
However, that goal became secondary as this work evolved. OpenJ9 took an initial stab at a few obvious diagnostic macros in one of its commits. An initial diagnostic cleanup commit is still present in this PR, though it is not an exhaustive cleanup.
In this particular instance in the X codegen, I considered the utility of the information conveyed by this diagnostic macro and how often one may have needed it in the past 9 years.
I could remove the diagnostic cleanup commit from this PR and save it for later. I'll defer to your opinion.
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.
I could remove the diagnostic cleanup commit from this PR and save it for later. I'll defer to your opinion.
No I think it's fine to leave in this PR, just wanted to make sure there was a good reason for it is all.
Probably just an oversight. I found a couple of these places and will fix in next force push. Thanks for pointing that out. |
hzongaro left a comment
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.
The comment for commit 0ce5f35 has a line longer than 72 characters. I think the changes look good otherwise, so I'll go ahead and approve. Thanks!
| Jenkins test sanity all jdk21 depends eclipse-omr/omr#7978 |
| Jenkins test sanity all jdk21 depends eclipse-omr/omr#7978 |
| Linux x86-64 failure is #19047 |
* Use OMR::Logger in place of TR::FILE * Replace uses of trfprintf with equivalent OMR::Logger function Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Guard tracing with checks for tracing enabled if missing. Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Either guard with an appropriate tracing option (preferred) or use `isEnabled_DEPRECATED()` in situations that require non-trivial refactoring. Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
The assert may fire before a Logger is installed on the Compilation object. Check if the Logger exists before logging. Signed-off-by: Daryl Maier <maier@ca.ibm.com>
Signed-off-by: Daryl Maier <maier@ca.ibm.com>
| The latest force push uses In a subsequent PR, I will do work to clean this up and address this difference. In the meantime, for the purposes of this initial Logger implementation, fall back to using Usage of C stdio Loggers can be forced in OpenJ9 with a new |
| I would like this merged AFTER the 0.57 code split, currently targeted for Nov. 14, 2025. |
| Jenkins test sanity all jdk21 depends eclipse-omr/omr#7978 |
| Internal testing on 32-bit platforms for JDK 8 was successful. |
| x86-64 Linux failure is #10847. |
| Windows failures appear test-setup related (shared classes) and both failures passed on re-run in a grinder. |
This PR contains the OpenJ9 JIT changes required to support the new OMR compiler tracing and logging infrastructure (eclipse-omr/omr#7978). See the OMR PR for details.
This has a breaking dependency on eclipse-omr/omr#7978 and requires a coordinated merge.