/*
* 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/vtableStubs.hpp"
#include "compiler/disassembler.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/instanceKlass.hpp"
#include "oops/klassVtable.hpp"
#include "oops/oop.inline.hpp"
#include "prims/jvmtiExport.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/mutexLocker.hpp"
#include "runtime/sharedRuntime.hpp"
#ifdef COMPILER2
#include "opto/matcher.hpp"
#endif
// -----------------------------------------------------------------------------------------
// Implementation of VtableStub
static int num_vtable_chunks = 0;
// compute real VtableStub size (rounded to nearest word)
// malloc them in chunks to minimize header overhead
}
// Notify JVMTI about this stub. The event will be recorded by the enclosing
// JvmtiDynamicCodeEventCollector and posted when this thread has released
// all locks.
}
align_chunk();
}
align_chunk();
return res;
}
st->print("vtable stub (index = %d, receiver_location = %d, code = [" INTPTR_FORMAT ", " INTPTR_FORMAT "[)",
}
// -----------------------------------------------------------------------------------------
// Implementation of VtableStubs
//
// For each hash value there's a linked list of vtable stubs (with that
// hash value). Each list is anchored in a little hash _table, indexed
// by that hash value.
{
assert(_number_of_vtable_stubs == 0, "potential performance bug: VtableStubs initialized more than once");
for (int i = 0; i < N; i++) {
}
}
}
if (s == NULL) {
if (is_vtable_stub) {
} else {
}
if (PrintAdapterHandlers) {
}
}
return s->entry_point();
}
// Assumption: receiver_location < 4 in most cases.
}
return s;
}
// enter s at the beginning of the corresponding list
_table[h] = s;
}
VtableStub* s;
return s == stub;
}
// simple solution for now - we may want to use
// a faster way if this function is called often
}
// Note: No locking needed since any change to the data structure
// happens with an atomic store into it (we don't care about
// consistency with the _number_of_vtable_stubs counter).
for (int i = 0; i < N; i++) {
}
}
return NULL;
}
void vtableStubs_init() {
}
//-----------------------------------------------------------------------------------------------------
// Non-product code
#ifndef PRODUCT
"index %d (vtable length %d)",
}
#endif // Product