8193513: add support for printing a stack trace on class loading

Reviewed-by: dholmes, iklam, coleenp
This commit is contained in:
Doug Simon 2023-07-08 07:56:28 +00:00
parent 292ee630ae
commit 4a1fcb6063
6 changed files with 110 additions and 5 deletions

View file

@ -3961,6 +3961,12 @@ jint Arguments::parse(const JavaVMInitArgs* initial_cmd_args) {
warning("dependency logging results may be inflated by VerifyDependencies");
}
bool log_class_load_cause = log_is_enabled(Info, class, load, cause, native) ||
log_is_enabled(Info, class, load, cause);
if (log_class_load_cause && LogClassLoadingCauseFor == nullptr) {
warning("class load cause logging will not produce output without LogClassLoadingCauseFor");
}
apply_debugger_ergo();
if (log_is_enabled(Info, arguments)) {