Path: blob/master/src/hotspot/cpu/ppc/javaFrameAnchor_ppc.hpp
40930 views
/*1* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.2* Copyright (c) 2012, 2014 SAP SE. All rights reserved.3* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4*5* This code is free software; you can redistribute it and/or modify it6* under the terms of the GNU General Public License version 2 only, as7* published by the Free Software Foundation.8*9* This code is distributed in the hope that it will be useful, but WITHOUT10* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12* version 2 for more details (a copy is included in the LICENSE file that13* accompanied this code).14*15* You should have received a copy of the GNU General Public License version16* 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 USA20* or visit www.oracle.com if you need additional information or have any21* questions.22*23*/2425#ifndef CPU_PPC_JAVAFRAMEANCHOR_PPC_HPP26#define CPU_PPC_JAVAFRAMEANCHOR_PPC_HPP2728public:29// Each arch must define reset, save, restore30// These are used by objects that only care about:31// 1 - initializing a new state (thread creation, javaCalls)32// 2 - saving a current state (javaCalls)33// 3 - restoring an old state (javaCalls)3435inline void clear(void) {36// clearing _last_Java_sp must be first37_last_Java_sp = NULL;38// fence?39OrderAccess::release();40_last_Java_pc = NULL;41}4243inline void set(intptr_t* sp, address pc) {44_last_Java_pc = pc;45OrderAccess::release();46_last_Java_sp = sp;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 data.52//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 changing.56if (_last_Java_sp != src->_last_Java_sp) {57_last_Java_sp = NULL;58OrderAccess::release();59}60_last_Java_pc = src->_last_Java_pc;61// Must be last so profiler will always see valid frame if has_last_frame() is true.62OrderAccess::release();63_last_Java_sp = src->_last_Java_sp;64}6566// Always walkable.67bool walkable(void) { return true; }68// Never any thing to do since we are always walkable and can find address of return addresses.69void make_walkable(JavaThread* thread) { }7071intptr_t* last_Java_sp(void) const { return _last_Java_sp; }7273address last_Java_pc(void) { return _last_Java_pc; }7475void set_last_Java_sp(intptr_t* sp) { OrderAccess::release(); _last_Java_sp = sp; }7677#endif // CPU_PPC_JAVAFRAMEANCHOR_PPC_HPP787980