/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "code/codeBlob.hpp"
#include "code/codeCache.hpp"
#include "code/nmethod.hpp"
#include "code/scopeDesc.hpp"
#include "compiler/oopMap.hpp"
#include "gc_interface/collectedHeap.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/signature.hpp"
#ifdef COMPILER1
#include "c1/c1_Defs.hpp"
#endif
// OopMapStream
} else {
}
_position = 0;
_valid_omv = false;
}
} else {
}
_position = 0;
_valid_omv = false;
}
_valid_omv = true;
return;
}
}
_valid_omv = false;
}
// OopMap
// frame_size units are stack-slots (4 bytes) NOT intptr_t; we can name odd
// slots to hold 4-byte values like ints and floats in the LP64 build.
// OopMaps are usually quite so small, so pick a small initial size
set_omv_count(0);
#ifdef ASSERT
#endif
}
// This constructor does a deep copy
// of the source OopMap.
set_omv_count(0);
#ifdef ASSERT
#endif
// We need to copy the entries too.
}
}
return new OopMap(_deep_copy_token, this);
}
}
if(write_stream() != NULL) {
} else {
size += omv_data_size();
}
// Align to a reasonable ending point
return size;
}
// frame_size units are stack-slots (4 bytes) NOT intptr_t; we can name odd
// slots to hold 4-byte values like ints and floats in the LP64 build.
OopMapValue o(reg, x);
if(x == OopMapValue::callee_saved_value) {
// This can never be a stack location, so we don't need to transform it.
} else if(x == OopMapValue::derived_oop_value) {
}
o.write_on(write_stream());
}
}
// At this time, we only need value entries in our OopMap when ZapDeadCompiledLocals is active.
}
}
}
if( reg == derived_from_local_register ) {
// Actually an oop, derived shares storage with base,
} else {
}
}
// OopMapSet
set_om_count(0);
}
}
// Copy this
// Do the needed fixups to the new OopMapSet
// Allow enough space for the OopMap pointers
for(int i=0; i < om_count(); i++) {
}
// This "locks" the OopMapSet
}
grow_om_data();
}
#ifdef ASSERT
if(om_count() > 0) {
fatal("OopMap inserted twice");
}
}
}
#endif // ASSERT
}
// The space we use
// Now add in the space needed for the indivdiual OopMaps
for(int i=0; i < om_count(); i++) {
}
// We don't need to align this, it will be naturally pointer aligned
return size;
}
return at(0);
}
// Scan through oopmaps. Stop when current offset is either equal or greater
// than the one we are looking for.
for( i = 0; i < len; i++) {
break;
}
return m;
}
public:
};
#ifndef TIERED
#endif // TIERED
#ifdef COMPILER2
#endif // COMPILER2
}
#ifndef PRODUCT
// Print oopmap and regmap
if( cb->is_nmethod() ) {
// native wrappers have no scope data, it is implied
if (nm->is_native_method()) {
} else {
}
}
}
#endif // PRODUCT
// add derived oops to a table
}
OopClosure* value_fn) {
// handle derived pointers first (otherwise base pointer may be
// changed before derived pointer offset has been collected)
{
#ifndef TIERED
#endif // !TIERED
// Protect the operation on the derived pointers. This
// protects the addition of derived pointers to the shared
// derived pointer table in DerivedPointerTable::add().
do {
// Ignore NULL oops and decoded NULL narrow oops which
// equal to Universe::narrow_oop_base when a narrow oop
// implicit null check is used in compiled code.
// The narrow_oop_base could be NULL or be the address
// of the page below heap depending on compressed oops mode.
} else
}
}
}
// We want coop, value and oop oop_types
{
// Ignore NULL oops and decoded NULL narrow oops which
// equal to Universe::narrow_oop_base when a narrow oop
// implicit null check is used in compiled code.
// The narrow_oop_base could be NULL or be the address
// of the page below heap depending on compressed oops mode.
continue;
}
#ifdef ASSERT
// try to dump out some helpful debugging information
// do the real assert.
}
#endif // ASSERT
"found invalid value pointer");
#ifndef VM_LITTLE_ENDIAN
// compressed oops in registers only take up 4 bytes of an
// 8 byte register but they are in the wrong part of the
// word so adjust loc to point at the right place.
}
#endif
}
}
}
}
}
// Update callee-saved register info for the following frame
// Any reg might be saved by a safepoint handler (see generate_handler_blob).
"already updated this map; do not 'update' it twice!" );
// Check if caller must update oop argument
"include_argument_oops should already be set");
int nof_callee = 0;
// ("+1" because max_saved_on_entry_reg_count might be zero)
// Scan through oopmap and find location of all callee-saved registers
// (we do not do update in place, since info could be overwritten)
nof_callee++;
}
// Check that runtime stubs save all callee-saved registers
#ifdef COMPILER2
"must save all");
#endif // COMPILER2
// Copy found callee-saved register to reg_map
for(int i = 0; i < nof_callee; i++) {
}
}
//=============================================================================
// Non-Product code
#ifndef PRODUCT
#ifndef TIERED
COMPILER1_PRESENT(return false);
#endif // !TIERED
#ifdef COMPILER2
#else
return false;
#endif // COMPILER2
}
#endif //PRODUCT
// Printing code is present in product build for -XX:+PrintAssembly.
static
outputStream* st) {
switch( x ) {
case OopMapValue::oop_value:
break;
case OopMapValue::value_value:
break;
case OopMapValue::narrowoop_value:
break;
case OopMapValue::callee_saved_value:
break;
case OopMapValue::derived_oop_value:
break;
default:
}
}
}
}
}
for( i = 0; i < len; i++) {
}
}
//------------------------------DerivedPointerTable---------------------------
#ifdef COMPILER2
private:
public:
};
// The first time, we create the list. Otherwise it should be
// empty. If not, then we have probably forgotton to call
_list = new (ResourceObj::C_HEAP, mtCompiler) GrowableArray<DerivedPointerEntry*>(10, true); // Allocated on C heap
}
_active = true;
}
// Returns value of location as an int
if (_active) {
// This assert is invalid because derived pointers can be
// arbitrarily far away from their base.
// assert(offset >= -1000000, "wrong derived pointer info");
if (TraceDerivedPointers) {
"Add derived pointer@" INTPTR_FORMAT
" - Derived: " INTPTR_FORMAT
);
}
// Set derived oop location to point to base.
}
}
// The derived oop was setup to point to location of base
if (TraceDerivedPointers) {
}
// Delete entry
delete entry;
}
// Clear list, so it is ready for next traversal (this is an invariant)
}
_active = false;
}
#endif // COMPILER2