< prev index next >

src/share/vm/aot/aotLoader.cpp

Print this page
rev 13107 : imported patch jvm_h


  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  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 
  26 #include "aot/aotCodeHeap.hpp"
  27 #include "aot/aotLoader.inline.hpp"
  28 #include "jvmci/jvmciRuntime.hpp"
  29 #include "oops/method.hpp"

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




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  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 
  26 #include "aot/aotCodeHeap.hpp"
  27 #include "aot/aotLoader.inline.hpp"
  28 #include "jvmci/jvmciRuntime.hpp"
  29 #include "oops/method.hpp"
  30 #include "prims/jvm.h"
  31 #include "runtime/os.hpp"
  32 
  33 GrowableArray<AOTCodeHeap*>* AOTLoader::_heaps = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTCodeHeap*> (2, true);
  34 GrowableArray<AOTLib*>* AOTLoader::_libraries = new(ResourceObj::C_HEAP, mtCode) GrowableArray<AOTLib*> (2, true);
  35 
  36 // Iterate over all AOT CodeHeaps
  37 #define FOR_ALL_AOT_HEAPS(heap) for (GrowableArrayIterator<AOTCodeHeap*> heap = heaps()->begin(); heap != heaps()->end(); ++heap)
  38 // Iterate over all AOT Libraries
  39 #define FOR_ALL_AOT_LIBRARIES(lib) for (GrowableArrayIterator<AOTLib*> lib = libraries()->begin(); lib != libraries()->end(); ++lib)
  40 
  41 void AOTLoader::load_for_klass(InstanceKlass* ik, Thread* thread) {
  42   if (UseAOT) {
  43     FOR_ALL_AOT_HEAPS(heap) {
  44       (*heap)->load_klass_data(ik, thread);
  45     }
  46   }
  47 }
  48 
  49 uint64_t AOTLoader::get_saved_fingerprint(InstanceKlass* ik) {
  50   FOR_ALL_AOT_HEAPS(heap) {


< prev index next >