6313046: Remove unused frame::native_param_addr code
authormikael
Wed, 11 Mar 2015 12:00:26 -0700
changeset 29571 6627b10e05f8
parent 29570 2dfa46d6ea7e
child 29572 cf3e05e32c13
6313046: Remove unused frame::native_param_addr code Summary: Removed dead code in frame Reviewed-by: dholmes, cjplummer, dsamersoff
hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java
hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java
hotspot/src/cpu/aarch64/vm/frame_aarch64.hpp
hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp
hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp
hotspot/src/cpu/x86/vm/frame_x86.hpp
hotspot/src/cpu/x86/vm/frame_x86.inline.hpp
hotspot/src/share/vm/runtime/frame.hpp
hotspot/src/share/vm/runtime/vmStructs.cpp
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/ppc64/PPC64Frame.java	Wed Mar 11 12:00:26 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2014, 2015, 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
@@ -63,10 +63,6 @@
   // Entry frames
   private static int ENTRY_FRAME_CALL_WRAPPER_OFFSET;
 
-  // Native frames
-  private static int NATIVE_FRAME_INITIAL_PARAM_OFFSET;
-
-
   static {
     VM.registerVMInitializedObserver(new Observer() {
       public void update(Observable o, Object data) {
@@ -76,10 +72,8 @@
   }
 
   private static synchronized void initialize(TypeDataBase db) {
-    int abi_minframe_size = db.lookupIntConstant("frame::abi_minframe_size").intValue();
     int entry_frame_locals_size = db.lookupIntConstant("frame::entry_frame_locals_size").intValue();
     int wordLength = (int) VM.getVM().getAddressSize();
-    NATIVE_FRAME_INITIAL_PARAM_OFFSET = -abi_minframe_size/wordLength;
     ENTRY_FRAME_CALL_WRAPPER_OFFSET = -entry_frame_locals_size/wordLength;
   }
 
@@ -389,13 +383,6 @@
   // Return address:
   public Address getSenderPC()     { return getSenderSP().getAddressAt(2 * VM.getVM().getAddressSize()); }
 
-  // return address of param, zero origin index.
-  // MPJ note:   Appears to be unused.
-  public Address getNativeParamAddr(int idx) {
-    return null;
-    // return addressOfStackSlot(NATIVE_FRAME_INITIAL_PARAM_OFFSET + idx);
-  }
-
   public Address getSenderSP()     { return getFP(); }
   public Address addressOfInterpreterFrameLocals() {
     return addressOfStackSlot(INTERPRETER_FRAME_LOCALS_OFFSET);
--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/x86/X86Frame.java	Wed Mar 11 12:00:26 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2015, 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
@@ -63,9 +63,6 @@
   // Entry frames
   private static       int ENTRY_FRAME_CALL_WRAPPER_OFFSET;
 
-  // Native frames
-  private static final int NATIVE_FRAME_INITIAL_PARAM_OFFSET =  2;
-
   private static VMReg rbp;
 
   static {
@@ -423,20 +420,12 @@
     return addressOfStackSlot(LINK_OFFSET).getAddressAt(0);
   }
 
-  // FIXME: not implementable yet
-  //inline void      frame::set_link(intptr_t* addr)  { *(intptr_t **)addr_at(link_offset) = addr; }
-
   public Address getUnextendedSP() { return raw_unextendedSP; }
 
   // Return address:
   public Address getSenderPCAddr() { return addressOfStackSlot(RETURN_ADDR_OFFSET); }
   public Address getSenderPC()     { return getSenderPCAddr().getAddressAt(0);      }
 
-  // return address of param, zero origin index.
-  public Address getNativeParamAddr(int idx) {
-    return addressOfStackSlot(NATIVE_FRAME_INITIAL_PARAM_OFFSET + idx);
-  }
-
   public Address getSenderSP()     { return addressOfStackSlot(SENDER_SP_OFFSET); }
 
   public Address addressOfInterpreterFrameLocals() {
--- a/hotspot/src/cpu/aarch64/vm/frame_aarch64.hpp	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/frame_aarch64.hpp	Wed Mar 11 12:00:26 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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.
  *
@@ -136,12 +136,7 @@
     entry_frame_call_wrapper_offset                  = -8,
 
     // we don't need a save area
-    arg_reg_save_area_bytes                          =  0,
-
-    // TODO - check that this is still correct
-    // Native frames
-
-    native_frame_initial_param_offset                =  2
+    arg_reg_save_area_bytes                          =  0
 
   };
 
@@ -195,9 +190,6 @@
 
   inline address* sender_pc_addr() const;
 
-  // return address of param, zero origin index.
-  inline address* native_param_addr(int idx) const;
-
   // expression stack tos if we are nested in a java call
   intptr_t* interpreter_frame_last_sp() const;
 
--- a/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/src/cpu/aarch64/vm/frame_aarch64.inline.hpp	Wed Mar 11 12:00:26 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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.
  *
@@ -166,7 +166,6 @@
 
 
 inline intptr_t* frame::link() const              { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
-inline void      frame::set_link(intptr_t* addr)  { *(intptr_t **)addr_at(link_offset) = addr; }
 
 
 inline intptr_t* frame::unextended_sp() const     { return _unextended_sp; }
@@ -176,9 +175,6 @@
 inline address* frame::sender_pc_addr()      const { return (address*) addr_at( return_addr_offset); }
 inline address  frame::sender_pc()           const { return *sender_pc_addr(); }
 
-// return address of param, zero origin index.
-inline address* frame::native_param_addr(int idx) const { return (address*) addr_at( native_frame_initial_param_offset+idx); }
-
 #ifdef CC_INTERP
 
 inline interpreterState frame::get_interpreterState() const {
--- a/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/src/cpu/sparc/vm/frame_sparc.inline.hpp	Wed Mar 11 12:00:26 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -69,8 +69,6 @@
 
 inline intptr_t* frame::link() const { return (intptr_t *)(fp()[FP->sp_offset_in_saved_window()] + STACK_BIAS); }
 
-inline void frame::set_link(intptr_t* addr) { assert(link()==addr, "frame nesting is controlled by hardware"); }
-
 inline intptr_t* frame::unextended_sp() const { return sp() + _sp_adjustment_by_callee; }
 
 // return address:
--- a/hotspot/src/cpu/x86/vm/frame_x86.hpp	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/src/cpu/x86/vm/frame_x86.hpp	Wed Mar 11 12:00:26 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -128,21 +128,16 @@
     entry_frame_after_call_words                     =  28,
     entry_frame_call_wrapper_offset                  =  2,
 
-    arg_reg_save_area_bytes                          = 32, // Register argument save area
+    arg_reg_save_area_bytes                          = 32 // Register argument save area
 #else
     entry_frame_after_call_words                     = 13,
     entry_frame_call_wrapper_offset                  = -6,
 
-    arg_reg_save_area_bytes                          =  0,
+    arg_reg_save_area_bytes                          =  0
 #endif // _WIN64
 #else
-    entry_frame_call_wrapper_offset                  =  2,
+    entry_frame_call_wrapper_offset                  =  2
 #endif // AMD64
-
-    // Native frames
-
-    native_frame_initial_param_offset                =  2
-
   };
 
   intptr_t ptr_at(int offset) const {
@@ -195,9 +190,6 @@
 
   inline address* sender_pc_addr() const;
 
-  // return address of param, zero origin index.
-  inline address* native_param_addr(int idx) const;
-
   // expression stack tos if we are nested in a java call
   intptr_t* interpreter_frame_last_sp() const;
 
--- a/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/src/cpu/x86/vm/frame_x86.inline.hpp	Wed Mar 11 12:00:26 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -139,8 +139,6 @@
 
 
 inline intptr_t* frame::link() const              { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
-inline void      frame::set_link(intptr_t* addr)  { *(intptr_t **)addr_at(link_offset) = addr; }
-
 
 inline intptr_t* frame::unextended_sp() const     { return _unextended_sp; }
 
@@ -149,9 +147,6 @@
 inline address* frame::sender_pc_addr()      const { return (address*) addr_at( return_addr_offset); }
 inline address  frame::sender_pc()           const { return *sender_pc_addr(); }
 
-// return address of param, zero origin index.
-inline address* frame::native_param_addr(int idx) const { return (address*) addr_at( native_frame_initial_param_offset+idx); }
-
 #ifdef CC_INTERP
 
 inline interpreterState frame::get_interpreterState() const {
--- a/hotspot/src/share/vm/runtime/frame.hpp	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/src/share/vm/runtime/frame.hpp	Wed Mar 11 12:00:26 2015 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, 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
@@ -194,7 +194,6 @@
  public:
   // Link (i.e., the pointer to the previous frame)
   intptr_t* link() const;
-  void set_link(intptr_t* addr);
 
   // Return address
   address  sender_pc() const;
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Mar 11 09:11:33 2015 +0100
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Wed Mar 11 12:00:26 2015 -0700
@@ -2584,7 +2584,6 @@
   /**********************/                                                \
   /* frame              */                                                \
   /**********************/                                                \
-  NOT_ZERO(PPC64_ONLY(declare_constant(frame::abi_minframe_size)))        \
   NOT_ZERO(PPC64_ONLY(declare_constant(frame::entry_frame_locals_size)))  \
                                                                           \
   NOT_ZERO(X86_ONLY(declare_constant(frame::entry_frame_call_wrapper_offset)))      \