Small change triggers 8990 file compiling?
Erik Joelsson
erik.joelsson at oracle.com
Fri Oct 12 00:51:45 PDT 2012
On 2012-10-12 04:57, Weijun Wang wrote:
> Hi All
>
> I'm using the new build on a Ubuntu 12.04 64 bit. Configure runs ok,
> and make runs ok. Now I have a good build output directory. Running
> make again costs no time at all.
>
> Then I qpush a mq patch, which only touches 30 or so files deep inside
> src/share/classes/com/sun/security and src/share/classes/sun/security
> of the jdk repo, and running make shows
>
> Compiling 8990 files for BUILD_JDK
>
> and a while bunch of other c files which costs 00:01:20.
>
> Is that an expected behavior?
>
> Thanks
> Max
Yes, unfortunately this is still expected behavior. There are two issues
involved here.
First, the incremental smart dependency checking of java compiles is
dependent on sjavac. It's working pretty well in the build-infra forest,
but has to be enabled like Alan says (--enable-sjavac to configure). It
has not yet been pushed to jdk8. The last I heard it's going to be
making it's way into tl in the near future. The default mode for java
compilation today is doing everything in one big batch.
The other issue, which we should fix, concerns javah header generation.
In the new build we use a new feature in javac which automatically
outputs the jni headers for all classes with native methods or a special
annotation. The problem is that javac doesn't check if new headers were
actually needed, so it will touch all the headers every time, which make
will interpret as the headers having changed and so will recompile all
the native sources that depend on them. I believe sjavac is going to fix
this problem too, otherwise we will need to add some logic for it in the
makefiles.
/Erik
More information about the build-infra-dev
mailing list