RFR: 8257602: Introduce JFR Event Throttling and new jdk.ObjectAllocationSample event (enabled by default)
Mukilesh Sethu
github.com+26284057+mybloodtop at openjdk.java.net
Wed Dec 9 21:02:24 UTC 2020
On Fri, 4 Dec 2020 15:25:23 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
> Greetings,
>
> please help review this enhancement to let JFR sample object allocations by default.
>
> A description is provided in the JIRA issue.
>
> Thanks
> Markus
This is great! It would be awesome to have this capability.
One query on the way you are throttling the events (please correct me if I'm wrong here as I am new to this codebase),
If I understood correctly, you are throttling the events at the time of committing, specifically part of `should_write` or `should_commit` in `jfrEvent.hpp`. If so, how would we be able to add throttling to events which might require it early on like `ObjectCountAfterGC` or `ObjectCount` events ?
I think it makes perfect sense to have it part of commit for allocation events because most of the time consuming tasks like stack walking or storing stack trace in global table is done part of event commit and we will be able to throttle it. However, for events like `ObjectCountAfterGC` the time consuming task is iterating the heap which is unavoidable if we add throttling part of commit. So, I am just curious how can we extend this solution to such events ?
-------------
PR: https://git.openjdk.java.net/jdk/pull/1624
More information about the hotspot-jfr-dev
mailing list