'How to enable heap metrics for jfr via command line
Solution 1:[1]
Running jcmd with settings=profile makes the recording include information about allocations. It doesn't exactly correspond to Heap Statistics as the other comment pointed out, but it lets you see allocation flame graphs in JMC which was what I was looking for coming here. See https://docs.oracle.com/javacomponents/jmc-5-5/jfr-command-reference/diagnostic-command-reference.htm#resourceid-15322-48C8362A
I had issues exporting templates as the other comment also suggested. If you want Heap Statistics, you can copy profile.jfc and enable it as explained in https://stackoverflow.com/a/55449770/12013214
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | WASDi |

