Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make 'sun.security.action' accessible to BTraceUtils class. #583

Merged
merged 1 commit into from
Oct 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions btrace-instr/src/test/btrace/OnMethodTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static void noargs(@Self Object self) {
dump(var + " [this, noargs]");
dump("{" + get("id", self) + "}");
var = "A";
println("prop: " + property("btrace.test"));
}

@OnMethod(clazz = "resources.Main", method = "callB")
Expand All @@ -64,6 +65,7 @@ public static void args(@Self Object self, int i, String s) {
ex--;
dump(var + " [this, args]");
var = "B";
println("prop: " + property("btrace.test"));
}

@OnTimer(500)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ public void validate(String stdout, String stderr, int retcode, String jfrFile)
assertTrue(stdout.contains("[this, args]"));
assertTrue(stdout.contains("{xxx}"));
assertTrue(stdout.contains("heap:init"));
assertTrue(stdout.contains("prop: test"));
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public void test(
jfrFile = Files.createTempFile("btrace-", ".jfr").toString();
args.add("-XX:StartFlightRecording=settings=default,dumponexit=true,filename=" + jfrFile);
}
args.add("-Dbtrace.test=test");
args.add(testApp);

ProcessBuilder pb = new ProcessBuilder(args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ private static Instrumentation fixExports(Instrumentation instr) {
Collections.emptySet(),
Map.of(
"jdk.internal.reflect", myModules,
"jdk.internal.perf", myModules),
"jdk.internal.perf", myModules,
"sun.security.action", myModules),
Map.of("java.lang", myModules),
Collections.emptySet(),
Collections.emptyMap());
Expand Down