RFR: 8343767: Enumerate StubGen blobs, stubs and entries and generate code from declarations
Vladimir Ivanov
vlivanov at openjdk.org
Wed Nov 20 15:28:29 UTC 2024
On Thu, 7 Nov 2024 14:54:32 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
> Implementation of JDK-8343767
Nice refactoring, Andrew!
Very nice! I like how the patch shapes.
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 208:
> 206: StubGenStubId stub_id = StubGenStubId::call_stub_id;
> 207: const char* stub_name = StubRoutines::get_stub_name(stub_id);
> 208: StubCodeMark mark(this, "StubRoutines", stub_name);
Cleanup suggestion: `StubGenStubId` could be passed as an argument into `StubCodeMark` constructor and name lookup performed there instead. The pattern is very common.
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp line 427:
> 425: address generate_catch_exception() {
> 426: StubGenStubId stub_id = StubGenStubId::catch_exception_id;
> 427: StubCodeMark mark(this, stub_id);
Stylistic suggestion: for such trivial cases, you can simply pass `StubGenStubId` constant as an argument. No need to declare a local for it.
src/hotspot/share/runtime/stubDeclarations.hpp line 738:
> 736: do_entry(compiler, bigIntegerLeftShiftWorker, \
> 737: bigIntegerLeftShiftWorker, bigIntegerLeftShift) \
> 738: AARCH64_ONLY( \
It's unfortunate to see platform-specific declarations in `stubDeclarations.hpp`. Any chances to keep them in CPU-specific files (as it is shaped now)?
-------------
PR Review: https://git.openjdk.org/jdk/pull/21957#pullrequestreview-2421873447
PR Review: https://git.openjdk.org/jdk/pull/21957#pullrequestreview-2434938472
PR Review Comment: https://git.openjdk.org/jdk/pull/21957#discussion_r1833200070
PR Review Comment: https://git.openjdk.org/jdk/pull/21957#discussion_r1841488585
PR Review Comment: https://git.openjdk.org/jdk/pull/21957#discussion_r1833746698
More information about the hotspot-dev
mailing list