8153818: Move similar CompiledIC platform specific code to shared code.
Reviewed-by: iveresov, twisti
--- a/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp Tue Apr 12 14:55:18 2016 -0700
+++ b/hotspot/src/cpu/aarch64/vm/compiledIC_aarch64.cpp Tue Apr 12 17:12:51 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -32,22 +32,6 @@
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- if (is_icholder_entry(call->destination())) {
- NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
- InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
- }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- return is_icholder_entry(call->destination());
-}
-
// ----------------------------------------------------------------------------
#define __ _masm.
--- a/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp Tue Apr 12 14:55:18 2016 -0700
+++ b/hotspot/src/cpu/ppc/vm/compiledIC_ppc.cpp Tue Apr 12 17:12:51 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@@ -35,22 +35,6 @@
#include "opto/matcher.hpp"
#endif
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- if (is_icholder_entry(call->destination())) {
- NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
- InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
- }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- return is_icholder_entry(call->destination());
-}
-
// ----------------------------------------------------------------------------
// A PPC CompiledStaticCall looks like this:
--- a/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp Tue Apr 12 14:55:18 2016 -0700
+++ b/hotspot/src/cpu/sparc/vm/compiledIC_sparc.cpp Tue Apr 12 17:12:51 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -34,22 +34,6 @@
#include "opto/matcher.hpp"
#endif
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- if (is_icholder_entry(call->destination())) {
- NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
- InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
- }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- return is_icholder_entry(call->destination());
-}
-
// ----------------------------------------------------------------------------
#define __ _masm.
--- a/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp Tue Apr 12 14:55:18 2016 -0700
+++ b/hotspot/src/cpu/x86/vm/compiledIC_x86.cpp Tue Apr 12 17:12:51 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,22 +31,6 @@
#include "runtime/mutexLocker.hpp"
#include "runtime/safepoint.hpp"
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- if (is_icholder_entry(call->destination())) {
- NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
- InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
- }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- return is_icholder_entry(call->destination());
-}
-
// ----------------------------------------------------------------------------
#define __ _masm.
--- a/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp Tue Apr 12 14:55:18 2016 -0700
+++ b/hotspot/src/cpu/zero/vm/compiledIC_zero.cpp Tue Apr 12 17:12:51 2016 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -42,22 +42,6 @@
#include "utilities/events.hpp"
-// Release the CompiledICHolder* associated with this call site is there is one.
-void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- if (is_icholder_entry(call->destination())) {
- NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
- InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
- }
-}
-
-bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
- // This call site might have become stale so inspect it carefully.
- NativeCall* call = nativeCall_at(call_site->addr());
- return is_icholder_entry(call->destination());
-}
-
// ----------------------------------------------------------------------------
address CompiledStaticCall::emit_to_interp_stub(CodeBuffer &cbuf, address mark) {
--- a/hotspot/src/share/vm/code/compiledIC.cpp Tue Apr 12 14:55:18 2016 -0700
+++ b/hotspot/src/share/vm/code/compiledIC.cpp Tue Apr 12 17:12:51 2016 -0700
@@ -533,6 +533,22 @@
return (cb != NULL && cb->is_adapter_blob());
}
+// Release the CompiledICHolder* associated with this call site is there is one.
+void CompiledIC::cleanup_call_site(virtual_call_Relocation* call_site) {
+ // This call site might have become stale so inspect it carefully.
+ NativeCall* call = nativeCall_at(call_site->addr());
+ if (is_icholder_entry(call->destination())) {
+ NativeMovConstReg* value = nativeMovConstReg_at(call_site->cached_value());
+ InlineCacheBuffer::queue_for_release((CompiledICHolder*)value->data());
+ }
+}
+
+bool CompiledIC::is_icholder_call_site(virtual_call_Relocation* call_site) {
+ // This call site might have become stale so inspect it carefully.
+ NativeCall* call = nativeCall_at(call_site->addr());
+ return is_icholder_entry(call->destination());
+}
+
// ----------------------------------------------------------------------------
void CompiledStaticCall::set_to_clean() {