Safepointing & Locking issue
Keith McGuigan
keith.mcguigan at oracle.com
Thu Jul 8 06:58:07 PDT 2010
Nicolas Michael wrote:
> With DTrace I just saw -- thanks to the really cool hotspot probes (some of them
> seem to be new, it's the first time I see that great level of detail!) -- that
> there are about 1000 Exceptions occurring per second ("ExceptionOccurred-entry")
> (but less than one "ThrowNew-entry" per second). I'm not sure how ThrowNew
> relates to ExceptionOccurred and what they are actually counting, and whether
> 1000+ of ExceptionOccurred is "a lot" (it seems quite high ;-) ). Could
> exceptions also cause deoptimization?
The 'ExceptionOccurred-entry' and 'ThrowNew-entry' probes trace the
corresponding JNI calls (from native code). ExceptionOccurred is used
to query whether an exception occurred or not, so seeing it called 1000
times a second doesn't mean that there are 1000s of exceptions
occurring. Such frequent queries are probably not great for performance
either, but that's a different story.
ThrowNew is called to actually throw an exception from native code, but
that's not the only place where exceptions are thrown -- it's only when
exceptions are thrown from native code using JNI. And in any case I
don't think throwing exceptions necessarily leads to deoptimization
and/or safepoints.
--
- Keith
More information about the hotspot-runtime-dev
mailing list