< prev index next >

src/hotspot/share/aot/aotCodeHeap.cpp

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  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.hpp"
  28 #include "ci/ciUtilities.hpp"
  29 #include "classfile/javaAssertions.hpp"
  30 #include "gc/shared/cardTable.hpp"
  31 #include "gc/shared/cardTableModRefBS.hpp"
  32 #include "gc/g1/heapRegion.hpp"
  33 #include "gc/shared/gcLocker.hpp"
  34 #include "interpreter/abstractInterpreter.hpp"
  35 #include "jvmci/compilerRuntime.hpp"
  36 #include "jvmci/jvmciRuntime.hpp"
  37 #include "memory/allocation.inline.hpp"
  38 #include "oops/method.inline.hpp"

  39 #include "runtime/os.hpp"
  40 #include "runtime/sharedRuntime.hpp"
  41 #include "runtime/vm_operations.hpp"
  42 
  43 bool AOTLib::_narrow_oop_shift_initialized = false;
  44 int  AOTLib::_narrow_oop_shift = 0;
  45 int  AOTLib::_narrow_klass_shift = 0;
  46 
  47 address AOTLib::load_symbol(const char *name) {
  48   address symbol = (address) os::dll_lookup(_dl_handle, name);
  49   if (symbol == NULL) {
  50     tty->print_cr("Shared file %s error: missing %s", _name, name);
  51     vm_exit(1);
  52   }
  53   return symbol;
  54 }
  55 
  56 Klass* AOTCodeHeap::get_klass_from_got(const char* klass_name, int klass_len, const Method* method) {
  57   AOTKlassData* klass_data = (AOTKlassData*)_lib->load_symbol(klass_name);
  58   Klass* k = (Klass*)_klasses_got[klass_data->_got_index];




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  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.hpp"
  28 #include "ci/ciUtilities.inline.hpp"
  29 #include "classfile/javaAssertions.hpp"
  30 #include "gc/shared/cardTable.hpp"
  31 #include "gc/shared/cardTableModRefBS.hpp"
  32 #include "gc/g1/heapRegion.hpp"
  33 #include "gc/shared/gcLocker.hpp"
  34 #include "interpreter/abstractInterpreter.hpp"
  35 #include "jvmci/compilerRuntime.hpp"
  36 #include "jvmci/jvmciRuntime.hpp"
  37 #include "memory/allocation.inline.hpp"
  38 #include "oops/method.inline.hpp"
  39 #include "runtime/handles.inline.hpp"
  40 #include "runtime/os.hpp"
  41 #include "runtime/sharedRuntime.hpp"
  42 #include "runtime/vm_operations.hpp"
  43 
  44 bool AOTLib::_narrow_oop_shift_initialized = false;
  45 int  AOTLib::_narrow_oop_shift = 0;
  46 int  AOTLib::_narrow_klass_shift = 0;
  47 
  48 address AOTLib::load_symbol(const char *name) {
  49   address symbol = (address) os::dll_lookup(_dl_handle, name);
  50   if (symbol == NULL) {
  51     tty->print_cr("Shared file %s error: missing %s", _name, name);
  52     vm_exit(1);
  53   }
  54   return symbol;
  55 }
  56 
  57 Klass* AOTCodeHeap::get_klass_from_got(const char* klass_name, int klass_len, const Method* method) {
  58   AOTKlassData* klass_data = (AOTKlassData*)_lib->load_symbol(klass_name);
  59   Klass* k = (Klass*)_klasses_got[klass_data->_got_index];


< prev index next >