Bug 568054 - Provide a means to launch with Filght Recorder
Summary: Provide a means to launch with Filght Recorder
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.18   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-20 16:59 EDT by Alex Blewitt CLA
Modified: 2020-10-22 16:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Blewitt CLA 2020-10-20 16:59:58 EDT
Since Flight Recorder is available in Java 11+ now, it would be good to be able to create a launch with Flight Recorder enabled. IntelliJ has a similar feature already, and this will require no additional content to be installed on the system (other than perhaps a compatible JVM).

Running the JVM with -XX:StartFlightRecording=filename=[output file],dumponexit=true,settings=[profile|default|path to jfc] etc. will be enough to produce the JFR file. This can later be loaded or analysed with JMC, although it's now possible to programmatically load and analyse the file.

The construction of a JFC profile is (frankly) pretty annoying, and it would be good if an API were created that would allow you to be able to tweak settings, write out the file, then launch with those settings enabled. But in the first instance, allowing a user to supply those first would be a bonus.

Of course this is possible at the moment if you know which magic attributes to put into the VMargs of your Java launch, but it would be much easier if there were a UI to ensure that users didn't get it wrong.
Comment 1 Sarika Sinha CLA 2020-10-22 02:00:12 EDT
@Carsten,
Will you be interested in adding this feature?
Comment 2 Carsten Hammer CLA 2020-10-22 16:48:05 EDT
(In reply to Sarika Sinha from comment #1)
> @Carsten,
> Will you be interested in adding this feature?

Hi Sarika,
thank you for your trust. But I guess in this case I would need more help from you than you can give me. And at the moment I'm pretty happy with the SAP profiler that is superior to the Flightrecorder, easy to install into eclipse and free.
Of course that will change as SAP is going to move to Flightrecorder themself but I see that as something that will need years.