[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Integrated: 8295849: Consolidate Threads::owning_thread*
From:       Roman Kennke <rkennke () openjdk ! org>
Date:       2022-10-28 20:26:24
Message-ID: kydpuIWCk-zmat4jbQNEWIM-N6JFFNkBQd1ud06IuzE=.2da22159-3a8c-42f0-acb5-ac9737a7394e () github ! com
[Download RAW message or body]

On Tue, 25 Oct 2022 11:39:37 GMT, Roman Kennke <rkennke@openjdk.org> wrote:

> There are several users and even mostly-identical implementations of \
> Threads::owning_thread_from_monitor_owner(), which I would like to consolidate a \
>                 little in preparation of JDK-8291555:
> - JvmtiEnvBase::get_monitor_usage(): As the comment in \
> ObjectSynchronizer::get_lock_owner() suggests, the JVMTI code should call the \
> ObjectSynchronizer method. The only real difference is that JVMTI loads the object \
> header directly while OS spins to avoid INFLATING. This is harmless, because JVMTI \
> calls from safepoint, where INFLATING does not occur, and would just do a simple \
> load of the header. A little care must be taken to fetch the monitor if exists a \
>                 few lines below, to fill in monitor info.
> - Two ThreadService methods call Threads::owning_thread_from_monitor_owner(), but \
> always only ever from a monitor. I would like to extract that special case because \
> with fast-locking this can be treated differently (with fast-locking, monitor \
> owners can only be JavaThread* or 'anonynmous'). It's also a little cleaner IMO. 
> Testing:
> - [x] GHA (x86 and x-compile failures look like infra glitch)
> - [x] tier1
> - [x] tier2
> - [x] tier3
> - [x] tier4

This pull request has now been integrated.

Changeset: a44ebd5f
Author:    Roman Kennke <rkennke@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/a44ebd5fbc164ccdd2cc9a64739776ebaa0a8011
                
Stats:     68 lines in 7 files changed: 18 ins; 36 del; 14 mod

8295849: Consolidate Threads::owning_thread*

Reviewed-by: dcubed, sspitsyn

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

PR: https://git.openjdk.org/jdk/pull/10849


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic