-
Notifications
You must be signed in to change notification settings - Fork 706
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
Use ranges for compilation thread IDs #16612
Conversation
@mpirvu could you please review? |
I grepped for |
JFYI in case it's helpful: see #12926 as a reference point for finding places in the code that iterate through compilation thread IDs. |
Sometimes we have this form of iteration: |
The only place I found this form was in the |
This commit adds four new member variables in the TR::CompilationInfo class to specify the first and last compilation thread IDs, and the first and last diagnostic thread IDs. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
Rather than assuming that the first n IDs are compilation threads followed by the diagnostic thread, use APIs from the previous commits to determine the thread ID ranges. Signed-off-by: Irwin D'Souza <dsouzai.gh@gmail.com>
604985a
to
c671f54
Compare
@mpirvu good for review again. |
|
I took a closer look at the code, and it doesn't look like there's any assumption about the compThread ID having to start at 0. When the CRIU changes are added, In openj9/runtime/compiler/infra/J9MonitorTable.cpp Lines 233 to 240 in 219f2e8
as long as In openj9/runtime/compiler/infra/J9MonitorTable.cpp Lines 243 to 258 in 219f2e8
the assert is again just checking that It should be noted that |
Ok. I missed that |
jenkins test sanity all jdk17 |
This PR facilitates options processing post restore, specifically wrt to the number of compilation threads. In order to allow a user to change the number of compilation threads post restore, the JIT will likely have to create a set number of threads and then choose how many to actually allow to be activated.
However, because the current assumption is that the diagnostic thread ID is one more than the number of compilation threads, it complicates the code when taking into account that the number of compilation threads could change. Therefore, in this PR, the code is updated to use thread ID ranges rather than simply assuming the thread ID starts at 0 and goes up to the number of compilation threads.