8154110: Update class* and safepoint* logging subsystems
Summary: Refactored logging tags in class and safepoint subsystems.
Reviewed-by: coleenp, rehn, hseigel
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -5349,7 +5349,7 @@
ClassLoadingService::notify_class_loaded(ik, false /* not shared class */);
if (!is_internal()) {
- if (log_is_enabled(Info, classload)) {
+ if (log_is_enabled(Info, class, load)) {
ResourceMark rm;
const char* module_name = NULL;
static const size_t modules_image_name_len = strlen(MODULES_IMAGE_NAME);
@@ -5361,21 +5361,21 @@
module_name = module_entry->name()->as_C_string();
}
- if (log_is_enabled(Info, classload)) {
+ if (log_is_enabled(Info, class, load)) {
ik->print_loading_log(LogLevel::Info, _loader_data, module_name, _stream);
}
// No 'else' here as logging levels are not mutually exclusive
- if (log_is_enabled(Debug, classload)) {
+ if (log_is_enabled(Debug, class, load)) {
ik->print_loading_log(LogLevel::Debug, _loader_data, module_name, _stream);
}
}
- if (log_is_enabled(Debug, classresolve)) {
+ if (log_is_enabled(Debug, class, resolve)) {
ResourceMark rm;
// print out the superclass.
const char * from = ik->external_name();
if (ik->java_super() != NULL) {
- log_debug(classresolve)("%s %s (super)",
+ log_debug(class, resolve)("%s %s (super)",
from,
ik->java_super()->external_name());
}
@@ -5386,7 +5386,7 @@
for (int i = 0; i < length; i++) {
const Klass* const k = local_interfaces->at(i);
const char * to = k->external_name();
- log_debug(classresolve)("%s %s (interface)", from, to);
+ log_debug(class, resolve)("%s %s (interface)", from, to);
}
}
}
@@ -5696,9 +5696,9 @@
}
if (!is_internal()) {
- if (log_is_enabled(Debug, classload, preorder)){
+ if (log_is_enabled(Debug, class, preorder)){
ResourceMark rm(THREAD);
- outputStream* log = Log(classload, preorder)::debug_stream();
+ outputStream* log = Log(class, preorder)::debug_stream();
log->print("%s", _class_name->as_klass_external_name());
if (stream->source() != NULL) {
log->print(" source: %s", stream->source());
--- a/hotspot/src/share/vm/classfile/classLoader.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -537,15 +537,15 @@
#if INCLUDE_CDS
void ClassLoader::exit_with_path_failure(const char* error, const char* message) {
assert(DumpSharedSpaces, "only called at dump time");
- tty->print_cr("Hint: enable -Xlog:classpath=info to diagnose the failure");
+ tty->print_cr("Hint: enable -Xlog:class+path=info to diagnose the failure");
vm_exit_during_initialization(error, message);
}
#endif
void ClassLoader::trace_class_path(const char* msg, const char* name) {
- if (log_is_enabled(Info, classpath)) {
+ if (log_is_enabled(Info, class, path)) {
ResourceMark rm;
- outputStream* out = Log(classpath)::info_stream();
+ outputStream* out = Log(class, path)::info_stream();
if (msg) {
out->print("%s", msg);
}
@@ -711,12 +711,12 @@
}
}
}
- log_info(classpath)("opened: %s", path);
- log_info(classload)("opened: %s", path);
+ log_info(class, path)("opened: %s", path);
+ log_info(class, load)("opened: %s", path);
} else {
// Directory
new_entry = new ClassPathDirEntry(path);
- log_info(classload)("path: %s", path);
+ log_info(class, load)("path: %s", path);
}
return new_entry;
}
--- a/hotspot/src/share/vm/classfile/classLoaderData.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/classLoaderData.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -333,7 +333,7 @@
if (publicize && k->class_loader_data() != NULL) {
ResourceMark rm;
- log_trace(classloaderdata)("Adding k: " PTR_FORMAT " %s to CLD: "
+ log_trace(class, loader, data)("Adding k: " PTR_FORMAT " %s to CLD: "
PTR_FORMAT " loader: " PTR_FORMAT " %s",
p2i(k),
k->external_name(),
@@ -371,9 +371,9 @@
// Tell serviceability tools these classes are unloading
classes_do(InstanceKlass::notify_unload_class);
- if (log_is_enabled(Debug, classloaderdata)) {
+ if (log_is_enabled(Debug, class, loader, data)) {
ResourceMark rm;
- outputStream* log = Log(classloaderdata)::debug_stream();
+ outputStream* log = Log(class, loader, data)::debug_stream();
log->print(": unload loader data " INTPTR_FORMAT, p2i(this));
log->print(" for instance " INTPTR_FORMAT " of %s", p2i((void *)class_loader()),
loader_name());
@@ -506,12 +506,12 @@
set_metaspace(new Metaspace(_metaspace_lock, Metaspace::BootMetaspaceType));
} else if (is_anonymous()) {
if (class_loader() != NULL) {
- log_trace(classloaderdata)("is_anonymous: %s", class_loader()->klass()->internal_name());
+ log_trace(class, loader, data)("is_anonymous: %s", class_loader()->klass()->internal_name());
}
set_metaspace(new Metaspace(_metaspace_lock, Metaspace::AnonymousMetaspaceType));
} else if (class_loader()->is_a(SystemDictionary::reflect_DelegatingClassLoader_klass())) {
if (class_loader() != NULL) {
- log_trace(classloaderdata)("is_reflection: %s", class_loader()->klass()->internal_name());
+ log_trace(class, loader, data)("is_reflection: %s", class_loader()->klass()->internal_name());
}
set_metaspace(new Metaspace(_metaspace_lock, Metaspace::ReflectionMetaspaceType));
} else {
@@ -702,7 +702,7 @@
cld->set_next(next);
ClassLoaderData* exchanged = (ClassLoaderData*)Atomic::cmpxchg_ptr(cld, list_head, next);
if (exchanged == next) {
- if (log_is_enabled(Debug, classloaderdata)) {
+ if (log_is_enabled(Debug, class, loader, data)) {
PauseNoSafepointVerifier pnsv(&no_safepoints); // Need safe points for JavaCalls::call_virtual
log_creation(loader, cld, CHECK_NULL);
}
@@ -730,7 +730,7 @@
}
ResourceMark rm;
- outputStream* log = Log(classloaderdata)::debug_stream();
+ outputStream* log = Log(class, loader, data)::debug_stream();
log->print("create class loader data " INTPTR_FORMAT, p2i(cld));
log->print(" for instance " INTPTR_FORMAT " of %s", p2i((void *)cld->class_loader()),
cld->loader_name());
@@ -871,8 +871,8 @@
if (!curr->claimed()) {
array->push(curr);
- if (log_is_enabled(Debug, classloaderdata)) {
- outputStream* log = Log(classloaderdata)::debug_stream();
+ if (log_is_enabled(Debug, class, loader, data)) {
+ outputStream* log = Log(class, loader, data)::debug_stream();
log->print("found new CLD: ");
curr->print_value_on(log);
log->cr();
--- a/hotspot/src/share/vm/classfile/javaClasses.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/javaClasses.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -131,7 +131,7 @@
tty->print_cr(" name: %s, sig: %s, flags: %08x", fs.name()->as_C_string(), fs.signature()->as_C_string(), fs.access_flags().as_int());
}
#endif //PRODUCT
- vm_exit_during_initialization("Invalid layout of preloaded class: use -Xlog:classload=info to see the origin of the problem class");
+ vm_exit_during_initialization("Invalid layout of preloaded class: use -Xlog:class+load=info to see the origin of the problem class");
}
dest_offset = fd.offset();
}
@@ -4059,7 +4059,7 @@
tty->print_cr(" name: %s, sig: %s, flags: %08x", fs.name()->as_C_string(), fs.signature()->as_C_string(), fs.access_flags().as_int());
}
#endif //PRODUCT
- vm_exit_during_initialization("Invalid layout of preloaded class: use -Xlog:classload=info to see the origin of the problem class");
+ vm_exit_during_initialization("Invalid layout of preloaded class: use -Xlog:class+load=info to see the origin of the problem class");
return -1;
}
--- a/hotspot/src/share/vm/classfile/loaderConstraints.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/loaderConstraints.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -111,9 +111,9 @@
if (klass != NULL &&
klass->class_loader_data()->is_unloading()) {
probe->set_klass(NULL);
- if (log_is_enabled(Info, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("purging class object from constraint for name %s,"
" loader list:",
probe->name()->as_C_string());
@@ -127,9 +127,9 @@
int n = 0;
while (n < probe->num_loaders()) {
if (probe->loader_data(n)->is_unloading()) {
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("purging loader %s from constraint for name %s",
probe->loader_data(n)->loader_name(),
probe->name()->as_C_string()
@@ -142,9 +142,9 @@
probe->set_loader_data(n, probe->loader_data(num));
probe->set_loader_data(num, NULL);
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("new loader list:");
for (int i = 0; i < probe->num_loaders(); i++) {
out->print_cr(" [%d]: %s", i,
@@ -159,9 +159,9 @@
}
// Check whether entry should be purged
if (probe->num_loaders() < 2) {
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("purging complete constraint for name %s",
probe->name()->as_C_string());
}
@@ -231,9 +231,9 @@
p->set_klass(klass);
p->set_next(bucket(index));
set_entry(index, p);
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("adding new constraint for name: %s, loader[0]: %s,"
" loader[1]: %s",
class_name->as_C_string(),
@@ -245,9 +245,9 @@
/* constraint already imposed */
if ((*pp1)->klass() == NULL) {
(*pp1)->set_klass(klass);
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("setting class object in existing constraint for"
" name: %s and loader %s",
class_name->as_C_string(),
@@ -267,9 +267,9 @@
}
}
- if (failure_code != 0 && log_is_enabled(Info, classload, constraints)) {
+ if (failure_code != 0 && log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
const char* reason = "";
switch(failure_code) {
case 1: reason = "the class objects presented by loader[0] and loader[1]"
@@ -300,9 +300,9 @@
Symbol* name) {
LoaderConstraintEntry* p = *(find_loader_constraint(name, loader));
if (p && p->klass() != NULL && p->klass() != k()) {
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("constraint check failed for name %s, loader %s: "
"the presented class object differs from that stored",
name->as_C_string(),
@@ -312,9 +312,9 @@
} else {
if (p && p->klass() == NULL) {
p->set_klass(k());
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("updating constraint for name %s, loader %s, "
"by setting class object",
name->as_C_string(),
@@ -362,9 +362,9 @@
int num = p->num_loaders();
p->set_loader(num, loader());
p->set_num_loaders(num + 1);
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("extending constraint for name %s by adding loader[%d]: %s %s",
p->name()->as_C_string(),
num,
@@ -402,9 +402,9 @@
p1->set_num_loaders(num + 1);
}
- if (log_is_enabled(Info, classload, constraints)) {
+ if (log_is_enabled(Info, class, loader, constraints)) {
ResourceMark rm;
- outputStream* out = Log(classload, constraints)::info_stream();
+ outputStream* out = Log(class, loader, constraints)::info_stream();
out->print_cr("merged constraints for name %s, new loader list:",
p1->name()->as_C_string()
);
--- a/hotspot/src/share/vm/classfile/modules.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/modules.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -167,7 +167,7 @@
ObjectLocker ol(loader_lock, THREAD);
ClassLoader::prepend_to_list(prefix_path);
}
- log_info(classload)("opened: -Xpatch %s", prefix_path);
+ log_info(class, load)("opened: -Xpatch %s", prefix_path);
}
}
}
@@ -195,7 +195,7 @@
Handle loader_lock = Handle(THREAD, SystemDictionary::system_loader_lock());
ObjectLocker ol(loader_lock, THREAD);
- log_info(classload)("opened: %s", path);
+ log_info(class, load)("opened: %s", path);
ClassLoader::add_to_list(path);
}
}
--- a/hotspot/src/share/vm/classfile/sharedPathsMiscInfo.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/sharedPathsMiscInfo.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -34,7 +34,7 @@
#include "utilities/ostream.hpp"
void SharedPathsMiscInfo::add_path(const char* path, int type) {
- log_info(classpath)("type=%s ", type_name(type));
+ log_info(class, path)("type=%s ", type_name(type));
ClassLoader::trace_class_path("add misc shared path ", path);
write(path, strlen(path) + 1);
write_jint(jint(type));
@@ -75,7 +75,7 @@
void SharedPathsMiscInfo::print_path(int type, const char* path) {
ResourceMark rm;
- outputStream* out = Log(classpath)::info_stream();
+ outputStream* out = Log(class, path)::info_stream();
switch (type) {
case BOOT:
out->print("Expecting BOOT path=%s", path);
@@ -109,7 +109,7 @@
if (!read_jint(&type)) {
return fail("Corrupted archive file header");
}
- log_info(classpath)("type=%s ", type_name(type));
+ log_info(class, path)("type=%s ", type_name(type));
print_path(type, path);
if (!check(type, path)) {
if (!PrintSharedArchiveAndExit) {
--- a/hotspot/src/share/vm/classfile/systemDictionary.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/systemDictionary.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -1388,12 +1388,12 @@
ik->restore_unshareable_info(loader_data, protection_domain, CHECK_(nh));
}
- if (log_is_enabled(Info, classload)) {
+ if (log_is_enabled(Info, class, load)) {
ik()->print_loading_log(LogLevel::Info, loader_data, NULL, NULL);
}
// No 'else' here as logging levels are not mutually exclusive
- if (log_is_enabled(Debug, classload)) {
+ if (log_is_enabled(Debug, class, load)) {
ik()->print_loading_log(LogLevel::Debug, loader_data, NULL, NULL);
}
--- a/hotspot/src/share/vm/classfile/verificationType.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/verificationType.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -61,7 +61,7 @@
Klass* obj = SystemDictionary::resolve_or_fail(
name(), Handle(THREAD, klass->class_loader()),
Handle(THREAD, klass->protection_domain()), true, CHECK_false);
- if (log_is_enabled(Debug, classresolve)) {
+ if (log_is_enabled(Debug, class, resolve)) {
Verifier::trace_class_resolution(obj, klass());
}
@@ -80,7 +80,7 @@
Klass* from_class = SystemDictionary::resolve_or_fail(
from.name(), Handle(THREAD, klass->class_loader()),
Handle(THREAD, klass->protection_domain()), true, CHECK_false);
- if (log_is_enabled(Debug, classresolve)) {
+ if (log_is_enabled(Debug, class, resolve)) {
Verifier::trace_class_resolution(from_class, klass());
}
return InstanceKlass::cast(from_class)->is_subclass_of(this_class());
--- a/hotspot/src/share/vm/classfile/verifier.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/verifier.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -107,9 +107,9 @@
const char* resolve = resolve_class->external_name();
// print in a single call to reduce interleaving between threads
if (source_file != NULL) {
- log_debug(classresolve)("%s %s %s (verification)", verify, resolve, source_file);
+ log_debug(class, resolve)("%s %s %s (verification)", verify, resolve, source_file);
} else {
- log_debug(classresolve)("%s %s (verification)", verify, resolve);
+ log_debug(class, resolve)("%s %s (verification)", verify, resolve);
}
}
@@ -169,7 +169,7 @@
bool can_failover = FailOverToOldVerifier &&
klass->major_version() < NOFAILOVER_MAJOR_VERSION;
- log_info(classinit)("Start class verification for: %s", klassName);
+ log_info(class, init)("Start class verification for: %s", klassName);
if (klass->major_version() >= STACKMAP_ATTRIBUTE_MAJOR_VERSION) {
ClassVerifier split_verifier(klass, THREAD);
split_verifier.verify_class(THREAD);
@@ -178,7 +178,7 @@
(exception_name == vmSymbols::java_lang_VerifyError() ||
exception_name == vmSymbols::java_lang_ClassFormatError())) {
log_info(verification)("Fail over class verification to old verifier for: %s", klassName);
- log_info(classinit)("Fail over class verification to old verifier for: %s", klassName);
+ log_info(class, init)("Fail over class verification to old verifier for: %s", klassName);
exception_name = inference_verify(
klass, message_buffer, message_buffer_len, THREAD);
}
@@ -190,8 +190,8 @@
klass, message_buffer, message_buffer_len, THREAD);
}
- if (log_is_enabled(Info, classinit)){
- log_end_verification(Log(classinit)::info_stream(), klassName, exception_name, THREAD);
+ if (log_is_enabled(Info, class, init)){
+ log_end_verification(Log(class, init)::info_stream(), klassName, exception_name, THREAD);
}
if (log_is_enabled(Info, verification)){
log_end_verification(Log(verification)::info_stream(), klassName, exception_name, THREAD);
@@ -205,7 +205,7 @@
ResourceMark rm(THREAD);
instanceKlassHandle kls =
SystemDictionary::resolve_or_fail(exception_name, true, CHECK_false);
- if (log_is_enabled(Debug, classresolve)) {
+ if (log_is_enabled(Debug, class, resolve)) {
Verifier::trace_class_resolution(kls(), klass());
}
@@ -601,7 +601,7 @@
if (was_recursively_verified()){
log_info(verification)("Recursive verification detected for: %s", _klass->external_name());
- log_info(classinit)("Recursive verification detected for: %s",
+ log_info(class, init)("Recursive verification detected for: %s",
_klass->external_name());
}
}
@@ -1994,7 +1994,7 @@
name, Handle(THREAD, loader), Handle(THREAD, protection_domain),
true, THREAD);
- if (log_is_enabled(Debug, classresolve)) {
+ if (log_is_enabled(Debug, class, resolve)) {
instanceKlassHandle cur_class = current_class();
Verifier::trace_class_resolution(kls, cur_class());
}
--- a/hotspot/src/share/vm/classfile/verifier.hpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/classfile/verifier.hpp Fri Apr 29 22:40:51 2016 -0400
@@ -61,7 +61,7 @@
// Relax certain verifier checks to enable some broken 1.1 apps to run on 1.2.
static bool relax_verify_for(oop class_loader);
- // Print output for classresolve
+ // Print output for class+resolve
static void trace_class_resolution(Klass* resolve_class, InstanceKlass* verify_class);
private:
--- a/hotspot/src/share/vm/code/nmethod.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/code/nmethod.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -1076,8 +1076,8 @@
flush_dependencies(is_alive);
// Break cycle between nmethod & method
- if (log_is_enabled(Trace, classunload)) {
- outputStream* log = Log(classunload)::trace_stream();
+ if (log_is_enabled(Trace, class, unload)) {
+ outputStream* log = Log(class, unload)::trace_stream();
log->print_cr("making nmethod " INTPTR_FORMAT
" unloadable, Method*(" INTPTR_FORMAT
"), cause(" INTPTR_FORMAT ")",
--- a/hotspot/src/share/vm/logging/logTag.hpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/logging/logTag.hpp Fri Apr 29 22:40:51 2016 -0400
@@ -39,18 +39,15 @@
LOG_TAG(biasedlocking) \
LOG_TAG(bot) \
LOG_TAG(census) \
+ LOG_TAG(class) \
LOG_TAG(classhisto) \
- LOG_TAG(classresolve) \
- LOG_TAG(classinit) \
- LOG_TAG(classload) /* Trace all classes loaded */ \
- LOG_TAG(classloaderdata) /* class loader loader_data lifetime */ \
- LOG_TAG(classunload) /* Trace unloading of classes */ \
- LOG_TAG(classpath) \
+ LOG_TAG(cleanup) \
LOG_TAG(compaction) \
LOG_TAG(constraints) \
LOG_TAG(coops) \
LOG_TAG(cpu) \
LOG_TAG(cset) \
+ LOG_TAG(data) \
LOG_TAG(defaultmethods) \
LOG_TAG(ergo) \
LOG_TAG(exceptions) \
@@ -60,10 +57,13 @@
LOG_TAG(heap) \
LOG_TAG(humongous) \
LOG_TAG(ihop) \
+ LOG_TAG(init) \
LOG_TAG(itables) \
LOG_TAG(jni) \
LOG_TAG(jvmti) \
LOG_TAG(liveness) \
+ LOG_TAG(load) /* Trace all classes loaded */ \
+ LOG_TAG(loader) \
LOG_TAG(logging) \
LOG_TAG(marking) \
LOG_TAG(metaspace) \
@@ -74,6 +74,7 @@
LOG_TAG(objecttagging) \
LOG_TAG(os) \
LOG_TAG(pagesize) \
+ LOG_TAG(path) \
LOG_TAG(phases) \
LOG_TAG(plab) \
LOG_TAG(promotion) \
@@ -83,8 +84,8 @@
LOG_TAG(refine) \
LOG_TAG(region) \
LOG_TAG(remset) \
+ LOG_TAG(resolve) \
LOG_TAG(safepoint) \
- LOG_TAG(safepointcleanup) \
LOG_TAG(scavenge) \
LOG_TAG(scrub) \
LOG_TAG(stacktrace) \
@@ -101,6 +102,7 @@
LOG_TAG(thread) \
LOG_TAG(tlab) \
LOG_TAG(time) \
+ LOG_TAG(unload) /* Trace unloading of classes */ \
LOG_TAG(verification) \
LOG_TAG(verify) \
LOG_TAG(vmoperation) \
--- a/hotspot/src/share/vm/memory/filemap.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/memory/filemap.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -209,7 +209,7 @@
count ++;
bytes += (int)entry_size;
bytes += name_bytes;
- log_info(classpath)("add main shared path (%s) %s", (cpe->is_jar_file() ? "jar" : "dir"), name);
+ log_info(class, path)("add main shared path (%s) %s", (cpe->is_jar_file() ? "jar" : "dir"), name);
} else {
SharedClassPathEntry* ent = shared_classpath(cur_entry);
if (cpe->is_jar_file()) {
@@ -283,7 +283,7 @@
struct stat st;
const char* name = ent->_name;
bool ok = true;
- log_info(classpath)("checking shared classpath entry: %s", name);
+ log_info(class, path)("checking shared classpath entry: %s", name);
if (os::stat(name, &st) != 0) {
fail_continue("Required classpath entry does not exist: %s", name);
ok = false;
@@ -307,7 +307,7 @@
}
}
if (ok) {
- log_info(classpath)("ok");
+ log_info(class, path)("ok");
} else if (!PrintSharedArchiveAndExit) {
_validating_classpath_entry_table = false;
return false;
@@ -897,8 +897,8 @@
char header_version[JVM_IDENT_MAX];
get_header_version(header_version);
if (strncmp(_jvm_ident, header_version, JVM_IDENT_MAX-1) != 0) {
- log_info(classpath)("expected: %s", header_version);
- log_info(classpath)("actual: %s", _jvm_ident);
+ log_info(class, path)("expected: %s", header_version);
+ log_info(class, path)("actual: %s", _jvm_ident);
FileMapInfo::fail_continue("The shared archive file was created by a different"
" version or build of HotSpot");
return false;
@@ -926,7 +926,7 @@
if (status) {
if (!ClassLoader::check_shared_paths_misc_info(_paths_misc_info, _header->_paths_misc_info_size)) {
if (!PrintSharedArchiveAndExit) {
- fail_continue("shared class paths mismatch (hint: enable -Xlog:classpath=info to diagnose the failure)");
+ fail_continue("shared class paths mismatch (hint: enable -Xlog:class+path=info to diagnose the failure)");
status = false;
}
}
--- a/hotspot/src/share/vm/memory/metaspaceShared.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/memory/metaspaceShared.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -919,7 +919,7 @@
InstanceKlass* ik = InstanceKlass::cast(klass);
- // Should be class load order as per -Xlog:classload+preorder
+ // Should be class load order as per -Xlog:class+preorder
class_promote_order->append(ik);
// Link the class to cause the bytecodes to be rewritten and the
--- a/hotspot/src/share/vm/oops/constantPool.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/oops/constantPool.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -209,11 +209,11 @@
if (k() != this_cp->pool_holder()) {
// only print something if the classes are different
if (source_file != NULL) {
- log_debug(classresolve)("%s %s %s:%d",
+ log_debug(class, resolve)("%s %s %s:%d",
this_cp->pool_holder()->external_name(),
k->external_name(), source_file, line_number);
} else {
- log_debug(classresolve)("%s %s",
+ log_debug(class, resolve)("%s %s",
this_cp->pool_holder()->external_name(),
k->external_name());
}
@@ -282,8 +282,8 @@
ClassLoaderData* this_key = this_cp->pool_holder()->class_loader_data();
this_key->record_dependency(k(), CHECK_NULL); // Can throw OOM
- // logging for classresolve tag.
- if (log_is_enabled(Debug, classresolve)){
+ // logging for class+resolve.
+ if (log_is_enabled(Debug, class, resolve)){
trace_class_resolution(this_cp, k);
}
this_cp->klass_at_put(which, k());
@@ -341,7 +341,7 @@
int cache_index = decode_cpcache_index(which, true);
if (!(cache_index >= 0 && cache_index < cpool->cache()->length())) {
// FIXME: should be an assert
- log_debug(classresolve)("bad operand %d in:", which); cpool->print();
+ log_debug(class, resolve)("bad operand %d in:", which); cpool->print();
return NULL;
}
ConstantPoolCacheEntry* e = cpool->cache()->entry_at(cache_index);
@@ -672,7 +672,7 @@
Symbol* name = this_cp->method_handle_name_ref_at(index);
Symbol* signature = this_cp->method_handle_signature_ref_at(index);
{ ResourceMark rm(THREAD);
- log_debug(classresolve)("resolve JVM_CONSTANT_MethodHandle:%d [%d/%d/%d] %s.%s",
+ log_debug(class, resolve)("resolve JVM_CONSTANT_MethodHandle:%d [%d/%d/%d] %s.%s",
ref_kind, index, this_cp->method_handle_index_at(index),
callee_index, name->as_C_string(), signature->as_C_string());
}
@@ -695,7 +695,7 @@
{
Symbol* signature = this_cp->method_type_signature_at(index);
{ ResourceMark rm(THREAD);
- log_debug(classresolve)("resolve JVM_CONSTANT_MethodType [%d/%d] %s",
+ log_debug(class, resolve)("resolve JVM_CONSTANT_MethodType [%d/%d] %s",
index, this_cp->method_type_index_at(index),
signature->as_C_string());
}
--- a/hotspot/src/share/vm/oops/instanceKlass.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/oops/instanceKlass.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -450,9 +450,9 @@
this_k->set_init_state (fully_initialized);
this_k->fence_and_clear_init_lock();
// trace
- if (log_is_enabled(Info, classinit)) {
+ if (log_is_enabled(Info, class, init)) {
ResourceMark rm(THREAD);
- log_info(classinit)("[Initialized %s without side effects]", this_k->external_name());
+ log_info(class, init)("[Initialized %s without side effects]", this_k->external_name());
}
}
}
@@ -1088,9 +1088,9 @@
methodHandle h_method(THREAD, this_k->class_initializer());
assert(!this_k->is_initialized(), "we cannot initialize twice");
- if (log_is_enabled(Info, classinit)) {
+ if (log_is_enabled(Info, class, init)) {
ResourceMark rm;
- outputStream* log = Log(classinit)::info_stream();
+ outputStream* log = Log(class, init)::info_stream();
log->print("%d Initializing ", call_class_initializer_impl_counter++);
this_k->name()->print_value_on(log);
log->print_cr("%s (" INTPTR_FORMAT ")", h_method() == NULL ? "(no method)" : "", p2i(this_k()));
@@ -3014,11 +3014,11 @@
assert(type == LogLevel::Info || type == LogLevel::Debug, "sanity");
if (type == LogLevel::Info) {
- log = Log(classload)::info_stream();
+ log = Log(class, load)::info_stream();
} else {
assert(type == LogLevel::Debug,
"print_loading_log supports only Debug and Info levels");
- log = Log(classload)::debug_stream();
+ log = Log(class, load)::debug_stream();
}
// Name and class hierarchy info
--- a/hotspot/src/share/vm/oops/klass.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/oops/klass.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -401,9 +401,9 @@
Klass* sub = current->subklass();
while (sub != NULL && !sub->is_loader_alive(is_alive)) {
#ifndef PRODUCT
- if (log_is_enabled(Trace, classunload)) {
+ if (log_is_enabled(Trace, class, unload)) {
ResourceMark rm;
- log_trace(classunload)("unlinking class (subclass): %s", sub->external_name());
+ log_trace(class, unload)("unlinking class (subclass): %s", sub->external_name());
}
#endif
sub = sub->next_sibling();
@@ -416,9 +416,9 @@
// Find and set the first alive sibling
Klass* sibling = current->next_sibling();
while (sibling != NULL && !sibling->is_loader_alive(is_alive)) {
- if (log_is_enabled(Trace, classunload)) {
+ if (log_is_enabled(Trace, class, unload)) {
ResourceMark rm;
- log_trace(classunload)("[Unlinking class (sibling) %s]", sibling->external_name());
+ log_trace(class, unload)("[Unlinking class (sibling) %s]", sibling->external_name());
}
sibling = sibling->next_sibling();
}
--- a/hotspot/src/share/vm/prims/jni.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/prims/jni.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -350,7 +350,7 @@
&st,
CHECK_NULL);
- if (log_is_enabled(Debug, classresolve) && k != NULL) {
+ if (log_is_enabled(Debug, class, resolve) && k != NULL) {
trace_class_resolution(k);
}
@@ -420,7 +420,7 @@
result = find_class_from_class_loader(env, sym, true, loader,
protection_domain, true, thread);
- if (log_is_enabled(Debug, classresolve) && result != NULL) {
+ if (log_is_enabled(Debug, class, resolve) && result != NULL) {
trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
}
@@ -3296,7 +3296,7 @@
TempNewSymbol sym = SymbolTable::new_symbol(name, CHECK_NULL);
jclass result = find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL);
- if (log_is_enabled(Debug, classresolve) && result != NULL) {
+ if (log_is_enabled(Debug, class, resolve) && result != NULL) {
trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
}
return result;
--- a/hotspot/src/share/vm/prims/jvm.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/prims/jvm.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -210,9 +210,9 @@
const char * to = to_class->external_name();
// print in a single call to reduce interleaving between threads
if (source_file != NULL) {
- log_debug(classresolve)("%s %s %s:%d (%s)", from, to, source_file, line_number, trace);
+ log_debug(class, resolve)("%s %s %s:%d (%s)", from, to, source_file, line_number, trace);
} else {
- log_debug(classresolve)("%s %s (%s)", from, to, trace);
+ log_debug(class, resolve)("%s %s (%s)", from, to, trace);
}
}
}
@@ -805,7 +805,7 @@
return NULL;
}
- if (log_is_enabled(Debug, classresolve)) {
+ if (log_is_enabled(Debug, class, resolve)) {
trace_class_resolution(k);
}
return (jclass) JNIHandles::make_local(env, k->java_mirror());
@@ -842,7 +842,7 @@
jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
h_prot, false, THREAD);
- if (log_is_enabled(Debug, classresolve) && result != NULL) {
+ if (log_is_enabled(Debug, class, resolve) && result != NULL) {
trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
}
return result;
@@ -872,7 +872,7 @@
jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
h_prot, true, thread);
- if (log_is_enabled(Debug, classresolve) && result != NULL) {
+ if (log_is_enabled(Debug, class, resolve) && result != NULL) {
// this function is generally only used for class loading during verification.
ResourceMark rm;
oop from_mirror = JNIHandles::resolve_non_null(from);
@@ -882,7 +882,7 @@
oop mirror = JNIHandles::resolve_non_null(result);
Klass* to_class = java_lang_Class::as_Klass(mirror);
const char * to = to_class->external_name();
- log_debug(classresolve)("%s %s (verification)", from_name, to);
+ log_debug(class, resolve)("%s %s (verification)", from_name, to);
}
return result;
@@ -950,7 +950,7 @@
&st,
CHECK_NULL);
- if (log_is_enabled(Debug, classresolve) && k != NULL) {
+ if (log_is_enabled(Debug, class, resolve) && k != NULL) {
trace_class_resolution(k);
}
--- a/hotspot/src/share/vm/prims/jvmtiEnv.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/prims/jvmtiEnv.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -489,7 +489,7 @@
ObjectLocker ol(loader_lock, thread);
// add the jar file to the bootclasspath
- log_info(classload)("opened: %s", zip_entry->name());
+ log_info(class, load)("opened: %s", zip_entry->name());
ClassLoaderExt::append_boot_classpath(zip_entry);
return JVMTI_ERROR_NONE;
} else {
@@ -640,11 +640,11 @@
break;
case JVMTI_VERBOSE_CLASS:
if (value == 0) {
- LogConfiguration::parse_log_arguments("stdout", "classunload=off", NULL, NULL, NULL);
- LogConfiguration::parse_log_arguments("stdout", "classload=off", NULL, NULL, NULL);
+ LogConfiguration::parse_log_arguments("stdout", "class+unload=off", NULL, NULL, NULL);
+ LogConfiguration::parse_log_arguments("stdout", "class+load=off", NULL, NULL, NULL);
} else {
- LogConfiguration::parse_log_arguments("stdout", "classload=info", NULL, NULL, NULL);
- LogConfiguration::parse_log_arguments("stdout", "classunload=info", NULL, NULL, NULL);
+ LogConfiguration::parse_log_arguments("stdout", "class+load=info", NULL, NULL, NULL);
+ LogConfiguration::parse_log_arguments("stdout", "class+unload=info", NULL, NULL, NULL);
}
break;
case JVMTI_VERBOSE_GC:
--- a/hotspot/src/share/vm/prims/whitebox.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/prims/whitebox.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -1555,7 +1555,7 @@
if (res == NULL) {
tty->print_cr("Invalid layout of %s at %s", ik->external_name(),
name_symbol->as_C_string());
- vm_exit_during_initialization("Invalid layout of preloaded class: use -Xlog:classload=info to see the origin of the problem class");
+ vm_exit_during_initialization("Invalid layout of preloaded class: use -Xlog:class+load=info to see the origin of the problem class");
}
//fetch the field at the offset we've found
--- a/hotspot/src/share/vm/runtime/arguments.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/runtime/arguments.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -411,15 +411,15 @@
static AliasedLoggingFlag const aliased_logging_flags[] = {
{ "PrintCompressedOopsMode", LogLevel::Info, true, LOG_TAGS(gc, heap, coops) },
{ "TraceBiasedLocking", LogLevel::Info, true, LOG_TAGS(biasedlocking) },
- { "TraceClassLoading", LogLevel::Info, true, LOG_TAGS(classload) },
- { "TraceClassLoadingPreorder", LogLevel::Debug, true, LOG_TAGS(classload, preorder) },
- { "TraceClassPaths", LogLevel::Info, true, LOG_TAGS(classpath) },
- { "TraceClassResolution", LogLevel::Debug, true, LOG_TAGS(classresolve) },
- { "TraceClassUnloading", LogLevel::Info, true, LOG_TAGS(classunload) },
+ { "TraceClassLoading", LogLevel::Info, true, LOG_TAGS(class, load) },
+ { "TraceClassLoadingPreorder", LogLevel::Debug, true, LOG_TAGS(class, preorder) },
+ { "TraceClassPaths", LogLevel::Info, true, LOG_TAGS(class, path) },
+ { "TraceClassResolution", LogLevel::Debug, true, LOG_TAGS(class, resolve) },
+ { "TraceClassUnloading", LogLevel::Info, true, LOG_TAGS(class, unload) },
{ "TraceExceptions", LogLevel::Info, true, LOG_TAGS(exceptions) },
- { "TraceLoaderConstraints", LogLevel::Info, true, LOG_TAGS(classload, constraints) },
+ { "TraceLoaderConstraints", LogLevel::Info, true, LOG_TAGS(class, loader, constraints) },
{ "TraceMonitorInflation", LogLevel::Debug, true, LOG_TAGS(monitorinflation) },
- { "TraceSafepointCleanupTime", LogLevel::Info, true, LOG_TAGS(safepointcleanup) },
+ { "TraceSafepointCleanupTime", LogLevel::Info, true, LOG_TAGS(safepoint, cleanup) },
{ "TraceJVMTIObjectTagging", LogLevel::Debug, true, LOG_TAGS(jvmti, objecttagging) },
{ NULL, LogLevel::Off, false, LOG_TAGS(_NO_TAG) }
};
@@ -427,8 +427,8 @@
#ifndef PRODUCT
// These options are removed in jdk9. Remove this code for jdk10.
static AliasedFlag const removed_develop_logging_flags[] = {
- { "TraceClassInitialization", "-Xlog:classinit" },
- { "TraceClassLoaderData", "-Xlog:classloaderdata" },
+ { "TraceClassInitialization", "-Xlog:class+init" },
+ { "TraceClassLoaderData", "-Xlog:class+loader+data" },
{ "TraceDefaultMethods", "-Xlog:defaultmethods=debug" },
{ "TraceItables", "-Xlog:itables=debug" },
{ "TraceMonitorMismatch", "-Xlog:monitormismatch=info" },
@@ -2846,8 +2846,8 @@
// -verbose:[class/gc/jni]
if (match_option(option, "-verbose", &tail)) {
if (!strcmp(tail, ":class") || !strcmp(tail, "")) {
- LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(classload));
- LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(classunload));
+ LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, load));
+ LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, unload));
} else if (!strcmp(tail, ":gc")) {
LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(gc));
} else if (!strcmp(tail, ":jni")) {
@@ -3488,7 +3488,7 @@
// PrintSharedArchiveAndExit will turn on
// -Xshare:on
- // -Xlog:classpath=info
+ // -Xlog:class+path=info
if (PrintSharedArchiveAndExit) {
if (FLAG_SET_CMDLINE(bool, UseSharedSpaces, true) != Flag::SUCCESS) {
return JNI_EINVAL;
@@ -3496,7 +3496,7 @@
if (FLAG_SET_CMDLINE(bool, RequireSharedSpaces, true) != Flag::SUCCESS) {
return JNI_EINVAL;
}
- LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(classpath));
+ LogConfiguration::configure_stdout(LogLevel::Info, true, LOG_TAGS(class, path));
}
// Change the default value for flags which have different default values
--- a/hotspot/src/share/vm/runtime/reflection.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/runtime/reflection.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -76,9 +76,9 @@
const char * to = to_class->external_name();
// print in a single call to reduce interleaving between threads
if (source_file != NULL) {
- log_debug(classresolve)("%s %s %s:%d (reflection)", from, to, source_file, line_number);
+ log_debug(class, resolve)("%s %s %s:%d (reflection)", from, to, source_file, line_number);
} else {
- log_debug(classresolve)("%s %s (reflection)", from, to);
+ log_debug(class, resolve)("%s %s (reflection)", from, to);
}
}
}
@@ -761,7 +761,7 @@
Handle(THREAD, protection_domain),
true,
CHECK_NULL);
- if (log_is_enabled(Debug, classresolve)) {
+ if (log_is_enabled(Debug, class, resolve)) {
trace_class_resolution(k);
}
return k->java_mirror();
@@ -816,7 +816,7 @@
Handle(THREAD, k->protection_domain()),
true, CHECK_(Handle()));
- if (log_is_enabled(Debug, classresolve)) {
+ if (log_is_enabled(Debug, class, resolve)) {
trace_class_resolution(result);
}
--- a/hotspot/src/share/vm/runtime/safepoint.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/runtime/safepoint.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -545,7 +545,7 @@
{
const char* name = "deflating idle monitors";
EventSafepointCleanupTask event;
- TraceTime timer(name, TRACETIME_LOG(Info, safepointcleanup));
+ TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
ObjectSynchronizer::deflate_idle_monitors();
event_safepoint_cleanup_task_commit(event, name);
}
@@ -553,14 +553,14 @@
{
const char* name = "updating inline caches";
EventSafepointCleanupTask event;
- TraceTime timer(name, TRACETIME_LOG(Info, safepointcleanup));
+ TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
InlineCacheBuffer::update_inline_caches();
event_safepoint_cleanup_task_commit(event, name);
}
{
const char* name = "compilation policy safepoint handler";
EventSafepointCleanupTask event;
- TraceTime timer("compilation policy safepoint handler", TRACETIME_LOG(Info, safepointcleanup));
+ TraceTime timer("compilation policy safepoint handler", TRACETIME_LOG(Info, safepoint, cleanup));
CompilationPolicy::policy()->do_safepoint_work();
event_safepoint_cleanup_task_commit(event, name);
}
@@ -568,7 +568,7 @@
{
const char* name = "mark nmethods";
EventSafepointCleanupTask event;
- TraceTime timer(name, TRACETIME_LOG(Info, safepointcleanup));
+ TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
NMethodSweeper::mark_active_nmethods();
event_safepoint_cleanup_task_commit(event, name);
}
@@ -576,7 +576,7 @@
if (SymbolTable::needs_rehashing()) {
const char* name = "rehashing symbol table";
EventSafepointCleanupTask event;
- TraceTime timer(name, TRACETIME_LOG(Info, safepointcleanup));
+ TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
SymbolTable::rehash_table();
event_safepoint_cleanup_task_commit(event, name);
}
@@ -584,7 +584,7 @@
if (StringTable::needs_rehashing()) {
const char* name = "rehashing string table";
EventSafepointCleanupTask event;
- TraceTime timer(name, TRACETIME_LOG(Info, safepointcleanup));
+ TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
StringTable::rehash_table();
event_safepoint_cleanup_task_commit(event, name);
}
@@ -594,7 +594,7 @@
// make sure concurrent sweep is done
const char* name = "purging class loader data graph";
EventSafepointCleanupTask event;
- TraceTime timer(name, TRACETIME_LOG(Info, safepointcleanup));
+ TraceTime timer(name, TRACETIME_LOG(Info, safepoint, cleanup));
ClassLoaderDataGraph::purge_if_needed();
event_safepoint_cleanup_task_commit(event, name);
}
--- a/hotspot/src/share/vm/services/classLoadingService.cpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/services/classLoadingService.cpp Fri Apr 29 22:40:51 2016 -0400
@@ -138,9 +138,9 @@
}
}
- if (log_is_enabled(Info, classunload)) {
+ if (log_is_enabled(Info, class, unload)) {
ResourceMark rm;
- log_info(classunload)("unloading class %s " INTPTR_FORMAT , k->external_name(), p2i(k));
+ log_info(class, unload)("unloading class %s " INTPTR_FORMAT , k->external_name(), p2i(k));
}
}
@@ -184,9 +184,9 @@
MutexLocker m(Management_lock);
// verbose will be set to the previous value
if (verbose) {
- LogConfiguration::parse_log_arguments("stdout", "classload=info", NULL, NULL, NULL);
+ LogConfiguration::parse_log_arguments("stdout", "class+load=info", NULL, NULL, NULL);
} else {
- LogConfiguration::parse_log_arguments("stdout", "classload=off", NULL, NULL, NULL);
+ LogConfiguration::parse_log_arguments("stdout", "class+load=off", NULL, NULL, NULL);
}
reset_trace_class_unloading();
return verbose;
@@ -197,9 +197,9 @@
assert(Management_lock->owned_by_self(), "Must own the Management_lock");
bool value = MemoryService::get_verbose() || ClassLoadingService::get_verbose();
if (value) {
- LogConfiguration::parse_log_arguments("stdout", "classunload=info", NULL, NULL, NULL);
+ LogConfiguration::parse_log_arguments("stdout", "class+unload=info", NULL, NULL, NULL);
} else {
- LogConfiguration::parse_log_arguments("stdout", "classunload=off", NULL, NULL, NULL);
+ LogConfiguration::parse_log_arguments("stdout", "class+unload=off", NULL, NULL, NULL);
}
}
--- a/hotspot/src/share/vm/services/classLoadingService.hpp Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/src/share/vm/services/classLoadingService.hpp Fri Apr 29 22:40:51 2016 -0400
@@ -55,7 +55,7 @@
public:
static void init();
- static bool get_verbose() { return log_is_enabled(Info, classload); }
+ static bool get_verbose() { return log_is_enabled(Info, class, load); }
static bool set_verbose(bool verbose);
static void reset_trace_class_unloading() NOT_MANAGEMENT_RETURN;
--- a/hotspot/test/compiler/jsr292/CallSiteDepContextTest.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/compiler/jsr292/CallSiteDepContextTest.java Fri Apr 29 22:40:51 2016 -0400
@@ -27,7 +27,7 @@
* @modules java.base/jdk.internal.org.objectweb.asm
* @library patches
* @build java.base/java.lang.invoke.MethodHandleHelper
- * @run main/bootclasspath -Xbatch -XX:+IgnoreUnrecognizedVMOptions -Xlog:classunload
+ * @run main/bootclasspath -Xbatch -XX:+IgnoreUnrecognizedVMOptions -Xlog:class+unload
* -XX:+PrintCompilation -XX:+TraceDependencies -XX:+TraceReferenceGC
* -verbose:gc compiler.jsr292.CallSiteDepContextTest
*/
--- a/hotspot/test/gc/g1/humongousObjects/TestHumongousClassLoader.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/gc/g1/humongousObjects/TestHumongousClassLoader.java Fri Apr 29 22:40:51 2016 -0400
@@ -56,17 +56,17 @@
* gc.g1.humongousObjects.ClassLoaderGenerator 1
*
* @run main/othervm -Xms256M -Xmx256M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
- * -Xlog:classload,classunload=debug:file=TestHumongousClassLoader_Full_GC.log
+ * -Xlog:class+load,class+unload=debug:file=TestHumongousClassLoader_Full_GC.log
* -XX:G1HeapRegionSize=1M
* gc.g1.humongousObjects.TestHumongousClassLoader FULL_GC
*
* @run main/othervm -Xms256M -Xmx256M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
- * -Xlog:classload,classunload=debug:file=TestHumongousClassLoader_Full_GC_Mem_Pressure.log
+ * -Xlog:class+load,class+unload=debug:file=TestHumongousClassLoader_Full_GC_Mem_Pressure.log
* -XX:G1HeapRegionSize=1M
* gc.g1.humongousObjects.TestHumongousClassLoader FULL_GC_MEMORY_PRESSURE
*
*@run main/othervm -Xms256M -Xmx256M -XX:+UseG1GC -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xbootclasspath/a:.
- * -Xlog:classload,classunload=debug:file=TestHumongousClassLoader_CMC.log
+ * -Xlog:class+load,class+unload=debug:file=TestHumongousClassLoader_CMC.log
* -XX:G1HeapRegionSize=1M -XX:MaxTenuringThreshold=1
* gc.g1.humongousObjects.TestHumongousClassLoader CMC
*
--- a/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/SharedArchiveFile/BootAppendTests.java Fri Apr 29 22:40:51 2016 -0400
@@ -154,7 +154,7 @@
APP_CLASS,
BOOT_APPEND_DUPLICATE_MODULE_CLASS_NAME);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("[classload] org.omg.CORBA.Context source: jrt:/java.corba");
+ output.shouldContain("[class,load] org.omg.CORBA.Context source: jrt:/java.corba");
}
}
@@ -179,11 +179,11 @@
APP_CLASS,
BOOT_APPEND_MODULE_CLASS_NAME);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("[classload] javax.sound.sampled.MyClass");
+ output.shouldContain("[class,load] javax.sound.sampled.MyClass");
// When CDS is enabled, the shared class should be loaded from the archive.
if (mode.equals("on")) {
- output.shouldContain("[classload] javax.sound.sampled.MyClass source: shared objects file");
+ output.shouldContain("[class,load] javax.sound.sampled.MyClass source: shared objects file");
}
}
}
@@ -211,8 +211,8 @@
APP_CLASS,
BOOT_APPEND_DUPLICATE_MODULE_CLASS_NAME);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("[classload] org.omg.CORBA.Context");
- output.shouldMatch(".*\\[classload\\] org.omg.CORBA.Context source:.*bootAppend.jar");
+ output.shouldContain("[class,load] org.omg.CORBA.Context");
+ output.shouldMatch(".*\\[class,load\\] org.omg.CORBA.Context source:.*bootAppend.jar");
}
}
@@ -235,13 +235,13 @@
APP_CLASS,
BOOT_APPEND_CLASS_NAME);
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("[classload] nonjdk.myPackage.MyClass");
+ output.shouldContain("[class,load] nonjdk.myPackage.MyClass");
// If CDS is enabled, the nonjdk.myPackage.MyClass should be loaded
// from the shared archive.
if (mode.equals("on")) {
output.shouldContain(
- "[classload] nonjdk.myPackage.MyClass source: shared objects file");
+ "[class,load] nonjdk.myPackage.MyClass source: shared objects file");
}
}
}
--- a/hotspot/test/runtime/logging/ClassInitializationTest.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/logging/ClassInitializationTest.java Fri Apr 29 22:40:51 2016 -0400
@@ -40,7 +40,7 @@
public static void main(String... args) throws Exception {
// (1)
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:classinit=info",
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:class+init=info",
"-Xverify:all",
"-Xmx64m",
"BadMap50");
@@ -53,7 +53,7 @@
// (2)
if (Platform.isDebugBuild()) {
- pb = ProcessTools.createJavaProcessBuilder("-Xlog:classinit=info",
+ pb = ProcessTools.createJavaProcessBuilder("-Xlog:class+init=info",
"-Xverify:all",
"-XX:+EagerInitialization",
"-Xmx64m",
@@ -63,13 +63,13 @@
out.shouldHaveExitValue(0);
}
- // (3) classinit should turn off.
- pb = ProcessTools.createJavaProcessBuilder("-Xlog:classinit=off",
+ // (3) class+init should turn off.
+ pb = ProcessTools.createJavaProcessBuilder("-Xlog:class+init=off",
"-Xverify:all",
"-Xmx64m",
"BadMap50");
out = new OutputAnalyzer(pb.start());
- out.shouldNotContain("[classinit]");
+ out.shouldNotContain("[class,init]");
out.shouldNotContain("Fail over class verification to old verifier for: BadMap50");
}
--- a/hotspot/test/runtime/logging/ClassLoadUnloadTest.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/logging/ClassLoadUnloadTest.java Fri Apr 29 22:40:51 2016 -0400
@@ -79,50 +79,50 @@
public static void main(String... args) throws Exception {
- // -Xlog:classunload=info
- pb = exec("-Xlog:classunload=info");
- checkFor("[classunload]", "unloading class");
+ // -Xlog:class+unload=info
+ pb = exec("-Xlog:class+unload=info");
+ checkFor("[class,unload]", "unloading class");
- // -Xlog:classunload=off
- pb = exec("-Xlog:classunload=off");
- checkAbsent("[classunload]");
+ // -Xlog:class+unload=off
+ pb = exec("-Xlog:class+unload=off");
+ checkAbsent("[class,unload]");
// -XX:+TraceClassUnloading
pb = exec("-XX:+TraceClassUnloading");
- checkFor("[classunload]", "unloading class");
+ checkFor("[class,unload]", "unloading class");
// -XX:-TraceClassUnloading
pb = exec("-XX:-TraceClassUnloading");
- checkAbsent("[classunload]");
+ checkAbsent("[class,unload]");
- // -Xlog:classload=info
- pb = exec("-Xlog:classload=info");
- checkFor("[classload]", "java.lang.Object", "source:");
+ // -Xlog:class+load=info
+ pb = exec("-Xlog:class+load=info");
+ checkFor("[class,load]", "java.lang.Object", "source:");
- // -Xlog:classload=debug
- pb = exec("-Xlog:classload=debug");
- checkFor("[classload]", "java.lang.Object", "source:", "klass:", "super:", "loader:", "bytes:");
+ // -Xlog:class+load=debug
+ pb = exec("-Xlog:class+load=debug");
+ checkFor("[class,load]", "java.lang.Object", "source:", "klass:", "super:", "loader:", "bytes:");
- // -Xlog:classload=off
- pb = exec("-Xlog:classload=off");
- checkAbsent("[classload]");
+ // -Xlog:class+load=off
+ pb = exec("-Xlog:class+load=off");
+ checkAbsent("[class,load]");
// -XX:+TraceClassLoading
pb = exec("-XX:+TraceClassLoading");
- checkFor("[classload]", "java.lang.Object", "source:");
+ checkFor("[class,load]", "java.lang.Object", "source:");
// -XX:-TraceClassLoading
pb = exec("-XX:-TraceClassLoading");
- checkAbsent("[classload]");
+ checkAbsent("[class,load]");
// -verbose:class
pb = exec("-verbose:class");
- checkFor("[classload]", "java.lang.Object", "source:");
- checkFor("[classunload]", "unloading class");
+ checkFor("[class,load]", "java.lang.Object", "source:");
+ checkFor("[class,unload]", "unloading class");
- // -Xlog:classloaderdata=trace
- pb = exec("-Xlog:classloaderdata=trace");
- checkFor("[classloaderdata]", "create class loader data");
+ // -Xlog:class+loader+data=trace
+ pb = exec("-Xlog:class+loader+data=trace");
+ checkFor("[class,loader,data]", "create class loader data");
}
}
--- a/hotspot/test/runtime/logging/ClassResolutionTest.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/logging/ClassResolutionTest.java Fri Apr 29 22:40:51 2016 -0400
@@ -58,32 +58,32 @@
public static void main(String... args) throws Exception {
- // (1) classresolve should turn on.
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:classresolve=debug",
+ // (1) class+resolve should turn on.
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:class+resolve=debug",
ClassResolutionTestMain.class.getName());
OutputAnalyzer o = new OutputAnalyzer(pb.start());
- o.shouldContain("[classresolve] ClassResolutionTest$ClassResolutionTestMain$Thing1Handler ClassResolutionTest$ClassResolutionTestMain$Thing1");
- o.shouldContain("[classresolve] resolve JVM_CONSTANT_MethodHandle");
+ o.shouldContain("[class,resolve] ClassResolutionTest$ClassResolutionTestMain$Thing1Handler ClassResolutionTest$ClassResolutionTestMain$Thing1");
+ o.shouldContain("[class,resolve] resolve JVM_CONSTANT_MethodHandle");
- // (2) classresolve should turn off.
- pb = ProcessTools.createJavaProcessBuilder("-Xlog:classresolve=debug",
- "-Xlog:classresolve=off",
+ // (2) class+resolve should turn off.
+ pb = ProcessTools.createJavaProcessBuilder("-Xlog:class+resolve=debug",
+ "-Xlog:class+resolve=off",
ClassResolutionTestMain.class.getName());
o = new OutputAnalyzer(pb.start());
- o.shouldNotContain("[classresolve]");
+ o.shouldNotContain("[class,resolve]");
// (3) TraceClassResolution should turn on.
pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceClassResolution",
ClassResolutionTestMain.class.getName());
o = new OutputAnalyzer(pb.start());
- o.shouldContain("[classresolve] ClassResolutionTest$ClassResolutionTestMain$Thing1Handler ClassResolutionTest$ClassResolutionTestMain$Thing1");
+ o.shouldContain("[class,resolve] ClassResolutionTest$ClassResolutionTestMain$Thing1Handler ClassResolutionTest$ClassResolutionTestMain$Thing1");
// (4) TraceClassResolution should turn off.
- pb = ProcessTools.createJavaProcessBuilder("-Xlog:classresolve=debug",
+ pb = ProcessTools.createJavaProcessBuilder("-Xlog:class+resolve=debug",
"-XX:-TraceClassResolution",
ClassResolutionTestMain.class.getName());
o = new OutputAnalyzer(pb.start());
- o.shouldNotContain("[classresolve]");
+ o.shouldNotContain("[class,resolve]");
};
--- a/hotspot/test/runtime/logging/LoaderConstraintsTest.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/logging/LoaderConstraintsTest.java Fri Apr 29 22:40:51 2016 -0400
@@ -67,22 +67,22 @@
pb = exec("-XX:+TraceLoaderConstraints");
out = new OutputAnalyzer(pb.start());
out.getOutput();
- out.shouldContain("[classload,constraints] adding new constraint for name: java/lang/Class, loader[0]: jdk/internal/loader/ClassLoaders$AppClassLoader, loader[1]: <bootloader>");
+ out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: jdk/internal/loader/ClassLoaders$AppClassLoader, loader[1]: <bootloader>");
- // -Xlog:classload+constraints=info
- pb = exec("-Xlog:classload+constraints=info");
+ // -Xlog:class+loader+constraints=info
+ pb = exec("-Xlog:class+loader+constraints=info");
out = new OutputAnalyzer(pb.start());
- out.shouldContain("[classload,constraints] adding new constraint for name: java/lang/Class, loader[0]: jdk/internal/loader/ClassLoaders$AppClassLoader, loader[1]: <bootloader>");
+ out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: jdk/internal/loader/ClassLoaders$AppClassLoader, loader[1]: <bootloader>");
// -XX:-TraceLoaderConstraints
pb = exec("-XX:-TraceLoaderConstraints");
out = new OutputAnalyzer(pb.start());
- out.shouldNotContain("[classload,constraints]");
+ out.shouldNotContain("[class,loaderconstraints]");
- // -Xlog:classload+constraints=off
- pb = exec("-Xlog:classload+constraints=off");
+ // -Xlog:class+loader+constraints=off
+ pb = exec("-Xlog:class+loader+constraints=off");
out = new OutputAnalyzer(pb.start());
- out.shouldNotContain("[classload,constraints]");
+ out.shouldNotContain("[class,loader,constraints]");
}
}
--- a/hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/logging/RemovedDevelopFlagsTest.java Fri Apr 29 22:40:51 2016 -0400
@@ -49,8 +49,8 @@
public static void main(String... args) throws Exception {
if (Platform.isDebugBuild()){
- exec("TraceClassInitialization", "-Xlog:classinit");
- exec("TraceClassLoaderData", "-Xlog:classloaderdata");
+ exec("TraceClassInitialization", "-Xlog:class+init");
+ exec("TraceClassLoaderData", "-Xlog:class+loader+data");
exec("TraceDefaultMethods", "-Xlog:defaultmethods=debug");
exec("TraceItables", "-Xlog:itables=debug");
exec("TraceSafepoint", "-Xlog:safepoint=debug");
--- a/hotspot/test/runtime/logging/SafepointCleanupTest.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/logging/SafepointCleanupTest.java Fri Apr 29 22:40:51 2016 -0400
@@ -24,7 +24,7 @@
/*
* @test
* @bug 8149991
- * @summary safepointcleanup=info should have output from the code
+ * @summary safepoint+cleanup=info should have output from the code
* @library /testlibrary
* @modules java.base/jdk.internal.misc
* java.management
@@ -38,7 +38,7 @@
public class SafepointCleanupTest {
static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("[safepointcleanup]");
+ output.shouldContain("[safepoint,cleanup]");
output.shouldContain("deflating idle monitors");
output.shouldContain("updating inline caches");
output.shouldContain("compilation policy safepoint handler");
@@ -49,12 +49,12 @@
static void analyzeOutputOff(ProcessBuilder pb) throws Exception {
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldNotContain("[safepointcleanup]");
+ output.shouldNotContain("[safepoint,cleanup]");
output.shouldHaveExitValue(0);
}
public static void main(String[] args) throws Exception {
- ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:safepointcleanup=info",
+ ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-Xlog:safepoint+cleanup=info",
InnerClass.class.getName());
analyzeOutputOn(pb);
@@ -62,7 +62,7 @@
InnerClass.class.getName());
analyzeOutputOn(pb);
- pb = ProcessTools.createJavaProcessBuilder("-Xlog:safepointcleanup=off",
+ pb = ProcessTools.createJavaProcessBuilder("-Xlog:safepoint+cleanup=off",
InnerClass.class.getName());
analyzeOutputOff(pb);
--- a/hotspot/test/runtime/modules/Xpatch/XpatchTraceCL.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/modules/Xpatch/XpatchTraceCL.java Fri Apr 29 22:40:51 2016 -0400
@@ -54,12 +54,12 @@
OutputAnalyzer output = new OutputAnalyzer(pb.start());
// "modules" jimage case.
- output.shouldContain("[classload] java.lang.Thread source: jrt:/java.base");
+ output.shouldContain("[class,load] java.lang.Thread source: jrt:/java.base");
// -Xpatch case.
- output.shouldContain("[classload] javax.naming.spi.NamingManager source: mods" +
+ output.shouldContain("[class,load] javax.naming.spi.NamingManager source: mods" +
File.separator + "java.naming");
// -cp case.
- output.shouldContain("[classload] XpatchMain source: file");
+ output.shouldContain("[class,load] XpatchMain source: file");
// Test -XX:+TraceClassLoading output for -Xbootclasspath/a
source = "package XpatchTraceCL_pkg; " +
@@ -77,7 +77,7 @@
"-XX:+TraceClassLoading", "XpatchMain", "XpatchTraceCL_pkg.ItIsI");
output = new OutputAnalyzer(pb.start());
// -Xbootclasspath/a case.
- output.shouldContain("[classload] XpatchTraceCL_pkg.ItIsI source: xbcp");
+ output.shouldContain("[class,load] XpatchTraceCL_pkg.ItIsI source: xbcp");
output.shouldHaveExitValue(0);
}
}
--- a/hotspot/test/runtime/verifier/TraceClassRes.java Fri Apr 29 18:55:41 2016 +0000
+++ b/hotspot/test/runtime/verifier/TraceClassRes.java Fri Apr 29 22:40:51 2016 -0400
@@ -38,7 +38,7 @@
"-XX:+TraceClassResolution", "-verify", "-Xshare:off", "-version");
OutputAnalyzer output = new OutputAnalyzer(pb.start());
- output.shouldContain("[classresolve] java.lang.ClassLoader java.lang.Throwable ClassLoader.java (verification)");
+ output.shouldContain("[class,resolve] java.lang.ClassLoader java.lang.Throwable ClassLoader.java (verification)");
output.shouldHaveExitValue(0);
}
}