Skip to content

Add information regarding memory disclaiming in javacore - #24587

Open
dev-koan wants to merge 1 commit into
eclipse-openj9:masterfrom
dev-koan:feature/DisclaimInfo
Open

Add information regarding memory disclaiming in javacore#24587
dev-koan wants to merge 1 commit into
eclipse-openj9:masterfrom
dev-koan:feature/DisclaimInfo

Conversation

@dev-koan

@dev-koan dev-koan commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Added a struct to J9JITConfig to store information regarding memory disclaiming. The information was collected in J9Options class and printed in java core file.

Signed-off-by: Dev Agarwal dev.agarwal@ibm.com

@dev-koan

Copy link
Copy Markdown
Contributor Author
0SECTION       Memory disclaim info dump routine
NULL           ------------------------------------------------------------------------
1CIDISCLSUBS   Disclaim subsystem status
NULL           ------------------------------------------------------------------------
2CIDISCLDATA   Data cache disclaim:               enabled
2CIDISCLIPRO   IProfiler data disclaim:           enabled
2CIDISCLRTAM   Runtime assumption disclaim:       enabled
2CIDISCLCODE   Code cache disclaim:               disabled
2CIDISCLSCC    Shared class cache disclaim:       enabled
NULL           ------------------------------------------------------------------------
2CIDISCLBMED   Disclaim Backing medium: swap
NULL           ------------------------------------------------------------------------
1CIDISCLDEV    Backing device I/O statistics
NULL           ------------------------------------------------------------------------
2CIDISCLDEVN   Device name:                      dm-0
2CIDISCLRDIO   Read I/Os:                        6221
2CIDISCLRDTK   Read ticks (ms):                  4193
2CIDISCLWRIO   Write I/Os:                       50599
2CIDISCLWRTK   Write ticks (ms):                 62408
2CIDISCLIOFLT  I/Os in flight:                   0
2CIDISCLIOTK   I/O ticks (ms):                   100941
2CIDISCLLAVG   Weighted avg latency (us):        1082
NULL           ------------------------------------------------------------------------

@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch 3 times, most recently from 52f0e53 to 9cdd1e4 Compare August 19, 2026 15:18
@dev-koan

Copy link
Copy Markdown
Contributor Author

FYI: @ymanton

@keithc-ca
keithc-ca self-requested a review August 19, 2026 15:23
Comment thread runtime/compiler/control/J9Options.cpp Outdated
Comment thread runtime/compiler/control/J9Options.cpp Outdated
Comment thread runtime/oti/j9nonbuilder.h Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
@dev-koan
dev-koan requested a review from keithc-ca August 19, 2026 17:58
Comment thread runtime/compiler/control/J9Options.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
@dev-koan
dev-koan requested a review from keithc-ca August 20, 2026 16:28
Comment thread runtime/oti/j9nonbuilder.h Outdated
@dev-koan
dev-koan requested a review from keithc-ca August 20, 2026 18:51
Comment thread runtime/compiler/control/J9Options.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
@dev-koan
dev-koan requested a review from keithc-ca August 20, 2026 20:11
@keithc-ca

Copy link
Copy Markdown
Contributor

I think this change is good, but I'd like to see it squashed and also reviewed by the JIT team.

@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch from c76e626 to a62fe53 Compare August 20, 2026 21:09

@mpirvu mpirvu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.
A couple of suggestions:

  • If all disclaiming is disabled, disk stats are irrelevant and they should not be collected
  • Disclaiming is only available on Linux. Should we print anything on all the other platforms?

@mpirvu
mpirvu requested a review from ymanton August 24, 2026 05:35
@dev-koan

Copy link
Copy Markdown
Contributor Author

LGTM. A couple of suggestions:

  • If all disclaiming is disabled, disk stats are irrelevant and they should not be collected
  • Disclaiming is only available on Linux. Should we print anything on all the other platforms?
  • I am not collecting the disk stats anywhere but using an omr method call so it should be fine ...
  • Yes the second point make sense, will update.

@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch from a62fe53 to 296b3c7 Compare August 24, 2026 15:24
@mpirvu

