Closed 6fears7 closed 1 year ago
io.pyroscope.javaagent.config.Config.Builder#setProfilingLock
Thank you. I was much too focused on getting the method # 1 to work (./profiler.sh -e cpu,alloc,lock -f profile.jfr ...) that I didn't pay any mind to method # 2 (./profiler.sh -e cpu --alloc 2m --lock 10ms -f profile.jfr ...) and how that might've already been used in the Builder
Created new builder option: setProfilingEvents
Most notably in Profiler.java, the createJFRCommand ensures that only when the JFR option is enabled will multiple events be used. Otherwise, it'll default to the single Event default set in the Config.
Enables end users to utilize the Config Builder to specify multiple event types to mirror the async-profilers command line options
I dig a lot of digging and didn't see any current way in-code for this to work, so if there is and it's simply hidden please let me know.