< prev index next >

src/hotspot/os_cpu/linux_arm/thread_linux_arm.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 
  25 #include "precompiled.hpp"
  26 #include "gc/shared/barrierSet.inline.hpp"
  27 #include "gc/shared/cardTable.hpp"
  28 #include "gc/shared/cardTableBarrierSet.inline.hpp"
  29 #include "gc/shared/collectedHeap.hpp"
  30 #include "memory/metaspaceShared.hpp"
  31 #include "runtime/frame.inline.hpp"
  32 















  33 void JavaThread::cache_global_variables() {
  34   BarrierSet* bs = Universe::heap()->barrier_set();
  35 
  36   const bool allow_shared_alloc =
  37     Universe::heap()->supports_inline_contig_alloc();
  38 
  39   if (allow_shared_alloc) {
  40     _heap_top_addr = (address) Universe::heap()->top_addr();
  41   } else {
  42     _heap_top_addr = NULL;
  43   }
  44 
  45   if (bs->is_a(BarrierSet::CardTableBarrierSet)) {
  46     _card_table_base = (address) (barrier_set_cast<CardTableBarrierSet>(bs)->card_table()->byte_map_base());
  47   } else {
  48     _card_table_base = NULL;
  49   }
  50 
  51 }
  52 




  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 
  25 #include "precompiled.hpp"
  26 #include "gc/shared/barrierSet.inline.hpp"
  27 #include "gc/shared/cardTable.hpp"
  28 #include "gc/shared/cardTableBarrierSet.inline.hpp"
  29 #include "gc/shared/collectedHeap.hpp"
  30 #include "memory/metaspaceShared.hpp"
  31 #include "runtime/frame.inline.hpp"
  32 
  33 frame JavaThread::pd_last_frame() {
  34   assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
  35 #ifdef AARCH64
  36   assert (_anchor.last_Java_pc() != NULL, "pc should be stored");
  37   return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
  38 #else
  39   if (_anchor.last_Java_pc() != NULL) {
  40     return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
  41   } else {
  42     // This will pick up pc from sp
  43     return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
  44   }
  45 #endif // AARCH64
  46 }
  47 
  48 void JavaThread::cache_global_variables() {
  49   BarrierSet* bs = Universe::heap()->barrier_set();
  50 
  51   const bool allow_shared_alloc =
  52     Universe::heap()->supports_inline_contig_alloc();
  53 
  54   if (allow_shared_alloc) {
  55     _heap_top_addr = (address) Universe::heap()->top_addr();
  56   } else {
  57     _heap_top_addr = NULL;
  58   }
  59 
  60   if (bs->is_a(BarrierSet::CardTableBarrierSet)) {
  61     _card_table_base = (address) (barrier_set_cast<CardTableBarrierSet>(bs)->card_table()->byte_map_base());
  62   } else {
  63     _card_table_base = NULL;
  64   }
  65 
  66 }
  67 


< prev index next >