-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8355003: Implement Ahead-of-Time Method Profiling #24886
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
base: master
Are you sure you want to change the base?
Conversation
…eredCompilation
👋 Welcome back iveresov! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
@veresov The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
/label hotspot-compiler |
@veresov |
@veresov |
/contributor jrose |
@veresov Syntax:
User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address. |
@veresov Syntax:
User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address. |
@veresov Syntax:
User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address. |
@veresov Syntax:
User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address. |
@veresov Syntax:
User names can only be used for users in the census associated with this repository. For other contributors you need to supply the full name and email address. |
/contributor add jrose |
@veresov |
@veresov |
@veresov |
@veresov |
@veresov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general it is okay.
Please, use UL with (aot, training)
tags for your code.
I noticed (and added comment) that you use guarantee()
which crashes VM when you call new verify
methods. Can you disable TD instead and continue execution?
* @summary Sanity test of combinations of the diagnostic flags [+-]AOTRecordTraining and [+-]AOTReplayTraining | ||
* @requires vm.cds | ||
* @comment work around JDK-8345635 | ||
* @requires !vm.jvmci.enabled |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding:
* @requires vm.cds.supports.aot.class.linking
* @requires vm.flagless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please explain why? @iklam, what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's OK to test without these two additional flags. This will make sure that the two diagnostic flags don't have any bad side effect even if AOT class linking is disabled (due to flags like -XX:+UseZGC).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see them in aotClassLinking/AOTClassLinkingVMOptions.java
test.
@veresov please, add link to your mach5 testing to JBS. And add to description what tests you already ran.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, let's add those two @requires
to be consistent with other tests.
@@ -1725,8 +1793,26 @@ bool MethodData::profile_parameters_for_method(const methodHandle& m) { | |||
} | |||
|
|||
void MethodData::metaspace_pointers_do(MetaspaceClosure* it) { | |||
log_trace(cds)("Iter(MethodData): %p", this); | |||
log_trace(cds)("Iter(MethodData): %p for %p %s", this, _method, _method->name_and_sig_as_C_string()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed yesterday and we need to use aot
instead cds
for Leyden. aot
tag is already in mainline.
I suggest to use new tag (aot, training)
to separate your output from general CDS/AOT output.
@@ -739,6 +767,10 @@ void ArchiveBuilder::relocate_metaspaceobj_embedded_pointers() { | |||
log_info(cds)("Relocating embedded pointers in core regions ... "); | |||
relocate_embedded_pointers(&_rw_src_objs); | |||
relocate_embedded_pointers(&_ro_src_objs); | |||
log_info(cds)("Relocating %zu pointers, %zu tagged, %zu nulled", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log_info(aot)
if it is Leyden related.
bool is_excluded = !holder()->is_loaded() || SystemDictionaryShared::check_for_exclusion(holder(), nullptr); | ||
if (is_excluded) { | ||
ResourceMark rm; | ||
log_debug(cds)("Cleanup KTD %s", name()->as_klass_external_name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log_debug(aot, training)
Improve warm-up time by making profile data from a previous run of an application instantly available, when the HotSpot Java Virtual Machine starts. Specifically, enhance the AOT cache to store method execution profiles from training runs, reducing profiling delays in subsequent production runs.
More details in the JEP: https://bugs.openjdk.org/browse/JDK-8325147
Progress
Issue
Contributors
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/24886/head:pull/24886
$ git checkout pull/24886
Update a local copy of the PR:
$ git checkout pull/24886
$ git pull https://git.openjdk.org/jdk.git pull/24886/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 24886
View PR using the GUI difftool:
$ git pr show -t 24886
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/24886.diff
Using Webrev
Link to Webrev Comment