[13] RFR(L) 8220623: [JVMCI] Update JVMCI to support JVMCI based Compiler compiled into shared library
Robbin Ehn
robbin.ehn at oracle.com
Fri Mar 29 13:19:49 UTC 2019
Hi,
434 for (; JavaThread *thr = jtiwh.next(); ) {
435 if (thr!=thr_cur && thr->thread_state() == _thread_in_native) {
436 num_active++;
437 if (thr->is_Compiler_thread()) {
438 CompilerThread* ct = (CompilerThread*) thr;
439 if (ct->compiler() == NULL || !ct->compiler()->is_jvmci()) {
440 num_active_compiler_thread++;
441 } else {
442 // When using a Java based JVMCI compiler, it's possible
443 // for one compiler thread to grab a Java lock, enter
444 // HotSpot and go to sleep on the shutdown safepoint.
445 // Another JVMCI compiler thread can then attempt grab
446 // the lock and thus never make progress.
447 }
448 }
449 }
450 }
We inc num_active on threads in native.
If such thread is a compiler thread we also inc num_active_compiler_thread.
JavaThread blocking on safepoint would be state blocked.
JavaThread waiting on the 'Java lock' would also be blocked.
Why are you not blocked when waiting on that contended Java lock ?
/Robbin
On 3/28/19 8:15 PM, Vladimir Kozlov wrote:
> https://bugs.openjdk.java.net/browse/JDK-8220623
> http://cr.openjdk.java.net/~kvn/8220623/webrev.03/
>
> Update JVMCI to support pre-compiled as shared library Graal.
> Using aoted Graal can offers benefits including:
> - fast startup
> - compile time similar to native JIt compilers (C2)
> - memory usage disjoint from the application Java heap
> - no profile pollution of JDK code used by the application
>
> This is JDK13 port of JVMCI changes done in graal-jvmci-8 [1] up to date.
> Changes were collected in Metropolis repo [2] and tested there.
>
> Changes we reviewed by Oracle Labs (authors of JVMCI and Graal) and our compiler
> group.
> Changes in shared code are guarded by #if INCLUDE_JVMCI and JVMCI flags.
>
> I ran tier1-tier8 (which includes HotSpot and JDK tests) and it was clean. In
> this set Graal was tested only in tier3.
>
> And I ran all hs-tier3-graal .. hs-tier8-graal Graal tests available in our
> system. Several issue were found which were present before these changes.
>
> Thanks,
> Vladimir
>
> [1]
> https://github.com/graalvm/graal-jvmci-8/commit/49ff2045fb603e35516a3a427d8023c00e1607af
>
> [2] http://hg.openjdk.java.net/metropolis/dev/
More information about the hotspot-dev
mailing list