Skip to content
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

Update port library's processor detection APIs and enums #4803

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

harryyu1994
Copy link
Contributor

@harryyu1994 harryyu1994 commented Feb 3, 2020

This change involves updating the omrsysinfo_get_x86_description() API and
a few enums.

Issue: #4339

Signed-off-by: Harry Yu harryyu1994@gmail.com

@harryyu1994 harryyu1994 marked this pull request as ready for review February 4, 2020 18:43
@harryyu1994 harryyu1994 changed the title WIP: Update port library's omrsysinfo_get_x86_description Update port library's omrsysinfo_get_x86_description Feb 4, 2020
@harryyu1994
Copy link
Contributor Author

harryyu1994 commented Feb 4, 2020

The purpose of this change is to move x86's processor feature detection out of codegen and into the CPU class. We also would like the CPU class to use the port library for feature detection. I referenced this file(https://github.com/eclipse/omr/blob/master/compiler/x/runtime/X86Runtime.hpp) for the change.

There are 3 steps to this whole thing and this change is step 1:

  1. Update the x86 processor feature detection port library implementation
  2. Add the x86 processor feature queries to the CPU class
  • the queries are currently in codegen
  • we would like the queries to use the port library implementation instead for processor feature detection
  1. Switch the usage of queries to the new implementation in the CPU class

@harryyu1994
Copy link
Contributor Author

@0xdaryl @andrewcraik I've seen you guys review related changes before, could you guys take a look?

@harryyu1994
Copy link
Contributor Author

@rwy0717 @0xdaryl @youngar @mstoodle @charliegracie Could anyone help review this one? thanks!

port/common/omrsysinfo_helpers.c Outdated Show resolved Hide resolved
port/common/omrsysinfo_helpers.c Outdated Show resolved Hide resolved
@harryyu1994
Copy link
Contributor Author

I introduced another small change in "port/unix/omrsysinfo.c" that fixes a few Macro typos.

@harryyu1994
Copy link
Contributor Author

harryyu1994 commented Feb 12, 2020

Attaching the list of references used for this change, I figured this may help the reviewers:

OpenJ9's Processor Detection on x86 is all-over the place, there are 3 different variations in the code base with only one being up-to-date. OpenJ9 x86 codegen's implementation seems to be the most up-to-date one and is what I referenced(mostly).
This change unifies everything into one location.

@harryyu1994 harryyu1994 changed the title Update port library's omrsysinfo_get_x86_description Update port library's processor detection APIs and enums Feb 13, 2020
@rwy7
Copy link
Contributor

rwy7 commented Feb 13, 2020

@genie-omr build all

@harryyu1994
Copy link
Contributor Author

harryyu1994 commented Feb 13, 2020

13:58:48  /home/jenkins/workspace/PullRequest-linux_390-64/port/common/omrsysinfo_helpers.c:41:19: fatal error: cpuid.h: No such file or directory
13:58:48   #include <cpuid.h>
13:58:48                     ^
13:58:48  compilation terminated.

Looking into it..

Should be disabled on non-x86 platforms

This change involves updating the omrsysinfo_get_x86_description() API and
a few enums.

Issue: eclipse-omr#4339

Signed-off-by: Harry Yu <harryyu1994@gmail.com>
@harryyu1994
Copy link
Contributor Author

@rwy0717 Could we re-launch the builds/tests?

@rwy7
Copy link
Contributor

rwy7 commented Feb 14, 2020

@genie-omr build all

@harryyu1994
Copy link
Contributor Author

@rwy0717 Thanks for the review, could this be merged now? Also, I'm wondering if you could review this short PR too(#4838). That one is related to port library cpu detection as well.

@rwy7 rwy7 merged commit 5d93585 into eclipse-omr:master Feb 20, 2020
@harryyu1994 harryyu1994 deleted the portCPU branch February 21, 2020 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants