RFR: 8356968: JFR: Compilation event should be enabled for all compilations by default

Aleksey Shipilev shade at openjdk.org
Thu May 15 09:41:50 UTC 2025


On Thu, 15 May 2025 09:22:05 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

> The overhead of the event is low, I believe, but I think the concern was that too many events were generated with little value to the end user. 

I can see that. But the neat part about compilation events is that we are supposed to have a limited number of them. As system goes into steady state, compilations are supposed to become very rare. And if they are not, that is actually a signal something is really off, and we do want to know :)

> `jfr summary` lists the number of events and how much space they take up.

I think current overheads are fair.

For example, on javac HelloWorld workload, `jdk.Compilation` is about 1K events, about 25K in total (~ 25 bytes/event), on-par with system process, flags, settings events. Takes ~7% of the dump on javac Hello World, and that is likely a high estimate, as longer apps would likely start dumping much more events.


 $ ls -lah comp.jfr
-rw-rw-r-- 1 shade shade 365K May 14 14:00 comp.jfr

$ jfr summary comp.jfr | sort -k 3 -n -r | head -n 10
 jdk.CheckPoint                             14        134299
 jdk.Metadata                                1        107126
 jdk.SystemProcess                         546         32949
 jdk.Compilation                           946         23678
 jdk.ThreadDump                              2         18679
 jdk.BooleanFlag                           492         14607
 jdk.ActiveSetting                         356          8846
 jdk.ModuleExport                          504          5414
 jdk.LongFlag                              136          4237
 jdk.InitialEnvironmentVariable             73          3077
...

-------------

PR Comment: https://git.openjdk.org/jdk/pull/25247#issuecomment-2883196644


More information about the hotspot-jfr-dev mailing list