Way to count run-time numbers
David Holmes
david.holmes at oracle.com
Mon Feb 5 06:07:36 UTC 2018
Hi Manas,
On 5/02/2018 3:17 PM, Manas Thakur wrote:
> Dear all,
>
> Is there a way to count the run-time numbers of the following:
No but you'd need to clarify what you mean anyway
> 1. Number of locks acquired
Do you mean Java level monitors or internal VM Mutexes (or Monitors). Do
you mean number of distinct lock instances or the number of times a
"lock" has succeeded?
> 2. Number of null-checks inserted
Inserted by what? The Java source compiler may add some explicit null
checks, but most are implicit in the semantics of the bytecodes. Then
the JIT does what it can to elide unnecessary null-checks.
Cheers,
David
> I need to compare some statistics and was wondering whether there is a
> builtin option or some well-known profiling tool that does this.
>
> Warm regards,
> Manas
>
More information about the hotspot-dev
mailing list