src/hotspot/share/prims/whitebox.cpp
changeset 53494 8fd43dacaef7
parent 53118 93a5f4b4c67d
child 53582 881c5fbeb849
equal deleted inserted replaced
53493:376f0e4e6fba 53494:8fd43dacaef7
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    91 #if INCLUDE_NMT
    91 #if INCLUDE_NMT
    92 #include "services/mallocSiteTable.hpp"
    92 #include "services/mallocSiteTable.hpp"
    93 #include "services/memTracker.hpp"
    93 #include "services/memTracker.hpp"
    94 #include "utilities/nativeCallStack.hpp"
    94 #include "utilities/nativeCallStack.hpp"
    95 #endif // INCLUDE_NMT
    95 #endif // INCLUDE_NMT
       
    96 #if INCLUDE_AOT
       
    97 #include "aot/aotLoader.hpp"
       
    98 #endif // INCLUDE_AOT
    96 
    99 
    97 #ifdef LINUX
   100 #ifdef LINUX
    98 #include "osContainer_linux.hpp"
   101 #include "osContainer_linux.hpp"
    99 #endif
   102 #endif
   100 
   103 
  2114   return (jint) ResolvedMethodTable::removed_entries_count();
  2117   return (jint) ResolvedMethodTable::removed_entries_count();
  2115 WB_END
  2118 WB_END
  2116 
  2119 
  2117 WB_ENTRY(jint, WB_ProtectionDomainRemovedCount(JNIEnv* env, jobject o))
  2120 WB_ENTRY(jint, WB_ProtectionDomainRemovedCount(JNIEnv* env, jobject o))
  2118   return (jint) SystemDictionary::pd_cache_table()->removed_entries_count();
  2121   return (jint) SystemDictionary::pd_cache_table()->removed_entries_count();
       
  2122 WB_END
       
  2123 
       
  2124 WB_ENTRY(jint, WB_AotLibrariesCount(JNIEnv* env, jobject o))
       
  2125   jint result = 0;
       
  2126 #if INCLUDE_AOT
       
  2127   result = (jint) AOTLoader::heaps_count();
       
  2128 #endif
       
  2129   return result;
  2119 WB_END
  2130 WB_END
  2120 
  2131 
  2121 #define CC (char*)
  2132 #define CC (char*)
  2122 
  2133 
  2123 static JNINativeMethod methods[] = {
  2134 static JNINativeMethod methods[] = {
  2348   {CC"isContainerized",           CC"()Z",            (void*)&WB_IsContainerized },
  2359   {CC"isContainerized",           CC"()Z",            (void*)&WB_IsContainerized },
  2349   {CC"printOsInfo",               CC"()V",            (void*)&WB_PrintOsInfo },
  2360   {CC"printOsInfo",               CC"()V",            (void*)&WB_PrintOsInfo },
  2350   {CC"disableElfSectionCache",    CC"()V",            (void*)&WB_DisableElfSectionCache },
  2361   {CC"disableElfSectionCache",    CC"()V",            (void*)&WB_DisableElfSectionCache },
  2351   {CC"resolvedMethodRemovedCount",     CC"()I",       (void*)&WB_ResolvedMethodRemovedCount },
  2362   {CC"resolvedMethodRemovedCount",     CC"()I",       (void*)&WB_ResolvedMethodRemovedCount },
  2352   {CC"protectionDomainRemovedCount",   CC"()I",       (void*)&WB_ProtectionDomainRemovedCount },
  2363   {CC"protectionDomainRemovedCount",   CC"()I",       (void*)&WB_ProtectionDomainRemovedCount },
       
  2364   {CC"aotLibrariesCount", CC"()I",                    (void*)&WB_AotLibrariesCount },
  2353 };
  2365 };
  2354 
  2366 
  2355 
  2367 
  2356 #undef CC
  2368 #undef CC
  2357 
  2369