mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-12 14:39:49 +00:00
8258682: compiler/intrinsics/mathexact/sanity tests fail with RepeatCompilation
Normalize match and suspect counts in the verify() method by the number of compilation repetitions, if the RepeatCompilation option is used. Reviewed-by: kvn, chagedorn
This commit is contained in:
parent
1594372c28
commit
3df6ec2fbc
@ -26,6 +26,8 @@ package compiler.testlibrary.intrinsics;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileReader;
|
||||
import java.util.Properties;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class Verifier {
|
||||
enum VerificationStrategy {
|
||||
@ -120,10 +122,18 @@ public class Verifier {
|
||||
String prefix = "<intrinsic id='";
|
||||
String prefixWithId = prefix + intrinsicId + "'";
|
||||
|
||||
int repeatCnt = 1;
|
||||
Pattern repeatComp = Pattern.compile("-XX:RepeatCompilation=(\\d+)*");
|
||||
try (BufferedReader compLogReader
|
||||
= new BufferedReader(new FileReader(hsLogFile))) {
|
||||
String logLine;
|
||||
while ((logLine = compLogReader.readLine()) != null) {
|
||||
// Check if compilations are repeated. If so, normalize the
|
||||
// match and suspect counts.
|
||||
Matcher m = repeatComp.matcher(logLine);
|
||||
if (m.find()) {
|
||||
repeatCnt = Integer.parseInt(m.group(1)) + 1;
|
||||
}
|
||||
if (logLine.startsWith(prefix)) {
|
||||
if (logLine.startsWith(prefixWithId)) {
|
||||
fullMatchCnt++;
|
||||
@ -135,6 +145,8 @@ public class Verifier {
|
||||
}
|
||||
}
|
||||
}
|
||||
fullMatchCnt /= repeatCnt;
|
||||
suspectCnt /= repeatCnt;
|
||||
|
||||
VerificationStrategy strategy = VerificationStrategy.valueOf(
|
||||
System.getProperty("verificationStrategy",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user