Re: RFC: JWarmup precompile java hot methods at application startup
Kuai Wei
kuaiwei.kw at alibaba-inc.com
Fri Mar 22 12:15:01 UTC 2019
Hi Tobias,
jwarmup is designed to work on linux x86-64 only. So we have not tested on other platform.
We will check the GC options in tests.
Thanks,
Kuai Wei
------------------------------------------------------------------
From:Tobias Hartmann <tobias.hartmann at oracle.com>
Send Time:2019年3月15日(星期五) 19:26
To:yumin qi <yumin.qi at gmail.com>; hotspot-dev <hotspot-dev at openjdk.java.net>
Subject:Re: RFC: JWarmup precompile java hot methods at application startup
Hi Yumin,
I haven't looked at the code yet but just executed some sanity testing.
Many of the new jwarmup tests crash the VM on Sparc:
# SIGBUS (0xa) at pc=0xffffffff7d865780, pid=27039, tid=8
#
# JRE version: Java(TM) SE Runtime Environment (13.0) (fastdebug build
13-internal+0-2019-03-15-0750126.tobias.hartmann.jdkjdk)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug
13-internal+0-2019-03-15-0750126.tobias.hartmann.jdkjdk, compiled mode, compressed oops, g1 gc,
solaris-sparc)
# Problematic frame:
# V [libjvm.so+0x1865780] void ProfileRecorder::write_header()+0xf0
Stack: [0xffffffff54600000,0xffffffff54700000], sp=0xffffffff546ff960, free space=1022k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native
code)
V [libjvm.so+0x1865780] void ProfileRecorder::write_header()+0xf0
V [libjvm.so+0x1866800] void ProfileRecorder::flush()+0xa0
V [libjvm.so+0x186426c] JitWarmUp::JitWarmUpState JitWarmUp::flush_logfile()+0x1c
V [libjvm.so+0x187059c] void JitWarmUpFlushThread::run()+0x9c
V [libjvm.so+0x227c8f8] void Thread::call_run()+0x178
V [libjvm.so+0x1f4d32c] thread_native_entry+0x3ac
And some tests fail when executed with a different GC due to:
Error occurred during initialization of VM
Multiple garbage collectors selected
They should either not specify the GC or have a @requires vm.gc == "null"
Also, these tests should be moved to hotspot/jtreg/compiler/ or ../runtime/
Best regards,
Tobias
On 15.03.19 06:59, yumin qi wrote:
> Please review the patch for implementing JEP 8203832:
> (*https://bugs.openjdk.java.net/browse/JDK-8203832
> <https://bugs.openjdk.java.net/browse/JDK-8203832>)*
>
> Bug: *https://bugs.openjdk.java.net/browse/JDK-8220692
> <https://bugs.openjdk.java.net/browse/JDK-8220692>*
> Webrev: http://cr.openjdk.java.net/~minqi/8220692/webrev-01/
> <http://cr.openjdk.java.net/~minqi/8203832/webrev-01/>
>
> Summary: This patch implements the first version of JIT warmup to
> solve the java application peak time CPU contest between JIT compiler
> threads and regular application java threads. The CPU contest is
> avoided by pre-run to collect comilation data and precompile the hot
> java methods during application startup based on the pre-run collected
> data.
>
> The main flags (-XX:) used to control are:
> CompilationWarmUpRecording: used for collecting compilation data.
> Result stored in a file set by flag CompilationWarmUpLogfile.
> CompilationWarmUp: use collected data to precompile the methods
> recorded in above file.
> CompilationWarmUpExclude: configure a file which contains the names to
> be excluded for precompile.
> CompilationWarmUpRecordTime: control the warmup recording time.
> CompilationWarmUpDeoptTime: time (from start) to deoptimize precomiled methods.
>
> In this version, the profiled method data is not used at
> precomilation, it will be addressed in followed bug fix. After the
> first version integrated, will file bug for it. Also, it does not work
> with CDS since the data added to ConstantPool data structure. It also
> will be addressed in another separate bug followed.
>
> Test: Submitted to submit repo and passed all tests.
> Newly added test suites: test/hotspot/jtreg/jwarmup include test
> cases for most of the use cases and issues.
>
> Thanks
> Yumin
>
More information about the hotspot-dev
mailing list