mpirvu commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

I am not collecting the disk stats anywhere but using an omr method call so it should be fine

Those omr methods internally open/scan/parse/close pseudo files. I'll let @ymanton comment on their overhead.

@dev-koan

Copy link
Copy Markdown
Contributor Author

I am not collecting the disk stats anywhere but using an omr method call so it should be fine

Those omr methods internally open/scan/parse/close pseudo files. I'll let @ymanton comment on their overhead.

Ok makes sense, will update.

@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch from 296b3c7 to 9560e1e Compare August 24, 2026 18:06

@ymanton ymanton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good so far, but it only covers a subset of the possible situations. The disclaimOnFile and disclaimOnSwap flags apply to the disclaimable memory areas that can be backed by a file or the swap, but they don't apply to the SCC, which is implicitly always backed by a file. We need to also get the device that the SCC file is on, and print the stats for that, but only if the device is different from the device we looked up for the other memory areas (otherwise info on the same device will be printed twice).

@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch 2 times, most recently from 7ad9260 to b72e53b Compare August 25, 2026 14:32
@dev-koan

Copy link
Copy Markdown
Contributor Author

Will paste the new output.
Not sure if i could've used a helper method here to print the disk stats/

@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch from b72e53b to 98bbf11 Compare August 25, 2026 15:08
Comment thread jcl/.project Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch from 98bbf11 to ccca7e9 Compare August 25, 2026 19:56
Comment thread runtime/rasdump/javadump.cpp Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
@keithc-ca

Copy link
Copy Markdown
Contributor

Please fix the language in the commit message. Perhaps in "Added a struct a J9JITConfig" you meant "Added a struct to J9JITConfig"?

@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch from ccca7e9 to 17ec2a1 Compare August 26, 2026 14:15
@dev-koan

Copy link
Copy Markdown
Contributor Author
0SECTION       Memory disclaim info dump routine
NULL           ------------------------------------------------------------------------
1CIDISCLSUBS   Disclaim subsystem status
NULL           ------------------------------------------------------------------------
2CIDISCLDATA   Data cache disclaim:               enabled
2CIDISCLIPRO   IProfiler data disclaim:           enabled
2CIDISCLRTAM   Runtime assumption disclaim:       enabled
2CIDISCLCODE   Code cache disclaim:               disabled
2CIDISCLSCC    Shared class cache disclaim:       enabled
NULL           ------------------------------------------------------------------------
1CIDISCLBMED   Disclaim backing medium: swap
NULL           ------------------------------------------------------------------------
1CIDISCLDEV    Backing device I/O statistics
NULL           ------------------------------------------------------------------------
2CIDISCLDEVN   Device name:                       dm-0
2CIDISCLRDIO   Read I/Os:                         5741
2CIDISCLRDTK   Read ticks (ms):                   3209
2CIDISCLWRIO   Write I/Os:                        29948
2CIDISCLWRTK   Write ticks (ms):                  59359
2CIDISCLIOFLT  I/Os in flight:                    0
2CIDISCLIOTK   I/O ticks (ms):                    12384
2CIDISCLLAVG   Weighted average latency (us):     1462
NULL           ------------------------------------------------------------------------

@dev-koan

Copy link
Copy Markdown
Contributor Author

^ is the latest output not sure if there should have been info printed regarding SCC device and disk stats separately. Ran it on x86 linux fyre vm.

@keithc-ca

Copy link
Copy Markdown
Contributor

In the line

1CIDISCLBMED   Disclaim backing medium: swap

perhaps swap should line up with other values.

Added a struct to J9JITConfig to store information
regarding memory disclaiming. The information was collected
in J9Options class and printed in java core file.

Signed-off-by: Dev Agarwal <dev.agarwal@ibm.com>
@dev-koan
dev-koan force-pushed the feature/DisclaimInfo branch from 17ec2a1 to 28b7a4b Compare August 26, 2026 17:53
@dev-koan
dev-koan marked this pull request as ready for review August 27, 2026 14:03
@dev-koan
dev-koan requested a review from dsouzai as a code owner August 27, 2026 14:03
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.

4 participants