8384505: Account for all jtreg-based frames in stack walk test

Reviewed-by: dfuchs, alanb
This commit is contained in:
Christian Stein 2026-05-13 13:37:15 +00:00
parent 666b94df62
commit 759dce180b

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -56,11 +56,11 @@ public class StackWalkTest {
static final Set<String> infrastructureClasses = new TreeSet<>(Arrays.asList(
"jdk.internal.reflect.DirectMethodHandleAccessor",
"java.lang.reflect.Method",
"com.sun.javatest.regtest.MainWrapper$MainThread",
"com.sun.javatest.regtest.agent.MainWrapper$MainThread",
"com.sun.javatest.regtest.agent.MainWrapper$MainTask",
"java.lang.Thread"
));
static final List<String> infrastructurePackages = List.of(
"com.sun.javatest.regtest."
);
static final List<Class<?>> streamPipelines = Arrays.asList(
classForName("java.util.stream.AbstractPipeline"),
classForName("java.util.stream.TerminalOp")
@ -131,6 +131,12 @@ public class StackWalkTest {
// safe to ignore
return;
}
for (String prefix : infrastructurePackages) {
if (sf.getClassName().startsWith(prefix)) {
// safe to ignore
return;
}
}
}
try {
recorder.compareFrame(count, sf);