oopMap.cpp revision 25
0N/A * Copyright 1998-2007 Sun Microsystems, Inc. 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. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 0N/A#
include "incls/_precompiled.incl" 0N/A// frame_size units are stack-slots (4 bytes) NOT intptr_t; we can name odd 0N/A// slots to hold 4-byte values like ints and floats in the LP64 build. 0N/A // OopMaps are usually quite so small, so pick a small initial size 0N/A // This constructor does a deep copy 0N/A // of the source OopMap. 0N/A // We need to copy the entries too. 0N/A // Align to a reasonable ending point 0N/A// frame_size units are stack-slots (4 bytes) NOT intptr_t; we can name odd 0N/A// slots to hold 4-byte values like ints and floats in the LP64 build. 0N/A // This can never be a stack location, so we don't need to transform it. 0N/A // At this time, we only need value entries in our OopMap when ZapDeadCompiledLocals is active. 0N/A // At this time, we only need dead entries in our OopMap when ZapDeadCompiledLocals is active. 0N/A // Actually an oop, derived shares storage with base, 0N/A // Do the needed fixups to the new OopMapSet 0N/A // Allow enough space for the OopMap pointers 0N/A // This "locks" the OopMapSet 0N/A // Now add in the space needed for the indivdiual OopMaps 0N/A // We don't need to align this, it will be naturally pointer aligned 0N/A // Scan through oopmaps. Stop when current offset is either equal or greater 0N/A // than the one we are looking for. 0N/A // Print oopmap and regmap 0N/A // native wrappers have no scope data, it is implied 0N/A // add derived oops to a table 0N/A // handle derived pointers first (otherwise base pointer may be 0N/A // changed before derived pointer offset has been collected) 0N/A // Protect the operation on the derived pointers. This 0N/A // protects the addition of derived pointers to the shared 0N/A // derived pointer table in DerivedPointerTable::add(). 0N/A // We want dead, value and oop oop_types 0N/A // try to dump out some helpful debugging information 0N/A // do the real assert. 0N/A// Update callee-saved register info for the following frame 0N/A // Any reg might be saved by a safepoint handler (see generate_handler_blob). 0N/A "already updated this map; do not 'update' it twice!" );
0N/A // Check if caller must update oop argument 0N/A "include_argument_oops should already be set");
0N/A // ("+1" because max_saved_on_entry_reg_count might be zero) 0N/A // Scan through oopmap and find location of all callee-saved registers 0N/A // (we do not do update in place, since info could be overwritten) 0N/A // Check that runtime stubs save all callee-saved registers 0N/A // Copy found callee-saved register to reg_map 0N/A//============================================================================= 0N/A//------------------------------DerivedPointerTable--------------------------- 0N/A // The first time, we create the list. Otherwise it should be 0N/A // empty. If not, then we have probably forgotton to call 0N/A// Returns value of location as an int 0N/A // Set derived oop location to point to base. 0N/A // The derived oop was setup to point to location of base 0N/A // Clear list, so it is ready for next traversal (this is an invariant)