Experience of adding JDK21 virtual thread support to a DB application
Matthew Swift
matthew.swift at gmail.com
Mon Jun 24 15:53:37 UTC 2024
Good point about the FJ related noise. I hadn't thought of that.
There's probably a wider question of which thread "park" events are
considered to be contention or not. Clearly a thread waiting to poll
something from a blocking queue isn't experiencing contention, nor is a
thread waiting on a CountDownLatch. A thread waiting to acquire a Semaphore
may be considered to be contended, similar to a ReentrantLock (is a blocked
call to LinkedBlockingQueue#put() contention?). In other words, despite
understanding why the JFR "contention" views only consider intrinsic locks,
as a user I still feel that the names of the views are a bit misleading,
given that they only summarize a subset of the contention in an application.
Cheers,
Matt
On Fri, 21 Jun 2024 at 18:51, robert engels <rengels at ix.netcom.com> wrote:
> I agree that I don’t think JFR is intelligent about the locks.
>
> Maybe create your own sub-class of ReentrentLock and emit custom JFR
> events?
>
> Otherwise there appears to be too much noise with the Fork-Join pool.
>
> ...
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20240624/d37b188b/attachment.htm>
More information about the loom-dev
mailing list