< prev index next >

src/hotspot/share/aot/aotLoader.cpp

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  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 "jvm.h"
  26 
  27 #include "aot/aotCodeHeap.hpp"
  28 #include "aot/aotLoader.inline.hpp"
  29 #include "jvmci/jvmciRuntime.hpp"
  30 #include "memory/allocation.inline.hpp"
  31 #include "oops/method.hpp"

  32 #include "runtime/os.hpp"
  33 #include "runtime/timerTrace.hpp"
  34 
  35 GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true);
  36 GrowableArray<AOTLib*>* AOTLoader::_libraries = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTLib*> (2, true);
  37 
  38 // Iterate over all AOT CodeHeaps
  39 #define FOR_ALL_AOT_HEAPS(heap) for (GrowableArrayIterator<AOTCodeHeap*> heap = heaps()->begin(); heap != heaps()->end(); ++heap)
  40 // Iterate over all AOT Libraries
  41 #define FOR_ALL_AOT_LIBRARIES(lib) for (GrowableArrayIterator<AOTLib*> lib = libraries()->begin(); lib != libraries()->end(); ++lib)
  42 
  43 void AOTLoader::load_for_klass(InstanceKlass* ik, Thread* thread) {
  44   if (ik->is_anonymous()) {
  45     // don't even bother
  46     return;
  47   }
  48   if (UseAOT) {
  49     FOR_ALL_AOT_HEAPS(heap) {
  50       (*heap)->load_klass_data(ik, thread);
  51     }




  12  * version 2 for more details (a copy is included in the LICENSE file that
  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 "jvm.h"
  26 
  27 #include "aot/aotCodeHeap.hpp"
  28 #include "aot/aotLoader.inline.hpp"
  29 #include "jvmci/jvmciRuntime.hpp"
  30 #include "memory/allocation.inline.hpp"
  31 #include "oops/method.hpp"
  32 #include "runtime/handles.inline.hpp"
  33 #include "runtime/os.hpp"
  34 #include "runtime/timerTrace.hpp"
  35 
  36 GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true);
  37 GrowableArray<AOTLib*>* AOTLoader::_libraries = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTLib*> (2, true);
  38 
  39 // Iterate over all AOT CodeHeaps
  40 #define FOR_ALL_AOT_HEAPS(heap) for (GrowableArrayIterator<AOTCodeHeap*> heap = heaps()->begin(); heap != heaps()->end(); ++heap)
  41 // Iterate over all AOT Libraries
  42 #define FOR_ALL_AOT_LIBRARIES(lib) for (GrowableArrayIterator<AOTLib*> lib = libraries()->begin(); lib != libraries()->end(); ++lib)
  43 
  44 void AOTLoader::load_for_klass(InstanceKlass* ik, Thread* thread) {
  45   if (ik->is_anonymous()) {
  46     // don't even bother
  47     return;
  48   }
  49   if (UseAOT) {
  50     FOR_ALL_AOT_HEAPS(heap) {
  51       (*heap)->load_klass_data(ik, thread);
  52     }


< prev index next >