Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/cpu/aarch32/vm/javaFrameAnchor_aarch32.hpp
32285 views
/*1* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2014, Red Hat Inc. All rights reserved.3* Copyright (c) 2015, Linaro Ltd. All rights reserved.4* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.5*6* This code is free software; you can redistribute it and/or modify it7* under the terms of the GNU General Public License version 2 only, as8* published by the Free Software Foundation.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*24*/2526#ifndef CPU_AARCH32_VM_JAVAFRAMEANCHOR_AARCH32_HPP27#define CPU_AARCH32_VM_JAVAFRAMEANCHOR_AARCH32_HPP2829private:3031// FP value associated with _last_Java_sp:32intptr_t* volatile _last_Java_fp; // pointer is volatile not what it points to3334public:35// Each arch must define reset, save, restore36// These are used by objects that only care about:37// 1 - initializing a new state (thread creation, javaCalls)38// 2 - saving a current state (javaCalls)39// 3 - restoring an old state (javaCalls)4041void clear(void) {42// clearing _last_Java_sp must be first43_last_Java_sp = NULL;44OrderAccess::release();45_last_Java_fp = NULL;46_last_Java_pc = NULL;47}4849void copy(JavaFrameAnchor* src) {50// In order to make sure the transition state is valid for "this"51// We must clear _last_Java_sp before copying the rest of the new data52//53// Hack Alert: Temporary bugfix for 4717480/472164754// To act like previous version (pd_cache_state) don't NULL _last_Java_sp55// unless the value is changing56//57if (_last_Java_sp != src->_last_Java_sp) {58_last_Java_sp = NULL;59OrderAccess::release();60}61_last_Java_fp = src->_last_Java_fp;62_last_Java_pc = src->_last_Java_pc;63// Must be last so profiler will always see valid frame if has_last_frame() is true64_last_Java_sp = src->_last_Java_sp;65}6667bool walkable(void) { return _last_Java_sp != NULL && _last_Java_pc != NULL; }68void make_walkable(JavaThread* thread);69void capture_last_Java_pc(void);7071intptr_t* last_Java_sp(void) const { return _last_Java_sp; }7273address last_Java_pc(void) { return _last_Java_pc; }7475private:7677static ByteSize last_Java_fp_offset() { return byte_offset_of(JavaFrameAnchor, _last_Java_fp); }7879public:8081void set_last_Java_sp(intptr_t* sp) { _last_Java_sp = sp; OrderAccess::release(); }8283intptr_t* last_Java_fp(void) { return _last_Java_fp; }84// Assert (last_Java_sp == NULL || fp == NULL)85void set_last_Java_fp(intptr_t* fp) { OrderAccess::release(); _last_Java_fp = fp; }8687#endif // CPU_AARCH32_VM_JAVAFRAMEANCHOR_AARCH32_HPP888990