3

We would like to use the JDK Flight Recorder to let our end users send us profiling data that we could analyze internally using JDK Mission Control. The only problem is that our code is obfuscated which makes stacktraces and events unreadable in i.e JMC.

Is there a way to extract all the events from a jfr file, call our own deobfuscation logic and then save the results to a new .jfr file using the same format as the JFR dumps? I know about the JFR parsing libraries and think I have the reading part under control, but I'm not sure how to serialize the events back to the JFR format.

Billybong
  • 697
  • 5
  • 18
  • I think you'll have to go to the source to work out how exactly it's being written. The jdk.jfr.consumer.X classes seem to let you get to all the data, but then there doesn't seem to be any publicly available way of getting the data into a `jdk.jfr.Recording`. – Mr R Mar 22 '21 at 11:29

1 Answers1

0

The JMC parser has the concept of parser extensions that can do pretty much anything with the parsed data. Perhaps write a parser extension that uses your de-obfuscation logic?

Hirt
  • 1,664
  • 10
  • 12