< prev index next >

src/hotspot/share/aot/aotLoader.cpp

Print this page




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #include "precompiled.hpp"
  25 #include "aot/aotCodeHeap.hpp"
  26 #include "aot/aotLoader.inline.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "jvm.h"
  29 #include "memory/allocation.inline.hpp"
  30 #include "memory/resourceArea.hpp"
  31 #include "oops/compressedOops.hpp"
  32 #include "oops/method.hpp"

  33 #include "runtime/handles.inline.hpp"
  34 #include "runtime/os.inline.hpp"
  35 #include "runtime/timerTrace.hpp"
  36 
  37 GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true);
  38 GrowableArray<AOTLib*>* AOTLoader::_libraries = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTLib*> (2, true);
  39 
  40 // Iterate over all AOT CodeHeaps
  41 #define FOR_ALL_AOT_HEAPS(heap) for (GrowableArrayIterator<AOTCodeHeap*> heap = heaps()->begin(); heap != heaps()->end(); ++heap)
  42 // Iterate over all AOT Libraries
  43 #define FOR_ALL_AOT_LIBRARIES(lib) for (GrowableArrayIterator<AOTLib*> lib = libraries()->begin(); lib != libraries()->end(); ++lib)
  44 
  45 void AOTLoader::load_for_klass(InstanceKlass* ik, Thread* thread) {
  46   if (ik->is_unsafe_anonymous()) {
  47     // don't even bother
  48     return;
  49   }
  50   if (UseAOT) {
  51     // We allow hotswap to be enabled after the onload phase, but not breakpoints
  52     assert(!JvmtiExport::can_post_breakpoint(), "AOT should have been disabled.");




  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 #include "precompiled.hpp"
  25 #include "aot/aotCodeHeap.hpp"
  26 #include "aot/aotLoader.inline.hpp"
  27 #include "classfile/javaClasses.hpp"
  28 #include "jvm.h"
  29 #include "memory/allocation.inline.hpp"
  30 #include "memory/resourceArea.hpp"
  31 #include "oops/compressedOops.hpp"
  32 #include "oops/method.hpp"
  33 #include "runtime/frame.inline.hpp"
  34 #include "runtime/handles.inline.hpp"
  35 #include "runtime/os.inline.hpp"
  36 #include "runtime/timerTrace.hpp"
  37 
  38 GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true);
  39 GrowableArray<AOTLib*>* AOTLoader::_libraries = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTLib*> (2, true);
  40 
  41 // Iterate over all AOT CodeHeaps
  42 #define FOR_ALL_AOT_HEAPS(heap) for (GrowableArrayIterator<AOTCodeHeap*> heap = heaps()->begin(); heap != heaps()->end(); ++heap)
  43 // Iterate over all AOT Libraries
  44 #define FOR_ALL_AOT_LIBRARIES(lib) for (GrowableArrayIterator<AOTLib*> lib = libraries()->begin(); lib != libraries()->end(); ++lib)
  45 
  46 void AOTLoader::load_for_klass(InstanceKlass* ik, Thread* thread) {
  47   if (ik->is_unsafe_anonymous()) {
  48     // don't even bother
  49     return;
  50   }
  51   if (UseAOT) {
  52     // We allow hotswap to be enabled after the onload phase, but not breakpoints
  53     assert(!JvmtiExport::can_post_breakpoint(), "AOT should have been disabled.");


< prev index next >