-
Notifications
You must be signed in to change notification settings - Fork 721
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
Add processor version in javacore file #5532
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: gaoli <gaolibj@cn.ibm.com>
Thanks for the contribution @gaolibj. Can you explain the benefit of adding this information to the javacore? What does having it in the javacore enable you to do? I'm also concerned about the approach taken here as it's very IBM i specific and it doesn't feel like it's well factored with the rest of the code base. The mapping from enum to |
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.
See previous discussion comment
On IBM i, we have some limitation for different processor types, especially for the new released processor. To accelerate issue fixing, we want to get the processor version quickly from javacore file. So, we added this line for IBM i platform. |
Yes, this change should be kept up to date with enum J9ProcessorArchitecture. Seems the definition of the enum will not change frequently. We will keep an eye on it? Or do you have any other better solutions? |
IMO if we're going down this route we need to make the solution robust enough so we print the detected processor information for all platforms. I do agree though the processor information is useful in the javacore especially for JIT related problems since you don't have to dig through the core or ask for additional logging to extract the processor info. |
@DanHeidinga do you have more comments? Or better solutions? |
#if defined(J9OS_I5) | ||
J9ProcessorDesc desc; | ||
memset(&desc, 0, sizeof(J9ProcessorDesc)); | ||
(void)j9sysinfo_get_processor_description(&desc); |
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.
This should handle the return value, not cast it away
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.
Searched all codes in eclipse/openj9. Seems most of the case doesn't handle the return value.
As I've dug into this code, I'm not enthusiastic about this feature as it's the kind of thing that tends to rot without a lot of deliberate effort. This PR would add an And the I think we need to find a better way to consistently get this information rather than relying on enum to string mappings which will always be out of date. Options to provide this info in the javacore:
In the bigger picture, the JIT and port library should share a common implementation of the processor detection code so there's only 1 place to keep up to date. If that were the case, it becomes reasonable to rely on the common processor detection code to name the processor in the javacore |
Indeed this is the true solution. We have been doing cleanup in this area recently with the final goal of moving processor detection into the OMR port library. |
Seems it's a common requirement for all platforms. I agree it's better if we can find a better way to consistently get this information instead of relying on enum to string mappings. BUT the options you mentioned in your update doesn't work on i platform as we don't have |
Can I know your detailed changes related to processor detection? |
My most recent work was on Z in #3956. I have not had time since to work on this however. |
Do we need a docs:external label for this one please? |
@SueChaplain This might qualify for a release note. Has the javacore format been documented? I was under the impression it hadn't been as it occasionally changes |
Closing due to lack of updates. We can reopen or restart this if interest picks up again later |
@DanHeidinga - I know this is closed now, but for future reference we do try and keep up with changes in the javacore files: https://www.eclipse.org/openj9/docs/dump_javadump/ If this gets re-opened, we should assign a docs-external and update the doc. |
Sorry for missing this issue. Can we reopen this issue? Seems I don't have authority to do it. We still have requirement to update javacore. @DanHeidinga |
Reopened. |
Reopened. |
This is nearly complete as part of #7710 and eclipse-omr/omr#1644. The processor detection has already sunk into the OMR port library, and the JIT compiler has been hooked up to consume the port library processor detection. The last step that is needed is to initialize the port library for use in the compiler. Whatever solution we come up with here should be cross platform and available on all architectures via the port library. |
@fjeremic Do you mean the processor information will be print into javacore file for all platforms by your solution? If so, let me know when the feature is available. Then I will verify it on IBM i platform. Thanks. |
No, I meant the processor detection is sunk into OMR port library, so it is a common place where both the JIT compiler and RAS utility (javacore) can query. What you have here, i.e. using the |
@fjeremic Got it. Thanks for your explanation. |
Can one of the admins verify this patch? |
Add processor version in javacore file.
3XHCPUVERS Version : PROCESSOR_PPC_P7