We recently ran into an unfortunate naming conflict, concerning "G1" the garbage collector vs. "G1" the sparc register. We'd like to be able to use "G1" as an enum value in various GC code, but register_sparc.hpp defines "G1" as a macro, which obviously breaks things.
We're reluctant to sprinkling #define DONT_USE_REGISTER_DEFINES in GC code. An alternative would be to simply remove this optimization in the sparc code. The comment in register_sparc.hpp suggests that this was done to reduce the size of libjvm.so.
I applied a patch to remove the sparc macros and libjvm.so grew by ~0.3% (66450K->66682K).
Given that the libjvm.so growth doesn't seem that bad, I propose that we remove the register defines on sparc.
We're reluctant to sprinkling #define DONT_USE_REGISTER_DEFINES in GC code. An alternative would be to simply remove this optimization in the sparc code. The comment in register_sparc.hpp suggests that this was done to reduce the size of libjvm.so.
I applied a patch to remove the sparc macros and libjvm.so grew by ~0.3% (66450K->66682K).
Given that the libjvm.so growth doesn't seem that bad, I propose that we remove the register defines on sparc.