RFR: 8377798: Hotspot build on macOS aarch64 with unused-functions warning reports some unused functions
Matthias Baesken
mbaesken at openjdk.org
Thu Feb 19 15:54:02 UTC 2026
On Thu, 12 Feb 2026 15:59:26 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> We currently set a warning for unused functions for gcc and clang, but later disable it for clang in the libjvm build.
> See
> https://github.com/openjdk/jdk/blob/master/make/hotspot/lib/CompileJvm.gmk#L105
>
> I checked why it might be disabled for clang and there are a few functions/methods reported as unused, probably we can remove some or all of those ?
>
> macOS aarch64 product build shows:
>
>
> /myjdk/jdk/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp:179:20: warning: unused function 'is_thread_local' [-Wunused-function]
> static inline bool is_thread_local(ConstBufferPtr buffer) {
> ^
> /myjdk/jdk/src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp:184:20: warning: unused function 'is_virtual_thread_local' [-Wunused-function]
> static inline bool is_virtual_thread_local(ConstBufferPtr buffer) {
> ^
> 2 warnings generated.
> /myjdk/jdk/src/hotspot/share/jfr/support/jfrDeprecationManager.cpp:197:20: warning: unused function 'jfr_is_started_on_command_line' [-Wunused-function]
> static inline bool jfr_is_started_on_command_line() {
> ^
> 1 warning generated.
> /myjdk/jdk/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp:61:20: warning: unused function 'sp_in_stack' [-Wunused-function]
> static inline bool sp_in_stack(const JfrSampleRequest& request, JavaThread* jt) {
> ^
> /myjdk/jdk/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp:69:20: warning: unused function 'update_interpreter_frame_sender_pc' [-Wunused-function]
> static inline void update_interpreter_frame_sender_pc(JfrSampleRequest& request, intptr_t* fp) {
> ^
> /myjdk/jdk/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp:79:23: warning: unused function 'interpreter_frame_return_address' [-Wunused-function]
> static inline address interpreter_frame_return_address(const JfrSampleRequest& request) {
> ^
> /myjdk/jdk/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp:93:20: warning: unused function 'update_frame_sender_sp' [-Wunused-function]
> static inline void update_frame_sender_sp(JfrSampleRequest& request, intptr_t* fp) {
> ^
> /myjdk/jdk/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp:101:20: warning: unused function 'update_sp' [-Wunused-function]
> static inline void update_sp(JfrSampleRequest& request, int frame_size) {
> ^
> /myjdk/jdk/src/hotspot/share/jfr/periodic/sampling/jfrSampleRequest.cpp:106:20: wa...
Thanks for the review !
David - can we address the 'suspicious' perfMemory issue in a separate issue?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/29695#issuecomment-3928138918
More information about the hotspot-jfr-dev
mailing list