Handling of DTraceMethodProbes

David Holmes david.holmes at oracle.com
Wed Nov 22 01:05:17 UTC 2023


On 22/11/2023 3:09 am, Vladimir Kozlov wrote:
> CCing to serviceability group.
> 
> Do we still support dtrace?

A qualified "yes" - the hooks still exist, mainly for systemTap IIRC but 
we don't actively update or maintain anything so I expect there is some 
bitrot.

> Thanks,
> Vladimir K
> 
> On 11/21/23 4:34 AM, Thomas Stüfe wrote:
>> Hi,
>>
>> It seems that the handling of DTraceMethodProbes is inconsistent: in 
>> most places, we handle the flag at runtime by generating code that 
>> uses conditional jumps. In one place (C1), we don't. There, generation 
>> is conditional on DTraceMethodProbes at compile time.

Yeah this code in C1 seems wrong:

   // Change in DTrace flags may invalidate compilation.
     if (!failing() &&
         ( (!dtrace_method_probes() && DTraceMethodProbes) ||
           (!dtrace_alloc_probes() && DTraceAllocProbes) )) {
       record_failure("DTrace flags change invalidated dependencies");
     }

The flag can't change dynamically. Maybe once upon a time it could ?

David
-----

>>
>> The former looks like it is possible for the value 
>> of DTraceMethodProbes to change at runtime, and that generated code 
>> should be able to react seamlessly. However, DTraceMethodProbes is not 
>> a manageable flag.
>>
>> Which side is right? Do we need to emit conditional jumps, but if so, 
>> why not in C1?
>>
>> Thanks, Thomas


More information about the serviceability-dev mailing list