src/hotspot/share/prims/whitebox.cpp
changeset 47908 d6d00f785f39
parent 47881 0ce0ac68ace7
child 48105 8d15b1369c7a
--- a/src/hotspot/share/prims/whitebox.cpp	Thu Nov 16 18:34:33 2017 -0500
+++ b/src/hotspot/share/prims/whitebox.cpp	Thu Nov 16 19:01:01 2017 -0800
@@ -76,6 +76,7 @@
 
 #ifdef LINUX
 #include "utilities/elfFile.hpp"
+#include "osContainer_linux.hpp"
 #endif
 
 #define SIZE_T_MAX_VALUE ((size_t) -1)
@@ -1879,6 +1880,16 @@
   return ret;
 WB_END
 
+WB_ENTRY(jboolean, WB_IsContainerized(JNIEnv* env, jobject o))
+  LINUX_ONLY(return OSContainer::is_containerized();)
+  return false;
+WB_END
+
+WB_ENTRY(void, WB_PrintOsInfo(JNIEnv* env, jobject o))
+  os::print_os_info(tty);
+WB_END
+
+
 #define CC (char*)
 
 static JNINativeMethod methods[] = {
@@ -2087,8 +2098,11 @@
                                                       (void*)&WB_RequestConcurrentGCPhase},
   {CC"checkLibSpecifiesNoexecstack", CC"(Ljava/lang/String;)Z",
                                                       (void*)&WB_CheckLibSpecifiesNoexecstack},
+  {CC"isContainerized",           CC"()Z",            (void*)&WB_IsContainerized },
+  {CC"printOsInfo",               CC"()V",            (void*)&WB_PrintOsInfo },
 };
 
+
 #undef CC
 
 JVM_ENTRY(void, JVM_RegisterWhiteBoxMethods(JNIEnv* env, jclass wbclass))