RFR: JDK-8142336: Convert the SA agent build to modular build-infra makefiles

Erik Joelsson erik.joelsson at oracle.com
Mon Nov 9 18:33:06 UTC 2015


Hello,

As a stepping stone in the hotspot makefile conversion, I have broken 
out the serviceability agent separately and converted it into proper 
modular build-infra makefiles. Doing this conversion separately has some 
value on its own by reducing the special cases currently needed for 
building the jdk.hotspot.agent module.

The current SA java build compiles with the boot jdk javac with 
-source/-target JDK N-1. The proposed change instead builds SA with the 
interim-langtools javac for JDK N, like all the rest of the JDK classes.

There is already a bug filed for reorganizing the source of the SA agent 
to conform to the Jigsaw style modular source layout: JDK-8067194, so I 
have left the source in its current location.

The native compilation and linking has been changed to base the flags 
used on what configure sets up for the other JDK libraries. This has 
caused some changes in flag usage. From what I can tell, nothing 
important is different however. I have run the relevant jtreg tests on 
all OSes to verify that it still works. Some of the differences include:

* Linux: "-Xlinker z -Xlinker defs" was added to LDFLAGS, which causes 
link failure unless "-ldl" was also added to LIBS.
* Solaris: More warnings activated through "+w" caused need for 
disabling some warnings. I fixed one warning instance which was trivial 
(int->size_t), but couldn't figure out the rest. I will file a followup 
bug for fixing those if this patch is accepted.

I tried to mimic the current behavior of excluding SA on linux-ppc and 
zero that Volker added a while back. Now it's excluded on the module 
level instead so that jdk.hotspot.agent isn't even built in that case. 
It would be good if this could be tested.

Bug: https://bugs.openjdk.java.net/browse/JDK-8142336
Webrev: http://cr.openjdk.java.net/~erikj/8142336/webrev.01/

/Erik



More information about the build-dev mailing list