Skip to content

Commit

Permalink
Add jdk.internal.platform to built-in package natives
Browse files Browse the repository at this point in the history
Enables invocations to
`jdk.internal.platform.CgroupMetrics#getTotalSwapSize0` introduced by
JDK-8299858

Closes: oracle#6739
  • Loading branch information
zakkak committed Jun 6, 2023
1 parent 201d9f8 commit b430cb1
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2023, 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
Expand Down Expand Up @@ -98,6 +98,12 @@ protected PlatformNativeLibrarySupport() {
builtInPkgNatives = new ArrayList<>();
if (Platform.includedIn(InternalPlatform.PLATFORM_JNI.class)) {
builtInPkgNatives.addAll(Arrays.asList(defaultBuiltInPkgNatives));
/*
* Support builtin methods for Containers and Metrics internal API which is Linux only
*/
if (Platform.includedIn(Platform.LINUX.class)) {
builtInPkgNatives.add("jdk_internal_platform");
}
}
}

Expand Down

0 comments on commit b430cb1

Please sign in to comment.