Skip to content

Add information regarding synchronous compilations in javacore#24236

Open
dev-koan wants to merge 2 commits into
eclipse-openj9:masterfrom
dev-koan:feature/SyncCompInfo
Open

Add information regarding synchronous compilations in javacore#24236
dev-koan wants to merge 2 commits into
eclipse-openj9:masterfrom
dev-koan:feature/SyncCompInfo

Conversation

@dev-koan

Copy link
Copy Markdown
Contributor

Added a struct in J9JITConfig to store information regarding synchronous compilations and print them in javacore file.

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

@dev-koan dev-koan force-pushed the feature/SyncCompInfo branch 3 times, most recently from fbec998 to 2d33ba0 Compare July 2, 2026 14:00
@mpirvu mpirvu self-assigned this Jul 2, 2026

@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.

We have one decision to make: do we want to measure the times needed for synchronous compilations to be performed or the waiting time of application threads? there could be several application threads waiting for the same compilation to finish.

Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/compiler/control/CompilationThread.cpp
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/compiler/control/rossa.cpp Outdated
Comment thread runtime/oti/j9nonbuilder.h Outdated
Comment thread runtime/rasdump/javadump.cpp Outdated
@dev-koan dev-koan force-pushed the feature/SyncCompInfo branch 2 times, most recently from 43f338e to 177844e Compare July 3, 2026 19:21
@dev-koan dev-koan requested a review from mpirvu July 3, 2026 19:22
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/oti/j9nonbuilder.h Outdated
@dev-koan dev-koan force-pushed the feature/SyncCompInfo branch from 543fdd6 to 0825011 Compare July 6, 2026 17:23
@dev-koan dev-koan requested a review from mpirvu July 6, 2026 17:26
@dev-koan dev-koan force-pushed the feature/SyncCompInfo branch from 0825011 to 3ffce49 Compare July 6, 2026 17:46
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/compiler/control/CompilationThread.cpp Outdated
Comment thread runtime/oti/j9nonbuilder.h Outdated
@dev-koan dev-koan requested a review from mpirvu July 6, 2026 18:59

@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. Please post an example of the output.

@mpirvu

mpirvu commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Also, please squash the 4 commits into 1.

@dev-koan

dev-koan commented Jul 6, 2026

Copy link
Copy Markdown
Contributor Author

LGTM. Please post an example of the output.

image

@dev-koan dev-koan force-pushed the feature/SyncCompInfo branch from 3ffce49 to 75bbae1 Compare July 6, 2026 19:18
@dev-koan dev-koan marked this pull request as ready for review July 6, 2026 19:19
@amicic amicic added the comp:ras label Jul 8, 2026
@amicic

amicic commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

We have one decision to make: do we want to measure the times needed for synchronous compilations to be performed or the waiting time of application threads? there could be several application threads waiting for the same compilation to finish.

Ideally, i'd like to see each app thread maintain its own longest wait time (and associated info). For brevity, only threads that have wait times longer than a certain threshold (like 3ms or 10ms) should be reported it to javacore.

@mpirvu

mpirvu commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

If each thread maintains the name of the sync method, with long method names and many threads there could be some footprint increase. I like the idea of applying some filtering and not include quick compilations.

@mpirvu

mpirvu commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

@amicic To clarify: each app thread that is subject to a wait due to a synchronous compilation will have a dynamically allocated string in J9VMThread struct (to hold the name of the method it waited for). This string needs to be freed when the thread is destroyed.
Caveat: if the thread gets destroyed before the javacore generation happen, the wait info will be lost.

Added a struct in J9JITConfig to store information regarding
synchronous compilations and print them in javacore file.

Signed-off-by: Dev Agarwal <dev.agarwal@ibm.com>
@dev-koan dev-koan force-pushed the feature/SyncCompInfo branch from 75bbae1 to 286bba4 Compare July 14, 2026 15:42
@dev-koan dev-koan requested a review from dsouzai as a code owner July 14, 2026 15:42
@dev-koan dev-koan force-pushed the feature/SyncCompInfo branch from 286bba4 to ee2ee8c Compare July 14, 2026 15:46
@dev-koan dev-koan force-pushed the feature/SyncCompInfo branch from ee2ee8c to 1ca1fb1 Compare July 14, 2026 15:48
@dev-koan dev-koan requested a review from mpirvu July 14, 2026 15:51
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