RFR: 8298377: JfrVframeStream causes deadlocks in ZGC [v2]
Erik Österlund
eosterlund at openjdk.org
Wed Jan 4 15:36:51 UTC 2023
On Wed, 4 Jan 2023 14:28:44 GMT, Markus Grönlund <mgronlun at openjdk.org> wrote:
>> Compared to everything else that thread sampling does, I really wouldn't worry about it. In the common case it will just check if processing already started, and then continue.
>
> The reason for asking is for upcoming changes that try to minimize everything involved in sampling. Is this only needed for virtual threads?
I see. It is indeed only needed for virtual threads. If you are going to perform very frequent sampling, then it's worth mentioning that the check if the processing already started requires load_acquire on non-TSO platforms. I suppose that would be the dominating cost. But for this load_acquire to start showing up as a significant overhead, I think you would have to do sampling in the order of magnitude of hundreds of nanosecond interval levels. So unless you are getting to such intense frequencies, I think I would still not worry about it. What do you think?
-------------
PR: https://git.openjdk.org/jdk/pull/11778
More information about the hotspot-dev
mailing list