Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/hotspot/jtreg/serviceability/tmtools/jstat/utils/JstatGcNewResults.java
41159 views
1
/*
2
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
*
5
* This code is free software; you can redistribute it and/or modify it
6
* under the terms of the GNU General Public License version 2 only, as
7
* published by the Free Software Foundation.
8
*
9
* This code is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12
* version 2 for more details (a copy is included in the LICENSE file that
13
* accompanied this code).
14
*
15
* You should have received a copy of the GNU General Public License version
16
* 2 along with this work; if not, write to the Free Software Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18
*
19
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*/
23
24
/*
25
* Results of running the JstatGcTool ("jstat -gcnew <pid>")
26
*
27
* Output example:
28
* S0C S1C S0U S1U TT MTT DSS EC EU YGC YGCT
29
* 0.0 2048.0 0.0 1113.5 15 15 1024.0 4096.0 0.0 4 0.228
30
*
31
* Output description:
32
* S0C Current survivor space 0 capacity (KB).
33
* S1C Current survivor space 1 capacity (KB).
34
* S0U Survivor space 0 utilization (KB).
35
* S1U Survivor space 1 utilization (KB).
36
* TT Tenuring threshold.
37
* MTT Maximum tenuring threshold.
38
* DSS Desired survivor size (KB).
39
* EC Current eden space capacity (KB).
40
* EU Eden space utilization (KB).
41
* YGC Number of young generation GC events.
42
* YGCT Young generation garbage collection time.
43
*/
44
package utils;
45
46
import common.ToolResults;
47
48
public class JstatGcNewResults extends JstatResults {
49
50
public JstatGcNewResults(ToolResults rawResults) {
51
super(rawResults);
52
}
53
54
/**
55
* Checks the overall consistency of the results reported by the tool
56
*/
57
@Override
58
public void assertConsistency() {
59
60
assertThat(getExitCode() == 0, "Unexpected exit code: " + getExitCode());
61
62
float S0C = getFloatValue("S0C");
63
float S0U = getFloatValue("S0U");
64
65
assertThat(S0U <= S0C, "S0U > S0C (utilization > capacity)");
66
67
float S1C = getFloatValue("S1C");
68
float S1U = getFloatValue("S1U");
69
70
assertThat(S1U <= S1C, "S1U > S1C (utilization > capacity)");
71
72
float EC = getFloatValue("EC");
73
float EU = getFloatValue("EU");
74
75
assertThat(EU <= EC, "EU > EC (utilization > capacity)");
76
77
int YGC = getIntValue("YGC");
78
float YGCT = getFloatValue("YGCT");
79
80
int TT = getIntValue("TT");
81
int MTT = getIntValue("MTT");
82
assertThat(TT <= MTT, "TT > MTT (tenuring threshold > maximum tenuring threshold)");
83
}
84
}
85
86