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

refactor: replace -h with value provided by MemoryMXBean #76

Merged
merged 7 commits into from
Dec 5, 2024

Conversation

kcpeppe
Copy link
Contributor

@kcpeppe kcpeppe commented Nov 25, 2024

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@earthling-amzn
Copy link
Contributor

Hello! Thank you for this contribution.

The change to detect compressed oops configuration looks good. However, I believe the intent with heap size (-h) was that it represent the maximum heap size (see description of constructor parameter). For this reason, I believe we want MemoryUsage::getMax instead of MemoryUsage::getCommitted.

This change will also break the tests: SimpleRunConfigTest::DefaultStringsTest and SimpleRunConfigTest::StringArgsTest. I think it's fine to just remove the failing assertion, since the benchmark will no longer accept the -h parameter. I realize now that the recent removal of the security manager also breaks a couple of tests. I will fix these separately and will not hold you accountable for them. 😅

Copy link
Contributor

@earthling-amzn earthling-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix related tests in SimpleRunConfigTest.

@kcpeppe
Copy link
Contributor Author

kcpeppe commented Dec 4, 2024

I'll take a look at the security manager issues at the same time as fixing the max heap issue.

@kcpeppe
Copy link
Contributor Author

kcpeppe commented Dec 4, 2024

all of the tests aside from the security manager should be functional now.

Copy link
Contributor

@earthling-amzn earthling-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing the tests and this contribution!

@earthling-amzn earthling-amzn merged commit e7c1bcd into corretto:master Dec 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants