JDK-8219885 : Reuse previous chunk when parsing JFR files
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: jfr
  • Affected Version: 13
  • Priority: P3
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2019-02-28
  • Updated: 2019-06-20
  • Resolved: 2019-05-14
Related Reports
Relates :  
Description
A Flight Recorder file (.jfr) consists of one or more chunks. Each chunk contains metadata, such as event names, field layout etc., and a set of JFR constant pools containing stack traces, threads, classes etc.

Metadata typically don't change between chunks and it's therefore possible to avoid parsing it twice. Constants are also often the same between chunks, so if a known id is found, it could use what was parsed previously

This will reduce allocation pressure and speed up parsing of JFR files.

This enhancement will help the work for "JEP 349: JFR Event Streaming", but not dependent on streaming being implemented. 
Comments
I did try to make this a separate patch from JEP 349, as.It could make sense to backport, but it is too complicated isolate since it requires changes in the JVM as well (due to bugs not seen without reuse) The enhancement will come in with the JEP.
14-05-2019