Way to count run-time numbers
Manas Thakur
manasthakur17 at gmail.com
Mon Feb 5 11:39:48 UTC 2018
In the last sentence, I meant “due to the checks actually being implicit”. Will you be able to suggest me something regarding counting the run-time counts of the explicit checks (i.e, those not removed by the JIT compilers) though?
Regards,
Manas
> On 05-Feb-2018, at 5:01 PM, Manas Thakur <manasthakur17 at gmail.com> wrote:
>
> Hi Chris,
>
> Thanks for the reply.
>
> This will be useful, but not sufficient: It would tell me the number of cases the JVM had guessed wrong and deoptimized because of the assumption failure. However, I was also interested in the number of times the JVM would have to execute the compare instruction, which it seems couldn’t be counted due to the checks actually not being implicit.
>
> Regards,
> Manas
>
>> On 05-Feb-2018, at 2:10 PM, Chris Newland <cnewland at chrisnewland.com> wrote:
>>
>> Hi Manas,
>>
>> Would the information output in LogCompilation regarding null check
>> uncommon traps be of any use to you?
>>
>> E.g. when the JIT has speculated not null but inserted a deoptimisation
>> trap in case it is:
>>
>> <uncommon_trap bci='5' reason='null_check' action='maybe_recompile'
>> debug_id='0'/>
>>
>> Cheers,
>>
>> Chris
>>
>> On Mon, February 5, 2018 06:07, David Holmes wrote:
>>> 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