Debugging/Profing javac
Vicente Romero
vicente.romero at oracle.com
Tue Dec 4 13:15:44 UTC 2018
On 12/4/18 1:09 AM, Enrico Olivelli wrote:
>
>
> Il mar 4 dic 2018, 04:04 Vicente Romero <vicente.romero at oracle.com
> <mailto: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.
Java Mission Control should be fine to get a global picture.
> I can share some dump, or sample JVM stacktraces.
yes that could help
> 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)
yes removing Maven from the picture will be helpful isolating the issue.
>
> 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.
IMO adding logging could alter the results
>
> 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.
what happens if you remove the source/target=8 provided that that is an
option?
>
> I am not able to track down to the commit in my code which introduced
> the slowdown.
>
>
> Thank you
>
> Enrico
Vicente
>
>
>>
>> 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/756c1fd0/attachment.html>
More information about the compiler-dev
mailing list