Fixed allocation profiling on JDK 20.0.1

This commit is contained in:
Andrei Pangin
2023-05-03 23:56:38 +01:00
parent bdceedda58
commit 6dfd2159fe
2 changed files with 4 additions and 6 deletions
+3 -3
View File
@@ -119,11 +119,11 @@ bool VM::init(JavaVM* vm, bool attach) {
}
if (is_hotspot && _jvmti->GetSystemProperty("java.vm.version", &prop) == 0) {
if (strncmp(prop, "25.", 3) == 0) {
if (strncmp(prop, "25.", 3) == 0 && prop[3] > '0') {
_hotspot_version = 8;
} else if (strncmp(prop, "24.", 3) == 0) {
} else if (strncmp(prop, "24.", 3) == 0 && prop[3] > '0') {
_hotspot_version = 7;
} else if (strncmp(prop, "20.", 3) == 0) {
} else if (strncmp(prop, "20.", 3) == 0 && prop[3] > '0') {
_hotspot_version = 6;
} else if ((_hotspot_version = atoi(prop)) < 9) {
_hotspot_version = 9;