8242263: Diagnose synchronization on primitive wrappers

Added diagnostic flag DiagnoseSyncOnPrimitiveWrappers

Reviewed-by: dholmes, mdoerr, dcubed, coleenp, egahlin, mgronlun
This commit is contained in:
Patricio Chilano Mateo 2020-08-21 15:04:02 +00:00
parent fac22ce20c
commit e56002c7d3
36 changed files with 528 additions and 88 deletions

View file

@ -4193,6 +4193,11 @@ jint Arguments::apply_ergo() {
}
#endif
if (FLAG_IS_CMDLINE(DiagnoseSyncOnPrimitiveWrappers)) {
if (DiagnoseSyncOnPrimitiveWrappers == ObjectSynchronizer::LOG_WARNING && !log_is_enabled(Info, primitivewrappers)) {
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(primitivewrappers));
}
}
return JNI_OK;
}