[aarch64-port-dev ] RFR(XS) 8248681: AArch64: MSVC doesn't support __PRETTY_FUNCTION__
Andrew Haley
aph at redhat.com
Wed Jul 15 08:24:47 UTC 2020
On 15/07/2020 00:18, Kim Barrett wrote:
>
> Not so much a review as a comment / suggested alternative.
>
> There is a general preference in HotSpot code toward avoiding
> toolchain-specific conditional compilation in shared code. (Obviously
> this is not a hard and fast rule.) This is even called out in the
> HotSpot Style Guide. Before the MSVC/aarch64 port the code being
> modified by this change is gcc-specific rather than shared, but with
> that port it becomes shared.
>
> It seems like this might be a case where we should have some macro
> defined somewhere like globalDefinitions_xxx.hpp that for gcc/clang
> expands to __PRETTY_FUNCTION__ and for MSVC expands to __FUNCSIG__.
> (Probably with a default expansion to __func__ since we should very
> shortly have C++11/14.)
>
> Of course, this is currently the only use of __PRETTY_FUNCTION__ in
> all of HotSpot, so that might be considered excessive overhead. But
> if we had such a macro it would simplify (and so perhaps encourage)
> the use of this feature.
I don't think we need __PRETTY_FUNCTION__ here. Anyway, I'm leaning towards
David Holmes' position that this is AArch64/Windows specific, so we should
apply this patch to
http://hg.openjdk.java.net/aarch64-port/jdk-windows/
The best way to do that is if I push the already-approved cleanup ports to
jdk-jdk, pull from there to aarch64-port/jdk-windows, and we can push
a patch for the __PRETTY_FUNCTION__ problem to aarch64-port/jdk-windows.
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-dev
mailing list