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

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8315373: Change VirtualThread to unmount after freezing, re-mount before thawing
From:       Alan Bateman <alanb () openjdk ! org>
Date:       2023-08-31 19:32:06
Message-ID: fNthuVUQc1U3y91IhCcSw1uLwwQBc1-ZsFIkc8AmRrk=.e56a280f-382a-4658-b105-dd2b91a14b63 () github ! com
[Download RAW message or body]

On Thu, 31 Aug 2023 17:31:34 GMT, Patricio Chilano Mateo <pchilanomate@openjdk.org> \
wrote:

> > src/hotspot/share/jfr/periodic/sampling/jfrThreadSampler.cpp line 415:
> > 
> > > 413:   } else {
> > > 414:     assert(NATIVE_SAMPLE == type, "invariant");
> > > 415:     if (thread_state_in_native(thread) && \
> > > !is_vthread_in_transition(thread)) {
> > 
> > Is this possible? I assume the thread is in _thread_in_Java during the \
> > transition?
> 
> There are some native methods that we execute during mount/unmount transitions. \
> From what I see they all seem to be defined as `@IntrinsicCandidate`, but if for \
> some reason we don't execute the intrinsic version (interp only mode for instance) \
> then we would call a normal native method.

Just to ad that  Patricio suggested today to run the stress tests with -Xint and that \
does lead to triggered the assert quickly when the thread is sampled in native. There \
are several native methods that are @IntrinsicCandidate that are invoked after the \
thread identity has changed to the virtual thread and before the continuation is \
mounted. Probably less likely on the unmount as the only native method is the one \
that reverts the thread identity.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15492#discussion_r1312128046


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

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