RFR: 8337987: Relocate jfr and throw_exception stubs from StubGenerator to SharedRuntime [v3]
Hao Sun
haosun at openjdk.org
Fri Sep 20 14:24:43 UTC 2024
On Mon, 19 Aug 2024 08:58:53 GMT, Andrew Dinn <adinn at openjdk.org> wrote:
>> Hi Andrew, I find that we need following add-on change for riscv:
>>
>>
>> diff --git a/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp b/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
>> index dc89e489b24..bed24e442e8 100644
>> --- a/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
>> +++ b/src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
>> @@ -66,6 +66,12 @@
>>
>> #define __ masm->
>>
>> +#ifdef PRODUCT
>> +#define BLOCK_COMMENT(str) /* nothing */
>> +#else
>> +#define BLOCK_COMMENT(str) __ block_comment(str)
>> +#endif
>> +
>> const int StackAlignmentInSlots = StackAlignmentInBytes / VMRegImpl::stack_slot_size;
>>
>> class RegisterSaver {
>> @@ -2742,7 +2748,7 @@ static void jfr_epilogue(MacroAssembler* masm) {
>> // For c2: c_rarg0 is junk, call to runtime to write a checkpoint.
>> // It returns a jobject handle to the event writer.
>> // The handle is dereferenced and the return value is the event writer oop.
>> -static RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
>> +RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
>> enum layout {
>> fp_off,
>> fp_off2,
>> @@ -2780,7 +2786,7 @@ static RuntimeStub* SharedRuntime::generate_jfr_write_checkpoint() {
>> }
>>
>> // For c2: call to return a leased buffer.
>> -static RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
>> +RuntimeStub* SharedRuntime::generate_jfr_return_lease() {
>> enum layout {
>> fp_off,
>> fp_off2,
>
> @RealFYang Thanks!
Hi @adinn , I encountered Client build failure on AArch64 after this commit. Could you help take a look at it when you have spare time? Thanks.
Here shows the configuration
====================================================
The existing configuration has been successfully updated in
/tmp/test123/build-release
using configure arguments '--with-debug-level=release --with-version-opt=git-fe80618bf3f --with-jvm-variants=client'.
Configuration summary:
* Name: /tmp/test123/build-release
* Debug level: release
* HS debug level: product
* JVM variants: client
* JVM features: client: 'cds compiler1 epsilongc g1gc jfr jni-check jvmti management parallelgc serialgc services shenandoahgc vm-structs zgc'
* OpenJDK target: OS: linux, CPU architecture: aarch64, address length: 64
* Version string: 24-internal-git-fe80618bf3f (24-internal)
* Source date: 1726841146 (2024-09-20T14:05:46Z)
Tools summary:
* Boot JDK: openjdk version "22.0.2" 2024-07-16 OpenJDK Runtime Environment (build 22.0.2+9-70) OpenJDK 64-Bit Server VM (build 22.0.2+9-70, mixed mode, sharing) (at /usr/lib/jvm/jdk-22.0.2)
* Toolchain: gcc (GNU Compiler Collection)
* C Compiler: Version 13.2.0 (at /usr/bin/gcc)
* C++ Compiler: Version 13.2.0 (at /usr/bin/g++)
Build performance summary:
* Build jobs: 72
* Memory limit: 587068 MB
And here shows the error msg:
=== Output from failing command(s) repeated here ===
* For target hotspot_variant-client_libjvm_objs_sharedRuntime_aarch64.o:
/tmp/test123/jdk-src/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp: In static member function ‘static RuntimeStub* SharedRuntime::generate_throw_exception(const char*, address)’:
/tmp/test123/jdk-src/src/hotspot/cpu/aarch64/sharedRuntime_aarch64.cpp:2809:3: error: ‘TraceTime’ was not declared in this scope; did you mean ‘traceid’?
2809 | TraceTime timer(timer_msg, TRACETIME_LOG(Info, startuptime));
| ^~~~~~~~~
| traceid
* All command lines available in /tmp/test123/build-release/make-support/failure-logs.
=== End of repeated output ===
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20566#issuecomment-2363857168
More information about the hotspot-dev
mailing list