Review request: 8004658: Add internal smart javac wrapper to solve JEP 139

Fredrik Öhrström oehrstroem at gmail.com
Tue Jan 8 06:32:45 PST 2013


And here is an updated webrev, with cleanups and more tests.

http://cr.openjdk.java.net/~ohrstrom/webrev-8004658-sjavac-v2/

//Fredrik

2012/12/6 Fredrik Öhrström <fredrik.ohrstrom at oracle.com>:
> This the smart javac wrapper that makes use of the javac hooks for reporting
> dependencies.
> The easiest way to test it, is to clone build-infra and use --enable-sjavac
> with configure.
>
> After building, do "export PATH=build/.../jdk/bin:$PATH"
> then you can do:
> sjavac src -d bin --server:portfile=/tmp/myport
>
> The more sources you have under the src directory, the merrier. With enough
> sources,
> it will actually use multiple cores. Run it again, and nothing will happen,
> since it
> quickly determines that all artifacts are up to date. (add -h headers if you
> expect
> native method headers to be generated.)
>
> Try changing public methods, and recompile, dependent packages will be
> recompiled.
> Try changing private or package private methods, and recompile, only that
> package will be recompiled.
> Try changing a native method, the header file will be regenerated.
>
> The smart javac wrapper is not part of the final image. (The sjavac launcher
> and its classes
> in the tools.jar are explicitly stripped from the image.) It will remain a
> build tool, while we
> experiment and improve its multi core performance and evaluate how it should
> integrated into the full product.
>
> The real test is of course, to add "public void helloWorld() {}" to
> Object.java and
> do "make LOG=info". Or add a native method to Adler32.java and watch
> how the build system recompiles libzip.so (remember to do "make LOG=info")
> to see the incremental build properly.
>
> http://cr.openjdk.java.net/~ohrstrom/webrev-8004658-sjavac/
>
> //Fredrik



More information about the compiler-dev mailing list