RFR: JDK-8198862 Stop doing funky compilation stuff for dtrace

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu Mar 1 00:48:20 UTC 2018

We're doing a lot of weird compilation stuff for dtrace. With this 
patch, most of the weirdness is removed. The remaining calls to $(CC) -E 
has been changed to $(CPP) to clarify that we do not compile, we just 
use the precompiler.

One of the changes I made was to actually split up the last and final 
dtrace call into a separate preprocessing step. However, this uses the 
solaris studio preprocessor instead of the ancient system preprocessor, 
which has changed behavior. A string like (&``_var) is now expanded to 
(& ` ` _var), which is not accepted by dtrace. :-( I have worked around 
this by adding the preprocessed output, without the spaces, in two 
places. If anyone wants to dig deeper into dtrace script file syntax, or 
C preprocessor magic, to avoid this, let me know... (I'll just state 
that the "obvious" solution of sending -Xs to the preprocessor to get 
old-style behavior does not work: this just makes the solaris studio 
preprocessor call the ancient preprocessor in turn, and we've gained 

Bug: https://bugs.openjdk.java.net/browse/JDK-8198862


More information about the hotspot-dev mailing list