mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8148733
: G1: Add log message to print the heap region size
Reviewed-by: sjohanss, david
This commit is contained in:
parent
a5e2b096bc
commit
0e9273e8a7
2 changed files with 7 additions and 6 deletions
|
@ -143,6 +143,7 @@ void HeapRegion::setup_heap_region_size(size_t initial_heap_size, size_t max_hea
|
||||||
// The cast to int is safe, given that we've bounded region_size by
|
// The cast to int is safe, given that we've bounded region_size by
|
||||||
// MIN_REGION_SIZE and MAX_REGION_SIZE.
|
// MIN_REGION_SIZE and MAX_REGION_SIZE.
|
||||||
GrainBytes = region_size;
|
GrainBytes = region_size;
|
||||||
|
log_info(gc, heap)("Heap region size: " SIZE_FORMAT "M", GrainBytes / M);
|
||||||
|
|
||||||
guarantee(GrainWords == 0, "we should only set it once");
|
guarantee(GrainWords == 0, "we should only set it once");
|
||||||
GrainWords = GrainBytes >> LogHeapWordSize;
|
GrainWords = GrainBytes >> LogHeapWordSize;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class TestDeprecatedPrintFlags {
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldContain("-XX:+PrintGC is deprecated. Will use -Xlog:gc instead.");
|
output.shouldContain("-XX:+PrintGC is deprecated. Will use -Xlog:gc instead.");
|
||||||
output.shouldNotContain("PrintGCDetails");
|
output.shouldNotContain("PrintGCDetails");
|
||||||
output.stdoutShouldMatch("\\[info.*\\]\\[gc\\]");
|
output.stdoutShouldMatch("\\[info.*\\]\\[gc *\\]");
|
||||||
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\,");
|
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\,");
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
}
|
}
|
||||||
|
@ -55,7 +55,7 @@ public class TestDeprecatedPrintFlags {
|
||||||
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
OutputAnalyzer output = new OutputAnalyzer(pb.start());
|
||||||
output.shouldContain("-XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.");
|
output.shouldContain("-XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.");
|
||||||
output.shouldNotContain("PrintGC is deprecated");
|
output.shouldNotContain("PrintGC is deprecated");
|
||||||
output.stdoutShouldMatch("\\[info.*\\]\\[gc\\]");
|
output.stdoutShouldMatch("\\[info.*\\]\\[gc *\\]");
|
||||||
output.stdoutShouldMatch("\\[info.*\\]\\[gc\\,");
|
output.stdoutShouldMatch("\\[info.*\\]\\[gc\\,");
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
}
|
}
|
||||||
|
@ -67,13 +67,13 @@ public class TestDeprecatedPrintFlags {
|
||||||
output.shouldContain("-Xloggc is deprecated. Will use -Xlog:gc:gc-test.log instead.");
|
output.shouldContain("-Xloggc is deprecated. Will use -Xlog:gc:gc-test.log instead.");
|
||||||
output.shouldNotContain("PrintGCDetails");
|
output.shouldNotContain("PrintGCDetails");
|
||||||
output.shouldNotContain("PrintGC");
|
output.shouldNotContain("PrintGC");
|
||||||
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\]");
|
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc *\\]");
|
||||||
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\,");
|
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\,");
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
String lines = Files.lines(Paths.get(fileName)).collect(Collectors.joining());
|
String lines = Files.lines(Paths.get(fileName)).collect(Collectors.joining());
|
||||||
System.out.println("lines: " + lines);
|
System.out.println("lines: " + lines);
|
||||||
OutputAnalyzer outputLog = new OutputAnalyzer(lines, "");
|
OutputAnalyzer outputLog = new OutputAnalyzer(lines, "");
|
||||||
outputLog.stdoutShouldMatch("\\[info.*\\]\\[gc\\]");
|
outputLog.stdoutShouldMatch("\\[info.*\\]\\[gc *\\]");
|
||||||
outputLog.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\,");
|
outputLog.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\,");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,12 +84,12 @@ public class TestDeprecatedPrintFlags {
|
||||||
output.shouldContain("-XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.");
|
output.shouldContain("-XX:+PrintGCDetails is deprecated. Will use -Xlog:gc* instead.");
|
||||||
output.shouldContain("-Xloggc is deprecated. Will use -Xlog:gc:gc-test.log instead.");
|
output.shouldContain("-Xloggc is deprecated. Will use -Xlog:gc:gc-test.log instead.");
|
||||||
output.shouldNotContain("PrintGC is deprecated");
|
output.shouldNotContain("PrintGC is deprecated");
|
||||||
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\]");
|
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc *\\]");
|
||||||
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\,");
|
output.stdoutShouldNotMatch("\\[info.*\\]\\[gc\\,");
|
||||||
output.shouldHaveExitValue(0);
|
output.shouldHaveExitValue(0);
|
||||||
String lines = Files.lines(Paths.get(fileName)).collect(Collectors.joining());
|
String lines = Files.lines(Paths.get(fileName)).collect(Collectors.joining());
|
||||||
OutputAnalyzer outputLog = new OutputAnalyzer(lines, "");
|
OutputAnalyzer outputLog = new OutputAnalyzer(lines, "");
|
||||||
outputLog.stdoutShouldMatch("\\[info.*\\]\\[gc\\]");
|
outputLog.stdoutShouldMatch("\\[info.*\\]\\[gc *\\]");
|
||||||
outputLog.stdoutShouldMatch("\\[info.*\\]\\[gc\\,");
|
outputLog.stdoutShouldMatch("\\[info.*\\]\\[gc\\,");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue