Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp
32285 views
/*1* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*22*/2324#include "precompiled.hpp"25#include "classfile/systemDictionary.hpp"26#include "code/codeCache.hpp"27#include "code/compiledIC.hpp"28#include "code/icBuffer.hpp"29#include "code/nmethod.hpp"30#include "code/vtableStubs.hpp"31#include "interpreter/interpreter.hpp"32#include "interpreter/linkResolver.hpp"33#include "memory/metadataFactory.hpp"34#include "memory/oopFactory.hpp"35#include "oops/method.hpp"36#include "oops/oop.inline.hpp"37#include "oops/symbol.hpp"38#include "runtime/icache.hpp"39#include "runtime/sharedRuntime.hpp"40#include "runtime/stubRoutines.hpp"41#include "utilities/events.hpp"424344// Release the CompiledICHolder* associated with this call site is there is one.45void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {46// This call site might have become stale so inspect it carefully.47NativeCall* call = nativeCall_at(call_site->addr());48if (is_icholder_entry(call->destination())) {49NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());50InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());51}52}5354bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {55// This call site might have become stale so inspect it carefully.56NativeCall* call = nativeCall_at(call_site->addr());57return is_icholder_entry(call->destination());58}5960// ----------------------------------------------------------------------------6162address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf) {63ShouldNotReachHere(); // Only needed for COMPILER2.64return NULL;65}6667int CompiledStaticCall::to_interp_stub_size() {68ShouldNotReachHere(); // Only needed for COMPILER2.69return 0;70}7172// Relocation entries for call stub, compiled java to interpreter.73int CompiledStaticCall::reloc_to_interp_stub() {74ShouldNotReachHere(); // Only needed for COMPILER2.75return 0;76}7778void CompiledStaticCall::set_to_interpreted(methodHandle callee, address entry) {79ShouldNotReachHere(); // Only needed for COMPILER2.80}8182void CompiledStaticCall::set_stub_to_clean(static_stub_Relocation* static_stub) {83ShouldNotReachHere(); // Only needed for COMPILER2.84}8586//-----------------------------------------------------------------------------87// Non-product mode code.88#ifndef PRODUCT8990void CompiledStaticCall::verify() {91ShouldNotReachHere(); // Only needed for COMPILER2.92}9394#endif // !PRODUCT959697