registerMap.hpp revision 1472
1472N/A * Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1472N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A// A companion structure used for stack traversal. The RegisterMap contains 0N/A// misc. information needed in order to do correct stack traversal of stack 0N/A// frames. Hence, it must always be passed in as an argument to 0N/A// frame::sender(RegisterMap*). 0N/A// 1) It provides access to the thread for which the stack belongs. The 0N/A// thread object is needed in order to get sender of a deoptimized frame. 0N/A// 2) It is used to pass information from a callee frame to its caller 0N/A// frame about how the frame should be traversed. This is used to let 0N/A// the caller frame take care of calling oops-do of out-going 0N/A// arguments, when the callee frame is not instantiated yet. This 0N/A// happens, e.g., when a compiled frame calls into 0N/A// resolve_virtual_call. (Hence, it is critical that the same 0N/A// RegisterMap object is used for the entire stack walk. Normally, 0N/A// this is hidden by using the StackFrameStream.) This is used when 0N/A// doing follow_oops and oops_do. 0N/A// 3) The RegisterMap keeps track of the values of callee-saved registers 0N/A// from frame to frame (hence, the name). For some stack traversal the 0N/A// values of the callee-saved registers does not matter, e.g., if you 0N/A// only need the static properies such as frame type, pc, and such. 0N/A// Updating of the RegisterMap can be turned off by instantiating the 0N/A// register map as: RegisterMap map(thread, false); 0N/A // updated when traversing the stack 0N/A // Called by an entry frame. 0N/A // the following contains the definition of pd_xxx methods