2009-10-13 12:04:21 -07:00
|
|
|
/*
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
2011-04-04 03:02:00 -07:00
|
|
|
* Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
|
2009-10-13 12:04:21 -07:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
|
*
|
|
|
|
* This code is free software; you can redistribute it and/or modify it
|
|
|
|
* 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.
|
|
|
|
*
|
2010-05-27 19:08:38 -07:00
|
|
|
* 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.
|
2009-10-13 12:04:21 -07:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "precompiled.hpp"
|
|
|
|
#include "asm/assembler.hpp"
|
|
|
|
#include "assembler_zero.inline.hpp"
|
|
|
|
#include "code/debugInfoRec.hpp"
|
|
|
|
#include "code/icBuffer.hpp"
|
|
|
|
#include "code/vtableStubs.hpp"
|
|
|
|
#include "interpreter/interpreter.hpp"
|
6964458: Reimplement class meta-data storage to use native memory
Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Co-authored-by: Stefan Karlsson <stefan.karlsson@oracle.com>
Co-authored-by: Mikael Gerdin <mikael.gerdin@oracle.com>
Co-authored-by: Tom Rodriguez <tom.rodriguez@oracle.com>
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
2012-09-01 13:25:18 -04:00
|
|
|
#include "oops/compiledICHolder.hpp"
|
2010-11-23 13:22:55 -08:00
|
|
|
#include "prims/jvmtiRedefineClassesTrace.hpp"
|
|
|
|
#include "runtime/sharedRuntime.hpp"
|
|
|
|
#include "runtime/vframeArray.hpp"
|
|
|
|
#include "vmreg_zero.inline.hpp"
|
2012-10-29 11:08:48 -07:00
|
|
|
|
2010-11-23 13:22:55 -08:00
|
|
|
#ifdef COMPILER1
|
|
|
|
#include "c1/c1_Runtime1.hpp"
|
|
|
|
#endif
|
|
|
|
#ifdef COMPILER2
|
|
|
|
#include "opto/runtime.hpp"
|
|
|
|
#endif
|
|
|
|
#ifdef SHARK
|
|
|
|
#include "compiler/compileBroker.hpp"
|
|
|
|
#include "shark/sharkCompiler.hpp"
|
|
|
|
#endif
|
2009-10-13 12:04:21 -07:00
|
|
|
|
|
|
|
|
2012-10-29 11:08:48 -07:00
|
|
|
|
|
|
|
static address zero_null_code_stub() {
|
|
|
|
address start = ShouldNotCallThisStub();
|
|
|
|
return start;
|
|
|
|
}
|
|
|
|
|
2009-10-13 12:04:21 -07:00
|
|
|
int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
|
|
|
|
VMRegPair *regs,
|
|
|
|
int total_args_passed,
|
|
|
|
int is_outgoing) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
AdapterHandlerEntry* SharedRuntime::generate_i2c2i_adapters(
|
|
|
|
MacroAssembler *masm,
|
|
|
|
int total_args_passed,
|
|
|
|
int comp_args_on_stack,
|
|
|
|
const BasicType *sig_bt,
|
2010-01-28 08:36:34 -08:00
|
|
|
const VMRegPair *regs,
|
|
|
|
AdapterFingerPrint *fingerprint) {
|
|
|
|
return AdapterHandlerLibrary::new_entry(
|
|
|
|
fingerprint,
|
2012-10-29 11:08:48 -07:00
|
|
|
CAST_FROM_FN_PTR(address,zero_null_code_stub),
|
|
|
|
CAST_FROM_FN_PTR(address,zero_null_code_stub),
|
|
|
|
CAST_FROM_FN_PTR(address,zero_null_code_stub));
|
2009-10-13 12:04:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
nmethod *SharedRuntime::generate_native_wrapper(MacroAssembler *masm,
|
|
|
|
methodHandle method,
|
2011-04-04 03:02:00 -07:00
|
|
|
int compile_id,
|
|
|
|
BasicType *sig_bt,
|
|
|
|
VMRegPair *regs,
|
2009-10-13 12:04:21 -07:00
|
|
|
BasicType ret_type) {
|
2009-11-27 07:56:58 -08:00
|
|
|
#ifdef SHARK
|
|
|
|
return SharkCompiler::compiler()->generate_native_wrapper(masm,
|
|
|
|
method,
|
2011-04-04 03:02:00 -07:00
|
|
|
compile_id,
|
|
|
|
sig_bt,
|
2009-11-27 07:56:58 -08:00
|
|
|
ret_type);
|
|
|
|
#else
|
2009-10-13 12:04:21 -07:00
|
|
|
ShouldNotCallThis();
|
2009-11-27 07:56:58 -08:00
|
|
|
#endif // SHARK
|
2009-10-13 12:04:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
int Deoptimization::last_frame_adjust(int callee_parameters,
|
|
|
|
int callee_locals) {
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint SharedRuntime::out_preserve_stack_slots() {
|
|
|
|
ShouldNotCallThis();
|
|
|
|
}
|
|
|
|
|
2012-10-29 11:08:48 -07:00
|
|
|
JRT_LEAF(void, zero_stub())
|
|
|
|
ShouldNotCallThis();
|
|
|
|
JRT_END
|
|
|
|
|
2009-10-13 12:04:21 -07:00
|
|
|
static RuntimeStub* generate_empty_runtime_stub(const char* name) {
|
2012-10-29 11:08:48 -07:00
|
|
|
return CAST_FROM_FN_PTR(RuntimeStub*,zero_stub);
|
2009-10-13 12:04:21 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static SafepointBlob* generate_empty_safepoint_blob() {
|
2012-10-29 11:08:48 -07:00
|
|
|
return CAST_FROM_FN_PTR(SafepointBlob*,zero_stub);
|
2009-10-13 12:04:21 -07:00
|
|
|
}
|
|
|
|
|
2011-08-08 05:49:04 -07:00
|
|
|
static DeoptimizationBlob* generate_empty_deopt_blob() {
|
2012-10-29 11:08:48 -07:00
|
|
|
return CAST_FROM_FN_PTR(DeoptimizationBlob*,zero_stub);
|
2011-08-08 05:49:04 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SharedRuntime::generate_deopt_blob() {
|
|
|
|
_deopt_blob = generate_empty_deopt_blob();
|
|
|
|
}
|
|
|
|
|
2012-10-29 11:08:48 -07:00
|
|
|
SafepointBlob* SharedRuntime::generate_handler_blob(address call_ptr, int poll_type) {
|
2011-08-08 05:49:04 -07:00
|
|
|
return generate_empty_safepoint_blob();
|
|
|
|
}
|
2009-10-13 12:04:21 -07:00
|
|
|
|
2011-08-08 05:49:04 -07:00
|
|
|
RuntimeStub* SharedRuntime::generate_resolve_blob(address destination, const char* name) {
|
|
|
|
return generate_empty_runtime_stub("resolve_blob");
|
2009-10-13 12:04:21 -07:00
|
|
|
}
|
|
|
|
|
2012-10-29 11:08:48 -07:00
|
|
|
|
2009-10-13 12:04:21 -07:00
|
|
|
int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
|
|
|
|
VMRegPair *regs,
|
|
|
|
int total_args_passed) {
|
|
|
|
ShouldNotCallThis();
|
|
|
|
}
|