8000 Extend JPS re-implementation to J9 family by MattAlp · Pull Request #8813 · DataDog/dd-trace-java · GitHub
[go: up one dir, main page]

Skip to content

Extend JPS re-implementation to J9 family #8813

8000
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

Merged
merged 11 commits into from
May 13, 2025
Merged
Prev Previous commit
Next Next commit
Add a comment documenting how JVM processes are enumerated
Co-authored-by: Jaroslav Bachorik <jaroslav.bachorik@datadoghq.com>
  • Loading branch information
MattAlp and jbachorik authored May 12, 2025
commit 44ea4e64c997ced60e75fa6db5bbb8b6936762dd
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ public static Set<String> getJavaPids() {
// Some JDKs don't have jvmstat available as a module, attempt to read from the hsperfdata
// directory instead
try (Stream<Path> stream =
// Emulating the hotspot way to enumerate the JVM processes using the perfdata file
// https://github.com/openjdk/jdk/blob/d7cb933b89839b692f5562aeeb92076cd25a99f6/src/hotspot/share/runtime/perfMemory.cpp#L244
Files.list(Paths.get(getOSTempDir() + "/hsperfdata_" + System.getProperty("user.name")))) {
return stream
.filter(file -> !Files.isDirectory(file))
Expand Down
Loading
0