Debugging/Profing javac

Enrico Olivelli eolivelli at gmail.com
Tue Dec 4 06:09:31 UTC 2018


Il mar 4 dic 2018, 04:04 Vicente Romero <vicente.romero at oracle.com> ha
scritto:

> Hi Enrico,
>
> On 12/3/18 4:58 PM, Enrico Olivelli wrote:
>
> Hi,
> I have a java application made of about 2000 classes, and javac take a
> very long time to compile the module, like more than one minute (on
> workstations which usually are able to compile similar projects faster).
>
> This is very strage and I guess there is some .java file which is making
> javac work more than what is needed.
> Is there any 'profile' or 'debug' mode which prints the processing time
> for each file or group of files/classes ?
>
>
> you will need to use an external profiler, is the code accessible in any
> way? is javac the only one to blame, I mean are you using maven or similar
> to build?
>

Vicente,

Unfortunately it is not opensource code.
I can use yourkit, jvisualvm,jmc or what you suggest, but with a profiler
you don't get the info to understand which files are the hotspot.
I can share some dump, or sample  JVM stacktraces.
For what I can understand it is not a problem about I/O.
I am using Maven, but I am sure the problem is only the pure javac
execution. I am running javac in the process as Maven, but even 'forking'
javac has the same result.
I can try to reproduce it without Maven (I can grab the command line in
form mode and relaunch javac)

If there is no out of the box flag, maybe I can add some logging on javac
but I need some advice about what to instrument.

I forgot to say that I am on linux, with latest jdk11 openjdk published
build, but with jdk8 the result is pretty the same. Code is compiled with
source/target = 8.

I am not able to track down to the commit in my code which introduced the
slowdown.


Thank you

Enrico


>
> Best regards
> Enrico Olivelli
> --
>
>
> -- Enrico Olivelli
>
> Thanks,
> Vicente
>
-- 


-- Enrico Olivelli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20181204/402f1a0d/attachment.html>


More information about the compiler-dev mailing list