RFR: 8377798: Hotspot build on macOS aarch64 with unused-functions warning reports some unused functions
David Holmes
dholmes at openjdk.org
Fri Feb 13 06:52:01 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.
> 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: warning: unused function 'update_pc' [-Wunused-function]
> static inline void update_pc(J...
src/hotspot/os/posix/perfMemory_posix.cpp line 497:
> 495: }
> 496:
> 497: #ifndef __APPLE__
Shouldn't this be a big `ifdef __APPLE__` before `get_user_name(uid_t uid) ` and this becomes the `#else` part?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29695#discussion_r2802590736
More information about the hotspot-jfr-dev
mailing list