8146947
: Remove PrintOopAddress rather than converting to UL
Deprecated PrintOopAddress and made functionality default Reviewed-by: coleenp, stefank
This commit is contained in:
parent
cd3f80324f
commit
0f7f8e05ab
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -461,8 +461,6 @@ void ObjArrayKlass::oop_print_on(oop obj, outputStream* st) {
|
||||
|
||||
#endif //PRODUCT
|
||||
|
||||
static int max_objArray_print_length = 4;
|
||||
|
||||
void ObjArrayKlass::oop_print_value_on(oop obj, outputStream* st) {
|
||||
assert(obj->is_objArray(), "must be objArray");
|
||||
st->print("a ");
|
||||
@ -470,16 +468,6 @@ void ObjArrayKlass::oop_print_value_on(oop obj, outputStream* st) {
|
||||
int len = objArrayOop(obj)->length();
|
||||
st->print("[%d] ", len);
|
||||
obj->print_address_on(st);
|
||||
if (NOT_PRODUCT(PrintOopAddress ||) PrintMiscellaneous && (WizardMode || Verbose)) {
|
||||
st->print("{");
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (i > max_objArray_print_length) {
|
||||
st->print("..."); break;
|
||||
}
|
||||
st->print(" " INTPTR_FORMAT, (intptr_t)(void*)objArrayOop(obj)->obj_at(i));
|
||||
}
|
||||
st->print(" }");
|
||||
}
|
||||
}
|
||||
|
||||
const char* ObjArrayKlass::internal_name() const {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -44,9 +44,8 @@ void oopDesc::print_on(outputStream* st) const {
|
||||
}
|
||||
|
||||
void oopDesc::print_address_on(outputStream* st) const {
|
||||
if (PrintOopAddress) {
|
||||
st->print("{" INTPTR_FORMAT "}", p2i(this));
|
||||
}
|
||||
st->print("{" INTPTR_FORMAT "}", p2i(this));
|
||||
|
||||
}
|
||||
|
||||
void oopDesc::print() { print_on(tty); }
|
||||
@ -76,7 +75,7 @@ void oopDesc::print_value_on(outputStream* st) const {
|
||||
st->print("NULL");
|
||||
} else if (java_lang_String::is_instance(obj)) {
|
||||
java_lang_String::print(obj, st);
|
||||
if (PrintOopAddress) print_address_on(st);
|
||||
print_address_on(st);
|
||||
} else {
|
||||
klass()->oop_print_value_on(obj, st);
|
||||
}
|
||||
|
@ -385,6 +385,7 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||
{ "JNIDetachReleasesMonitors", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
|
||||
{ "UseAltSigs", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
|
||||
{ "SegmentedHeapDumpThreshold", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
|
||||
{ "PrintOopAddress", JDK_Version::undefined(), JDK_Version::jdk(9), JDK_Version::jdk(10) },
|
||||
|
||||
#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
|
||||
{ "dep > obs", JDK_Version::jdk(9), JDK_Version::jdk(8), JDK_Version::undefined() },
|
||||
|
@ -951,9 +951,6 @@ public:
|
||||
notproduct(bool, PrintMallocFree, false, \
|
||||
"Trace calls to C heap malloc/free allocation") \
|
||||
\
|
||||
product(bool, PrintOopAddress, false, \
|
||||
"Always print the location of the oop") \
|
||||
\
|
||||
notproduct(bool, VerifyCodeCache, false, \
|
||||
"Verify code cache on memory allocation/deallocation") \
|
||||
\
|
||||
|
@ -508,12 +508,13 @@ void Exceptions::log_exception(Handle exception, stringStream tempst) {
|
||||
ResourceMark rm;
|
||||
Symbol* message = java_lang_Throwable::detail_message(exception());
|
||||
if (message != NULL) {
|
||||
log_info(exceptions)("Exception <%s: %s> (" INTPTR_FORMAT ")\n thrown in %s",
|
||||
log_info(exceptions)("Exception <%s: %s>\n thrown in %s",
|
||||
exception->print_value_string(),
|
||||
message->as_C_string(), p2i(exception()), tempst.as_string());
|
||||
message->as_C_string(),
|
||||
tempst.as_string());
|
||||
} else {
|
||||
log_info(exceptions)("Exception <%s> (" INTPTR_FORMAT ")\n thrown in %s",
|
||||
log_info(exceptions)("Exception <%s>\n thrown in %s",
|
||||
exception->print_value_string(),
|
||||
p2i(exception()), tempst.as_string());
|
||||
tempst.as_string());
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -38,7 +38,7 @@ public class TraceExceptionsTest {
|
||||
ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
|
||||
"-Xlog:exceptions=info", "NoClassFound");
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldContain("<a 'java/lang/ClassNotFoundException': NoClassFound>");
|
||||
output.shouldContain("<a 'java/lang/ClassNotFoundException'").shouldContain(": NoClassFound>");
|
||||
output.shouldNotContain("<a 'java/lang/ClassNotFoundException'>");
|
||||
output.shouldHaveExitValue(1);
|
||||
}
|
||||
|
@ -45,7 +45,7 @@ public class ExceptionsTest {
|
||||
|
||||
static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
|
||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||
output.shouldContain("<a 'java/lang/RuntimeException': Test exception 1 for logging>");
|
||||
output.shouldContain("<a 'java/lang/RuntimeException'").shouldContain(": Test exception 1 for logging>");
|
||||
output.shouldContain(" thrown in interpreter method ");
|
||||
output.shouldHaveExitValue(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user