mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8258715: [JVMCI] separate JVMCI code install timers for CompileBroker and hosted compilations
Reviewed-by: kvn
This commit is contained in:
parent
64644a1072
commit
c50b464a12
4 changed files with 33 additions and 22 deletions
|
@ -2721,13 +2721,6 @@ void CompileBroker::print_times(bool per_compiler, bool aggregate) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if INCLUDE_JVMCI
|
|
||||||
// In hosted mode, print the JVMCI compiler specific counters manually.
|
|
||||||
if (EnableJVMCI && !UseJVMCICompiler) {
|
|
||||||
JVMCICompiler::print_compilation_timers();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!aggregate) {
|
if (!aggregate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2777,6 +2770,13 @@ void CompileBroker::print_times(bool per_compiler, bool aggregate) {
|
||||||
tty->cr();
|
tty->cr();
|
||||||
comp->print_timers();
|
comp->print_timers();
|
||||||
}
|
}
|
||||||
|
#if INCLUDE_JVMCI
|
||||||
|
if (EnableJVMCI) {
|
||||||
|
tty->cr();
|
||||||
|
JVMCICompiler::print_hosted_timers();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
tty->cr();
|
tty->cr();
|
||||||
tty->print_cr(" Total compiled methods : %8d methods", total_compile_count);
|
tty->print_cr(" Total compiled methods : %8d methods", total_compile_count);
|
||||||
tty->print_cr(" Standard compilation : %8d methods", standard_compile_count);
|
tty->print_cr(" Standard compilation : %8d methods", standard_compile_count);
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
JVMCICompiler* JVMCICompiler::_instance = NULL;
|
JVMCICompiler* JVMCICompiler::_instance = NULL;
|
||||||
elapsedTimer JVMCICompiler::_codeInstallTimer;
|
elapsedTimer JVMCICompiler::_codeInstallTimer;
|
||||||
|
elapsedTimer JVMCICompiler::_hostedCodeInstallTimer;
|
||||||
|
|
||||||
JVMCICompiler::JVMCICompiler() : AbstractCompiler(compiler_jvmci) {
|
JVMCICompiler::JVMCICompiler() : AbstractCompiler(compiler_jvmci) {
|
||||||
_bootstrapping = false;
|
_bootstrapping = false;
|
||||||
|
@ -152,19 +153,19 @@ void JVMCICompiler::compile_method(ciEnv* env, ciMethod* target, int entry_bci,
|
||||||
ShouldNotReachHere();
|
ShouldNotReachHere();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print compilation timers and statistics
|
// Print CompileBroker compilation timers
|
||||||
void JVMCICompiler::print_timers() {
|
void JVMCICompiler::print_timers() {
|
||||||
tty->print_cr(" JVMCI Compile Time: %7.3f s", stats()->total_time());
|
double code_install_time = _codeInstallTimer.seconds();
|
||||||
print_compilation_timers();
|
tty->print_cr(" JVMCI CompileBroker Time:");
|
||||||
|
tty->print_cr(" Compile: %7.3f s", stats()->total_time());
|
||||||
|
tty->print_cr(" Install Code: %7.3f s", code_install_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Print compilation timers and statistics
|
// Print non-CompileBroker compilation timers
|
||||||
void JVMCICompiler::print_compilation_timers() {
|
void JVMCICompiler::print_hosted_timers() {
|
||||||
double code_install_time = _codeInstallTimer.seconds();
|
double code_install_time = _hostedCodeInstallTimer.seconds();
|
||||||
if (code_install_time != 0.0) {
|
tty->print_cr(" JVMCI Hosted Time:");
|
||||||
tty->cr();
|
tty->print_cr(" Install Code: %7.3f s", code_install_time);
|
||||||
tty->print_cr(" JVMCI code install time: %6.3f s", code_install_time);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JVMCICompiler::inc_methods_compiled() {
|
void JVMCICompiler::inc_methods_compiled() {
|
||||||
|
|
|
@ -49,8 +49,12 @@ private:
|
||||||
|
|
||||||
static JVMCICompiler* _instance;
|
static JVMCICompiler* _instance;
|
||||||
|
|
||||||
|
// Code installation timer for CompileBroker compilations
|
||||||
static elapsedTimer _codeInstallTimer;
|
static elapsedTimer _codeInstallTimer;
|
||||||
|
|
||||||
|
// Code installation timer for non-CompileBroker compilations
|
||||||
|
static elapsedTimer _hostedCodeInstallTimer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Exits the VM due to an unexpected exception.
|
* Exits the VM due to an unexpected exception.
|
||||||
*/
|
*/
|
||||||
|
@ -107,10 +111,16 @@ public:
|
||||||
int global_compilation_ticks() const { return _global_compilation_ticks; }
|
int global_compilation_ticks() const { return _global_compilation_ticks; }
|
||||||
void inc_global_compilation_ticks();
|
void inc_global_compilation_ticks();
|
||||||
|
|
||||||
// Print compilation timers and statistics
|
// Print timers related to non-CompileBroker compilations
|
||||||
static void print_compilation_timers();
|
static void print_hosted_timers();
|
||||||
|
|
||||||
static elapsedTimer* codeInstallTimer() { return &_codeInstallTimer; }
|
static elapsedTimer* codeInstallTimer(bool hosted) {
|
||||||
|
if (!hosted) {
|
||||||
|
return &_codeInstallTimer;
|
||||||
|
} else {
|
||||||
|
return &_hostedCodeInstallTimer;
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SHARE_JVMCI_JVMCICOMPILER_HPP
|
#endif // SHARE_JVMCI_JVMCICOMPILER_HPP
|
||||||
|
|
|
@ -838,7 +838,7 @@ C2V_VMENTRY_0(jint, installCode, (JNIEnv *env, jobject, jobject target, jobject
|
||||||
|
|
||||||
JVMCICompiler* compiler = JVMCICompiler::instance(true, CHECK_JNI_ERR);
|
JVMCICompiler* compiler = JVMCICompiler::instance(true, CHECK_JNI_ERR);
|
||||||
|
|
||||||
TraceTime install_time("installCode", JVMCICompiler::codeInstallTimer());
|
TraceTime install_time("installCode", JVMCICompiler::codeInstallTimer(!thread->is_Compiler_thread()));
|
||||||
bool is_immutable_PIC = JVMCIENV->get_HotSpotCompiledCode_isImmutablePIC(compiled_code_handle) > 0;
|
bool is_immutable_PIC = JVMCIENV->get_HotSpotCompiledCode_isImmutablePIC(compiled_code_handle) > 0;
|
||||||
|
|
||||||
CodeInstaller installer(JVMCIENV, is_immutable_PIC);
|
CodeInstaller installer(JVMCIENV, is_immutable_PIC);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue