RFR: 8368818: Remove duplicate dtrace macros

Coleen Phillimore coleenp at openjdk.org
Mon Sep 29 15:08:54 UTC 2025


On Mon, 29 Sep 2025 15:05:07 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> I propose to move the following macros and constants definition to `objectMonitor.hpp`:
>> 
>> DTRACE_MONITOR_PROBE_COMMON
>> DTRACE_MONITOR_WAIT_PROBE
>> DTRACE_MONITOR_PROBE
>> HOTSPOT_MONITOR_notify
>> HOTSPOT_MONITOR_notifyAll
>> 
>> They are defined both in `objectMonitor.cpp` and `synchronizer.cpp`.
>> 
>> Passes tier1 (fastdebug) with `--enable-jvm-feature-dtrace`.
>
> src/hotspot/share/runtime/synchronizer.cpp line 218:
> 
>> 216: // TODO-FIXME: probes should not fire when caller is _blocked.  assert() accordingly.
>> 217: 
>> 218: #define DTRACE_MONITOR_PROBE_COMMON(obj, thread)                           \
> 
> I agree that these shouldn't be in objectMonitor.hpp file.  With Legacy locking removed, are these still needed in synchronizer.cpp ?

It would be nice to understand why these are used in general.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27538#discussion_r2388322712


More information about the hotspot-runtime-dev mailing list