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

Fix codecache Xlp parsing to use right-most option #7769

Merged
merged 1 commit into from
Dec 3, 2019

Conversation

AlenBadel
Copy link
Contributor

Currently, -Xlp:codecache:pagesize= takes priority no matter what position it is in the passed arguments.
The expected behaviour is that only the right-most instance of -Xlp be parsed, and that is exactly what this commit implements.

Signed-off-by: AlenBadel Alen.Badel@ibm.com

@AlenBadel
Copy link
Contributor Author

A good example of the expected behaviour can be displayed by running

java -Xlp:codecache:pagesize=16M -Xlp64K
The current codecache will end up using 16M large pages, even when -Xlp64K is the right most option.

The expected behaviour is that 64K large pages be used. The objectheap has the correct behaviour. The following will cause the objectheap to use 64K large pages.
java -Xlp:objectheap:pagesize=16M -Xlp64K

See discussion: #4930

@AlenBadel
Copy link
Contributor Author

FYI @gita-omr @pshipton

@gita-omr
Copy link
Contributor

I wonder if we have any test cases to test this...

@pshipton
Copy link
Member

There are tests for -Xlp
https://github.com/eclipse/openj9/blob/master/test/functional/VM_Test/src/j9vm/test/xlp/XlpOptionsTestRunner.java
and tests for -Xlp:codecache, just not for combining -Xlp:codecache and -Xlp options. It should be easy enough to add some to this suite. I see the -Xlp tests have cases with multiple options.
https://github.com/eclipse/openj9/blob/master/test/functional/VM_Test/src/j9vm/test/xlpcodecache/XlpCodeCacheOptionsTestRunner.java

@pshipton
Copy link
Member

jenkins test sanity win jdk8

@pshipton
Copy link
Member

jenkins test sanity aix,plinux,zlinux jdk8

@pshipton
Copy link
Member

@smlambert @llxia I can't find any evidence that the xlp tests are running, can you please check.

I found this in the J9vmTest output:

  [j9vm.test.xlp] expiry: none :: This test is run separately and not as part of j9vm test suite
  [j9vm.test.xlpcodecache] expiry: none :: This test is run separately and not as part of j9vm test suite

@pshipton
Copy link
Member

They are extended tests which are running internally but I don't find them at OpenJ9.

@pshipton
Copy link
Member

Please squash.

@gita-omr
Copy link
Contributor

There are tests for -Xlp
https://github.com/eclipse/openj9/blob/master/test/functional/VM_Test/src/j9vm/test/xlp/XlpOptionsTestRunner.java
and tests for -Xlp:codecache, just not for combining -Xlp:codecache and -Xlp options. It should be easy enough to add some to this suite. I see the -Xlp tests have cases with multiple options.
https://github.com/eclipse/openj9/blob/master/test/functional/VM_Test/src/j9vm/test/xlpcodecache/XlpCodeCacheOptionsTestRunner.java

@AlenBadel let's add the missing combinations.

@AlenBadel AlenBadel force-pushed the codecacheindex branch 2 times, most recently from 36d27a7 to 5394a8d Compare November 15, 2019 19:01
@pshipton
Copy link
Member

fyi the copyright check failed, and there is a merge conflict.

Currently, -Xlp:codecache:pagesize=<size> takes priority no matter what position it is in the passed arguments.
The expected behaviour is that only the right-most instance of -Xlp be parsed, and that is exactly what this commit implements.

Signed-off-by: AlenBadel <Alen.Badel@ibm.com>
@AlenBadel
Copy link
Contributor Author

@AlenBadel let's add the missing combinations.

This test seems to just verify the objectheap page size.

 * This test checks different flavors of -Xlp option except -Xlp:codecache
 * It uses -Xlp options along with -verbose:gc to verify the working of -Xlp options.

This test would need to be modified to pull the codecache sizes.

I agree that we need to add the codecache option variations to this, but we also need to add tests for the two proposed hotspot mappings -XX:+UseLargePages and XX:LargePageSizeInBytes=<size> proposed in #4930.

I propose that I add it as a to-do item in the main issue above, and we make this test change to add tests for codecache, and the two mapped options together when the final changes are in.

@gita-omr
Copy link
Contributor

Sure, let's open a separate item for the new test cases.

@AlenBadel
Copy link
Contributor Author

AlenBadel commented Nov 16, 2019

Sure, let's open a separate item for the new test cases.

See #4930 (comment)
I've commented inside the parent issue as a requirement.

@AlenBadel
Copy link
Contributor Author

@dmitripivkine Could you kindly review the comments I left on your comment, and resolve it if you don't have any further concerns?

@dmitripivkine dmitripivkine requested review from dmitripivkine and removed request for dmitripivkine December 2, 2019 15:44
@dmitripivkine
Copy link
Contributor

I still have concerns about form of the change (mix functional and comment changes, comments format change is unnecessary). This is up to code owners keep change reasonable. However I have not reviewed this change functionally. I believe this change should be approved by code owner (JIT) reviewer

@AlenBadel
Copy link
Contributor Author

@gita-omr Could I request that you review this functionally?

@gita-omr
Copy link
Contributor

gita-omr commented Dec 2, 2019

@gita-omr Could I request that you review this functionally?

Sure, a little bit later today.

@gita-omr gita-omr merged commit c04ed15 into eclipse-openj9:master Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants