RFR(XS): 8046611: Build errors with gcc on sparc/fastdebug

David Holmes david.holmes at oracle.com
Thu Jun 12 01:36:51 UTC 2014


Hi Mikael,

On 12/06/2014 5:47 AM, Mikael Vidstedt wrote:
>
> Please review the below small change which fixes a couple of build
> errors when building the sparc files with gcc.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8046611
> Webrev: http://cr.openjdk.java.net/~mikael/webrevs/8046611/webrev.00/webrev
>
> Without the fix the following two errors are seen:
>
> hotspot/src/cpu/sparc/vm/frame_sparc.cpp:442: error: ‘frame
> nth_sender(int)’ defined but not used
> hotspot/src/share/vm/runtime/safepoint.cpp:771: error: ‘void
> print_me(intptr_t*, intptr_t*, bool*)’ defined but not used
>
> The functions in question are debug functoins declared static. Assuming
> we'll want to keep them around the fix is to simply remove the static
> keyword from them.

This seems so wrong. Changing them to non-static simply stops the 
compiler from being able to deduce whether they are used or not. But can 
they actually be used if declared non-static?

Can we not tag them some way to tell the compiler to ignore them?

Debugging functions can be useful even if rarely used. But no one will 
know they exist if they aren't in the code so I'm wary of simply 
deleting everything of that nature.

Thanks,
David

> Cheers,
> Mikael
>


More information about the hotspot-runtime-dev mailing list