Skip to content

Commit 339aded

Browse files
author
duke
committedDec 3, 2020
Automatic merge of jdk:master into master
2 parents e258953 + e4497c9 commit 339aded

23 files changed

+37
-310
lines changed
 

‎src/hotspot/cpu/aarch64/methodHandles_aarch64.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,6 @@ void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
132132
assert(recv != noreg, "required register");
133133
assert(method_temp == rmethod, "required register for loading method");
134134

135-
//NOT_PRODUCT({ FlagSetting fs(TraceMethodHandles, true); trace_method_handle(_masm, "LZMH"); });
136-
137135
// Load the invoker, as MH -> MH.form -> LF.vmentry
138136
__ verify_oop(recv);
139137
__ load_heap_oop(method_temp, Address(recv, NONZERO(java_lang_invoke_MethodHandle::form_offset())), temp2);

‎src/hotspot/cpu/x86/methodHandles_x86.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ void MethodHandles::jump_to_lambda_form(MacroAssembler* _masm,
168168
assert(recv != noreg, "required register");
169169
assert(method_temp == rbx, "required register for loading method");
170170

171-
//NOT_PRODUCT({ FlagSetting fs(TraceMethodHandles, true); trace_method_handle(_masm, "LZMH"); });
172-
173171
// Load the invoker, as MH -> MH.form -> LF.vmentry
174172
__ verify_oop(recv);
175173
__ load_heap_oop(method_temp, Address(recv, NONZERO(java_lang_invoke_MethodHandle::form_offset())), temp2);

‎src/hotspot/share/oops/method.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ class Method : public Metadata {
10091009
// Printing
10101010
void print_short_name(outputStream* st = tty); // prints as klassname::methodname; Exposed so field engineers can debug VM
10111011
#if INCLUDE_JVMTI
1012-
void print_name(outputStream* st = tty); // prints as "virtual void foo(int)"; exposed for TraceRedefineClasses
1012+
void print_name(outputStream* st = tty); // prints as "virtual void foo(int)"; exposed for -Xlog:redefine+class
10131013
#else
10141014
void print_name(outputStream* st = tty) PRODUCT_RETURN; // prints as "virtual void foo(int)"
10151015
#endif

‎src/hotspot/share/runtime/arguments.cpp

+16-114
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,22 @@ static SpecialFlag const special_jvm_flags[] = {
557557
{ "Debugging", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
558558
{ "UseRDPCForConstantTableBase", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
559559
{ "VerifyMergedCPBytecodes", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
560+
{ "PrintSharedSpaces", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
561+
{ "TraceBiasedLocking", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
562+
{ "TraceClassLoading", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
563+
{ "TraceClassLoadingPreorder", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
564+
{ "TraceClassPaths", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
565+
{ "TraceClassResolution", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
566+
{ "TraceClassUnloading", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
567+
{ "TraceExceptions", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
568+
{ "TraceInvokeDynamic", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
569+
{ "TraceLoaderConstraints", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
570+
{ "TraceMethodHandles", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
571+
{ "TraceMonitorInflation", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
572+
{ "TraceSafepointCleanupTime", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
573+
{ "TraceJVMTIObjectTagging", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
574+
{ "TraceRedefineClasses", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
575+
{ "PrintJNIResolving", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
560576

561577
#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
562578
// These entries will generate build errors. Their purpose is to test the macros.
@@ -584,44 +600,6 @@ static AliasedFlag const aliased_jvm_flags[] = {
584600
{ NULL, NULL}
585601
};
586602

587-
// NOTE: A compatibility request will be necessary for each alias to be removed.
588-
static AliasedLoggingFlag const aliased_logging_flags[] = {
589-
{ "PrintSharedSpaces", LogLevel::Info, true, LOG_TAGS(cds) },
590-
{ "TraceBiasedLocking", LogLevel::Info, true, LOG_TAGS(biasedlocking) },
591-
{ "TraceClassLoading", LogLevel::Info, true, LOG_TAGS(class, load) },
592-
{ "TraceClassLoadingPreorder", LogLevel::Debug, true, LOG_TAGS(class, preorder) },
593-
{ "TraceClassPaths", LogLevel::Info, true, LOG_TAGS(class, path) },
594-
{ "TraceClassResolution", LogLevel::Debug, true, LOG_TAGS(class, resolve) },
595-
{ "TraceClassUnloading", LogLevel::Info, true, LOG_TAGS(class, unload) },
596-
{ "TraceExceptions", LogLevel::Info, true, LOG_TAGS(exceptions) },
597-
{ "TraceInvokeDynamic", LogLevel::Debug, true, LOG_TAGS(methodhandles, indy) },
598-
{ "TraceLoaderConstraints", LogLevel::Info, true, LOG_TAGS(class, loader, constraints) },
599-
{ "TraceMethodHandles", LogLevel::Info, true, LOG_TAGS(methodhandles) },
600-
{ "TraceMonitorInflation", LogLevel::Trace, true, LOG_TAGS(monitorinflation) },
601-
{ "TraceSafepointCleanupTime", LogLevel::Info, true, LOG_TAGS(safepoint, cleanup) },
602-
{ "TraceJVMTIObjectTagging", LogLevel::Debug, true, LOG_TAGS(jvmti, objecttagging) },
603-
{ "TraceRedefineClasses", LogLevel::Info, false, LOG_TAGS(redefine, class) },
604-
{ "PrintJNIResolving", LogLevel::Debug, true, LOG_TAGS(jni, resolve) },
605-
{ NULL, LogLevel::Off, false, LOG_TAGS(_NO_TAG) }
606-
};
607-
608-
#ifndef PRODUCT
609-
// These options are removed in jdk9. Remove this code for jdk10.
610-
static AliasedFlag const removed_develop_logging_flags[] = {
611-
{ "TraceClassInitialization", "-Xlog:class+init" },
612-
{ "TraceClassLoaderData", "-Xlog:class+loader+data" },
613-
{ "TraceDefaultMethods", "-Xlog:defaultmethods=debug" },
614-
{ "TraceItables", "-Xlog:itables=debug" },
615-
{ "TraceMonitorMismatch", "-Xlog:monitormismatch=info" },
616-
{ "TraceSafepoint", "-Xlog:safepoint=debug" },
617-
{ "TraceStartupTime", "-Xlog:startuptime" },
618-
{ "TraceVMOperation", "-Xlog:vmoperation=debug" },
619-
{ "PrintVtables", "-Xlog:vtables=debug" },
620-
{ "VerboseVerification", "-Xlog:verification" },
621-
{ NULL, NULL }
622-
};
623-
#endif //PRODUCT
624-
625603
// Return true if "v" is less than "other", where "other" may be "undefined".
626604
static bool version_less_than(JDK_Version v, JDK_Version other) {
627605
assert(!v.is_undefined(), "must be defined");
@@ -685,18 +663,6 @@ int Arguments::is_deprecated_flag(const char *flag_name, JDK_Version* version) {
685663
return 0;
686664
}
687665

688-
#ifndef PRODUCT
689-
const char* Arguments::removed_develop_logging_flag_name(const char* name){
690-
for (size_t i = 0; removed_develop_logging_flags[i].alias_name != NULL; i++) {
691-
const AliasedFlag& flag = removed_develop_logging_flags[i];
692-
if (strcmp(flag.alias_name, name) == 0) {
693-
return flag.real_name;
694-
}
695-
}
696-
return NULL;
697-
}
698-
#endif // PRODUCT
699-
700666
const char* Arguments::real_flag_name(const char *flag_name) {
701667
for (size_t i = 0; aliased_jvm_flags[i].alias_name != NULL; i++) {
702668
const AliasedFlag& flag_status = aliased_jvm_flags[i];
@@ -1014,44 +980,6 @@ const char* Arguments::handle_aliases_and_deprecation(const char* arg, bool warn
1014980
return NULL;
1015981
}
1016982

1017-
void log_deprecated_flag(const char* name, bool on, AliasedLoggingFlag alf) {
1018-
LogTagType tagSet[] = {alf.tag0, alf.tag1, alf.tag2, alf.tag3, alf.tag4, alf.tag5};
1019-
// Set tagset string buffer at max size of 256, large enough for any alias tagset
1020-
const int max_tagset_size = 256;
1021-
int max_tagset_len = max_tagset_size - 1;
1022-
char tagset_buffer[max_tagset_size];
1023-
tagset_buffer[0] = '\0';
1024-
1025-
// Write tag-set for aliased logging option, in string list form
1026-
int max_tags = sizeof(tagSet)/sizeof(tagSet[0]);
1027-
for (int i = 0; i < max_tags && tagSet[i] != LogTag::__NO_TAG; i++) {
1028-
if (i > 0) {
1029-
strncat(tagset_buffer, "+", max_tagset_len - strlen(tagset_buffer));
1030-
}
1031-
strncat(tagset_buffer, LogTag::name(tagSet[i]), max_tagset_len - strlen(tagset_buffer));
1032-
}
1033-
if (!alf.exactMatch) {
1034-
strncat(tagset_buffer, "*", max_tagset_len - strlen(tagset_buffer));
1035-
}
1036-
log_warning(arguments)("-XX:%s%s is deprecated. Will use -Xlog:%s=%s instead.",
1037-
(on) ? "+" : "-",
1038-
name,
1039-
tagset_buffer,
1040-
(on) ? LogLevel::name(alf.level) : "off");
1041-
}
1042-
1043-
AliasedLoggingFlag Arguments::catch_logging_aliases(const char* name, bool on){
1044-
for (size_t i = 0; aliased_logging_flags[i].alias_name != NULL; i++) {
1045-
const AliasedLoggingFlag& alf = aliased_logging_flags[i];
1046-
if (strcmp(alf.alias_name, name) == 0) {
1047-
log_deprecated_flag(name, on, alf);
1048-
return alf;
1049-
}
1050-
}
1051-
AliasedLoggingFlag a = {NULL, LogLevel::Off, false, LOG_TAGS(_NO_TAG)};
1052-
return a;
1053-
}
1054-
1055983
bool Arguments::parse_argument(const char* arg, JVMFlagOrigin origin) {
1056984

1057985
// range of acceptable characters spelled out for portability reasons
@@ -1063,11 +991,6 @@ bool Arguments::parse_argument(const char* arg, JVMFlagOrigin origin) {
1063991
bool warn_if_deprecated = true;
1064992

1065993
if (sscanf(arg, "-%" XSTR(BUFLEN) NAME_RANGE "%c", name, &dummy) == 1) {
1066-
AliasedLoggingFlag alf = catch_logging_aliases(name, false);
1067-
if (alf.alias_name != NULL){
1068-
LogConfiguration::configure_stdout(LogLevel::Off, alf.exactMatch, alf.tag0, alf.tag1, alf.tag2, alf.tag3, alf.tag4, alf.tag5);
1069-
return true;
1070-
}
1071994
real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
1072995
if (real_name == NULL) {
1073996
return false;
@@ -1076,11 +999,6 @@ bool Arguments::parse_argument(const char* arg, JVMFlagOrigin origin) {
1076999
return set_bool_flag(flag, false, origin);
10771000
}
10781001
if (sscanf(arg, "+%" XSTR(BUFLEN) NAME_RANGE "%c", name, &dummy) == 1) {
1079-
AliasedLoggingFlag alf = catch_logging_aliases(name, true);
1080-
if (alf.alias_name != NULL){
1081-
LogConfiguration::configure_stdout(alf.level, alf.exactMatch, alf.tag0, alf.tag1, alf.tag2, alf.tag3, alf.tag4, alf.tag5);
1082-
return true;
1083-
}
10841002
real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
10851003
if (real_name == NULL) {
10861004
return false;
@@ -1094,11 +1012,6 @@ bool Arguments::parse_argument(const char* arg, JVMFlagOrigin origin) {
10941012
const char* value = strchr(arg, '=') + 1;
10951013

10961014
// this scanf pattern matches both strings (handled here) and numbers (handled later))
1097-
AliasedLoggingFlag alf = catch_logging_aliases(name, true);
1098-
if (alf.alias_name != NULL) {
1099-
LogConfiguration::configure_stdout(alf.level, alf.exactMatch, alf.tag0, alf.tag1, alf.tag2, alf.tag3, alf.tag4, alf.tag5);
1100-
return true;
1101-
}
11021015
real_name = handle_aliases_and_deprecation(name, warn_if_deprecated);
11031016
if (real_name == NULL) {
11041017
return false;
@@ -1297,17 +1210,6 @@ bool Arguments::process_argument(const char* arg,
12971210
warning("Ignoring option %s; support was removed in %s", stripped_argname, version);
12981211
return true;
12991212
}
1300-
#ifndef PRODUCT
1301-
else {
1302-
const char* replacement;
1303-
if ((replacement = removed_develop_logging_flag_name(stripped_argname)) != NULL){
1304-
log_warning(arguments)("%s has been removed. Please use %s instead.",
1305-
stripped_argname,
1306-
replacement);
1307-
return false;
1308-
}
1309-
}
1310-
#endif //PRODUCT
13111213
}
13121214

13131215
// For locked flags, report a custom error message if available.

‎src/hotspot/share/runtime/arguments.hpp

-18
Original file line numberDiff line numberDiff line change
@@ -226,19 +226,6 @@ class AgentLibraryList {
226226
// Helper class for controlling the lifetime of JavaVMInitArgs objects.
227227
class ScopedVMInitArgs;
228228

229-
// Most logging functions require 5 tags. Some of them may be _NO_TAG.
230-
typedef struct {
231-
const char* alias_name;
232-
LogLevelType level;
233-
bool exactMatch;
234-
LogTagType tag0;
235-
LogTagType tag1;
236-
LogTagType tag2;
237-
LogTagType tag3;
238-
LogTagType tag4;
239-
LogTagType tag5;
240-
} AliasedLoggingFlag;
241-
242229
class Arguments : AllStatic {
243230
friend class VMStructs;
244231
friend class JvmtiExport;
@@ -460,10 +447,6 @@ class Arguments : AllStatic {
460447
// the version number when the flag became obsolete.
461448
static bool is_obsolete_flag(const char* flag_name, JDK_Version* version);
462449

463-
#ifndef PRODUCT
464-
static const char* removed_develop_logging_flag_name(const char* name);
465-
#endif // PRODUCT
466-
467450
// Returns 1 if the flag is deprecated (and not yet obsolete or expired).
468451
// In this case the 'version' buffer is filled in with the version number when
469452
// the flag became deprecated.
@@ -477,7 +460,6 @@ class Arguments : AllStatic {
477460
// Return the "real" name for option arg if arg is an alias, and print a warning if arg is deprecated.
478461
// Return NULL if the arg has expired.
479462
static const char* handle_aliases_and_deprecation(const char* arg, bool warn);
480-
static AliasedLoggingFlag catch_logging_aliases(const char* name, bool on);
481463

482464
static char* SharedArchivePath;
483465
static char* SharedDynamicArchivePath;

‎src/hotspot/share/runtime/globals.hpp

-3
Original file line numberDiff line numberDiff line change
@@ -955,9 +955,6 @@ const intx ObjectAlignmentInBytes = 8;
955955
\
956956
/* JVMTI heap profiling */ \
957957
\
958-
product(bool, TraceJVMTIObjectTagging, false, DIAGNOSTIC, \
959-
"Trace JVMTI object tagging calls") \
960-
\
961958
product(bool, VerifyBeforeIteration, false, DIAGNOSTIC, \
962959
"Verify memory system before JVMTI iteration") \
963960
\

‎test/hotspot/jtreg/runtime/CommandLine/TraceExceptionsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/*
2525
* @test
2626
* @bug 8048933
27-
* @summary TraceExceptions output should have the exception message - useful for ClassNotFoundExceptions especially
27+
* @summary -Xlog:exceptions=info output should have the exception message - useful for ClassNotFoundExceptions especially
2828
* @library /test/lib
2929
* @modules java.base/jdk.internal.misc
3030
* java.management

‎test/hotspot/jtreg/runtime/cds/appcds/ClassPathAttr.java

-10
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,6 @@ static void testNormalOps() throws Exception {
8585
output.shouldMatch("checking shared classpath entry: .*cpattr2.jar");
8686
output.shouldMatch("checking shared classpath entry: .*cpattr3.jar");
8787
});
88-
89-
// Make sure aliased TraceClassPaths still works
90-
TestCommon.run(
91-
"-XX:+TraceClassPaths",
92-
"-cp", cp,
93-
"CpAttr1")
94-
.assertNormalExit(output -> {
95-
output.shouldMatch("checking shared classpath entry: .*cpattr2.jar");
96-
output.shouldMatch("checking shared classpath entry: .*cpattr3.jar");
97-
});
9888
}
9989
}
10090

‎test/hotspot/jtreg/runtime/cds/appcds/IgnoreEmptyClassPaths.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -46,13 +46,13 @@ public static void main(String[] args) throws Exception {
4646
String cp_exec = sep + jar1 + sep + sep + jar2 + sep;
4747

4848
TestCommon.testDump(cp_dump, TestCommon.list("Hello", "HelloMore"),
49-
"-XX:+TraceClassPaths", "-XX:+IgnoreEmptyClassPaths");
49+
"-Xlog:class+path=info", "-XX:+IgnoreEmptyClassPaths");
5050

5151
TestCommon.run(
5252
"-verbose:class",
5353
"-cp", cp_exec,
5454
"-XX:+IgnoreEmptyClassPaths", // should affect classpath even if placed after the "-cp" argument
55-
"-XX:+TraceClassPaths",
55+
"-Xlog:class+path=info",
5656
"HelloMore")
5757
.assertNormalExit();
5858
}

‎test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCDuringDump.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static void main(String[] args) throws Throwable {
7373
TestCommon.run(
7474
"-cp", appJar,
7575
"-Xmx32m",
76-
"-XX:+PrintSharedSpaces",
76+
"-Xlog:cds=info",
7777
"-XX:+UnlockDiagnosticVMOptions", extraOption,
7878
gcLog,
7979
Hello.class.getName())

‎test/hotspot/jtreg/runtime/cds/appcds/javaldr/GCSharedStringsDuringDump.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -112,7 +112,7 @@ public static void main(String[] args) throws Throwable {
112112
extraArg,
113113
"-Xlog:cds=info,class+path=info",
114114
"-Xmx32m",
115-
"-XX:+PrintSharedSpaces",
115+
"-Xlog:cds=info",
116116
"-XX:+UnlockDiagnosticVMOptions",
117117
extraOption,
118118
"-XX:+WhiteBoxAPI",

‎test/hotspot/jtreg/runtime/cds/appcds/javaldr/HumongousDuringDump.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static void main(String[] args) throws Throwable {
7575
"-cp", appJar,
7676
"-verbose",
7777
"-Xmx64m",
78-
"-XX:+PrintSharedSpaces",
78+
"-Xlog:cds=info",
7979
"-XX:+UnlockDiagnosticVMOptions", extraOption,
8080
gcLog,
8181
Hello.class.getName())

‎test/hotspot/jtreg/runtime/cds/appcds/jigsaw/classpathtests/BootAppendTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public static void testBootAppendClassWithAppCDS() throws Exception {
189189
OutputAnalyzer output = TestCommon.exec(
190190
appJar,
191191
"-Xbootclasspath/a:" + bootAppendJar,
192-
"-XX:+TraceClassLoading",
192+
"-Xlog:class+load=info",
193193
MAIN_CLASS,
194194
"Test #6", BOOT_APPEND_CLASS, "true", "BOOT");
195195
TestCommon.checkExec(output);

‎test/hotspot/jtreg/runtime/logging/BiasedLockingTest.java

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -54,23 +54,11 @@ public static void main(String[] args) throws Exception {
5454
InnerClass.class.getName());
5555
analyzeOutputOn(pb);
5656

57-
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseBiasedLocking",
58-
"-XX:+TraceBiasedLocking",
59-
"-XX:BiasedLockingStartupDelay=0",
60-
InnerClass.class.getName());
61-
analyzeOutputOn(pb);
62-
6357
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseBiasedLocking",
6458
"-Xlog:biasedlocking=off",
6559
"-XX:BiasedLockingStartupDelay=0",
6660
InnerClass.class.getName());
6761
analyzeOutputOff(pb);
68-
69-
pb = ProcessTools.createJavaProcessBuilder("-XX:+UseBiasedLocking",
70-
"-XX:-TraceBiasedLocking",
71-
"-XX:BiasedLockingStartupDelay=0",
72-
InnerClass.class.getName());
73-
analyzeOutputOff(pb);
7462
}
7563

7664
public static class InnerClass {

‎test/hotspot/jtreg/runtime/logging/ClassLoadUnloadTest.java

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -90,14 +90,6 @@ public static void main(String... args) throws Exception {
9090
pb = exec("-Xlog:class+unload=off");
9191
checkAbsent("[class,unload]");
9292

93-
// -XX:+TraceClassUnloading
94-
pb = exec("-XX:+TraceClassUnloading");
95-
checkFor("[class,unload]", "unloading class");
96-
97-
// -XX:-TraceClassUnloading
98-
pb = exec("-XX:-TraceClassUnloading");
99-
checkAbsent("[class,unload]");
100-
10193
// -Xlog:class+load=info
10294
pb = exec("-Xlog:class+load=info");
10395
checkFor("[class,load]", "java.lang.Object", "source:");
@@ -110,14 +102,6 @@ public static void main(String... args) throws Exception {
110102
pb = exec("-Xlog:class+load=off");
111103
checkAbsent("[class,load]");
112104

113-
// -XX:+TraceClassLoading
114-
pb = exec("-XX:+TraceClassLoading");
115-
checkFor("[class,load]", "java.lang.Object", "source:");
116-
117-
// -XX:-TraceClassLoading
118-
pb = exec("-XX:-TraceClassLoading");
119-
checkAbsent("[class,load]");
120-
121105
// -verbose:class
122106
pb = exec("-verbose:class");
123107
checkFor("[class,load]", "java.lang.Object", "source:");

‎test/hotspot/jtreg/runtime/logging/ClassResolutionTest.java

+1-15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -71,20 +71,6 @@ public static void main(String... args) throws Exception {
7171
ClassResolutionTestMain.class.getName());
7272
o = new OutputAnalyzer(pb.start());
7373
o.shouldNotContain("[class,resolve]");
74-
75-
// (3) TraceClassResolution should turn on.
76-
pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceClassResolution",
77-
ClassResolutionTestMain.class.getName());
78-
o = new OutputAnalyzer(pb.start());
79-
o.shouldContain("[class,resolve] ClassResolutionTest$ClassResolutionTestMain$Thing1Handler ClassResolutionTest$ClassResolutionTestMain$Thing1");
80-
81-
// (4) TraceClassResolution should turn off.
82-
pb = ProcessTools.createJavaProcessBuilder("-Xlog:class+resolve=debug",
83-
"-XX:-TraceClassResolution",
84-
ClassResolutionTestMain.class.getName());
85-
o = new OutputAnalyzer(pb.start());
86-
o.shouldNotContain("[class,resolve]");
87-
8874
};
8975

9076
}

‎test/hotspot/jtreg/runtime/logging/ExceptionsTest.java

+3-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -60,24 +60,16 @@ public static void main(String[] args) throws Exception {
6060
InternalClass.class.getName());
6161
analyzeOutputOn(pb);
6262

63-
pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceExceptions",
64-
InternalClass.class.getName());
65-
analyzeOutputOn(pb);
66-
6763
pb = ProcessTools.createJavaProcessBuilder("-Xlog:exceptions=off",
6864
InternalClass.class.getName());
6965
analyzeOutputOff(pb);
7066

71-
pb = ProcessTools.createJavaProcessBuilder("-XX:-TraceExceptions",
72-
InternalClass.class.getName());
73-
analyzeOutputOff(pb);
74-
7567
pb = ProcessTools.createJavaProcessBuilder(InternalClass.class.getName());
76-
updateEnvironment(pb, "_JAVA_OPTIONS", "-XX:+TraceExceptions");
68+
updateEnvironment(pb, "_JAVA_OPTIONS", "-Xlog:exceptions=info");
7769
analyzeOutputOn(pb);
7870

7971
pb = ProcessTools.createJavaProcessBuilder(InternalClass.class.getName());
80-
updateEnvironment(pb, "JAVA_TOOL_OPTIONS", "-Xlog:exceptions=info -XX:-TraceExceptions");
72+
updateEnvironment(pb, "JAVA_TOOL_OPTIONS", "-Xlog:exceptions=info -Xlog:exceptions=off");
8173
analyzeOutputOff(pb);
8274

8375
pb = ProcessTools.createJavaProcessBuilder("-XX:VMOptionsFile=" + System.getProperty("test.src", ".")
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-XX:+TraceExceptions
1+
-Xlog:exceptions=info

‎test/hotspot/jtreg/runtime/logging/LoaderConstraintsTest.java

+1-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -63,22 +63,11 @@ static ProcessBuilder exec(String... args) throws Exception {
6363

6464
public static void main(String... args) throws Exception {
6565

66-
// -XX:+TraceLoaderConstraints
67-
pb = exec("-XX:+TraceLoaderConstraints");
68-
out = new OutputAnalyzer(pb.start());
69-
out.getOutput();
70-
out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: 'app', loader[1]: 'bootstrap'");
71-
7266
// -Xlog:class+loader+constraints=info
7367
pb = exec("-Xlog:class+loader+constraints=info");
7468
out = new OutputAnalyzer(pb.start());
7569
out.shouldContain("[class,loader,constraints] adding new constraint for name: java/lang/Class, loader[0]: 'app', loader[1]: 'bootstrap'");
7670

77-
// -XX:-TraceLoaderConstraints
78-
pb = exec("-XX:-TraceLoaderConstraints");
79-
out = new OutputAnalyzer(pb.start());
80-
out.shouldNotContain("[class,loaderconstraints]");
81-
8271
// -Xlog:class+loader+constraints=off
8372
pb = exec("-Xlog:class+loader+constraints=off");
8473
out = new OutputAnalyzer(pb.start());

‎test/hotspot/jtreg/runtime/logging/MonitorInflationTest.java

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -54,17 +54,9 @@ public static void main(String[] args) throws Exception {
5454
InnerClass.class.getName());
5555
analyzeOutputOn(pb);
5656

57-
pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceMonitorInflation",
58-
InnerClass.class.getName());
59-
analyzeOutputOn(pb);
60-
6157
pb = ProcessTools.createJavaProcessBuilder("-Xlog:monitorinflation=off",
6258
InnerClass.class.getName());
6359
analyzeOutputOff(pb);
64-
65-
pb = ProcessTools.createJavaProcessBuilder("-XX:-TraceMonitorInflation",
66-
InnerClass.class.getName());
67-
analyzeOutputOff(pb);
6860
}
6961

7062
public static class Waiter {

‎test/hotspot/jtreg/runtime/logging/RemovedDevelopFlagsTest.java

-63
This file was deleted.

‎test/hotspot/jtreg/runtime/logging/SafepointCleanupTest.java

-8
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,9 @@ public static void main(String[] args) throws Exception {
5555
InnerClass.class.getName());
5656
analyzeOutputOn(pb);
5757

58-
pb = ProcessTools.createJavaProcessBuilder("-XX:+TraceSafepointCleanupTime",
59-
InnerClass.class.getName());
60-
analyzeOutputOn(pb);
61-
6258
pb = ProcessTools.createJavaProcessBuilder("-Xlog:safepoint+cleanup=off",
6359
InnerClass.class.getName());
6460
analyzeOutputOff(pb);
65-
66-
pb = ProcessTools.createJavaProcessBuilder("-XX:-TraceSafepointCleanupTime",
67-
InnerClass.class.getName());
68-
analyzeOutputOff(pb);
6961
}
7062

7163
public static class InnerClass {

‎test/jdk/com/sun/jdi/cds/CDSJDITest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,7 @@ public static void runTest(String testname, String[] jarClasses) throws Exceptio
6161
// pass them as JVM arguments to the debuggee process it creates.
6262
"-Xbootclasspath/a:" + appJar,
6363
"-XX:+UnlockDiagnosticVMOptions",
64-
"-XX:+TraceClassPaths",
64+
"-Xlog:class+path=info",
6565
"-XX:SharedArchiveFile=./SharedArchiveFile.jsa",
6666
"-Xshare:on",
6767
"-showversion"

0 commit comments

Comments
 (0)
Please sign in to comment.