hotspot/src/share/vm/runtime/thread.hpp
changeset 13728 882756847a04
parent 13195 be27e1b6a4b9
child 13975 2f7431485cfa
--- a/hotspot/src/share/vm/runtime/thread.hpp	Fri Aug 31 16:39:35 2012 -0700
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Sat Sep 01 13:25:18 2012 -0400
@@ -417,6 +417,9 @@
   HandleArea* handle_area() const                { return _handle_area; }
   void set_handle_area(HandleArea* area)         { _handle_area = area; }
 
+  GrowableArray<Metadata*>* metadata_handles() const          { return _metadata_handles; }
+  void set_metadata_handles(GrowableArray<Metadata*>* handles){ _metadata_handles = handles; }
+
   // Thread-Local Allocation Buffer (TLAB) support
   ThreadLocalAllocBuffer& tlab()                 { return _tlab; }
   void initialize_tlab() {
@@ -500,6 +503,9 @@
   // Sweeper support
   void nmethods_do(CodeBlobClosure* cf);
 
+  // jvmtiRedefineClasses support
+  void metadata_do(void f(Metadata*));
+
   // Used by fast lock support
   virtual bool is_lock_owned(address adr) const;
 
@@ -520,6 +526,7 @@
 
   // Thread local handle area for allocation of handles within the VM
   HandleArea* _handle_area;
+  GrowableArray<Metadata*>* _metadata_handles;
 
   // Support for stack overflow handling, get_thread, etc.
   address          _stack_base;
@@ -790,18 +797,18 @@
   GrowableArray<jvmtiDeferredLocalVariableSet*>* _deferred_locals_updates;
 
   // Handshake value for fixing 6243940. We need a place for the i2c
-  // adapter to store the callee methodOop. This value is NEVER live
+  // adapter to store the callee Method*. This value is NEVER live
   // across a gc point so it does NOT have to be gc'd
   // The handshake is open ended since we can't be certain that it will
   // be NULLed. This is because we rarely ever see the race and end up
   // in handle_wrong_method which is the backend of the handshake. See
   // code in i2c adapters and handle_wrong_method.
 
-  methodOop     _callee_target;
+  Method*       _callee_target;
 
-  // Oop results of VM runtime calls
-  oop           _vm_result;    // Used to pass back an oop result into Java code, GC-preserved
-  oop           _vm_result_2;  // Used to pass back an oop result into Java code, GC-preserved
+  // Used to pass back results to the interpreter or generated code running Java code.
+  oop           _vm_result;    // oop result is GC-preserved
+  Metadata*     _vm_result_2;  // non-oop result
 
   // See ReduceInitialCardMarks: this holds the precise space interval of
   // the most recent slow path allocation for which compiled code has
@@ -1218,15 +1225,15 @@
   void set_deopt_nmethod(nmethod* nm)            { _deopt_nmethod = nm;   }
   nmethod* deopt_nmethod()                       { return _deopt_nmethod; }
 
-  methodOop  callee_target() const               { return _callee_target; }
-  void set_callee_target  (methodOop x)          { _callee_target   = x; }
+  Method*    callee_target() const               { return _callee_target; }
+  void set_callee_target  (Method* x)          { _callee_target   = x; }
 
   // Oop results of vm runtime calls
   oop  vm_result() const                         { return _vm_result; }
   void set_vm_result  (oop x)                    { _vm_result   = x; }
 
-  oop  vm_result_2() const                       { return _vm_result_2; }
-  void set_vm_result_2  (oop x)                  { _vm_result_2   = x; }
+  Metadata*    vm_result_2() const               { return _vm_result_2; }
+  void set_vm_result_2  (Metadata* x)          { _vm_result_2   = x; }
 
   MemRegion deferred_card_mark() const           { return _deferred_card_mark; }
   void set_deferred_card_mark(MemRegion mr)      { _deferred_card_mark = mr;   }
@@ -1389,6 +1396,9 @@
   // Sweeper operations
   void nmethods_do(CodeBlobClosure* cf);
 
+  // RedefineClasses Support
+  void metadata_do(void f(Metadata*));
+
   // Memory management operations
   void gc_epilogue();
   void gc_prologue();
@@ -1419,7 +1429,7 @@
 
   // Returns method at 'depth' java or native frames down the stack
   // Used for security checks
-  klassOop security_get_caller_class(int depth);
+  Klass* security_get_caller_class(int depth);
 
   // Print stack trace in external format
   void print_stack_on(outputStream* st);
@@ -1836,6 +1846,9 @@
   static int         _number_of_threads;
   static int         _number_of_non_daemon_threads;
   static int         _return_code;
+#ifdef ASSERT
+  static bool        _vm_complete;
+#endif
 
  public:
   // Thread management
@@ -1883,8 +1896,14 @@
   // Sweeper
   static void nmethods_do(CodeBlobClosure* cf);
 
+  // RedefineClasses support
+  static void metadata_do(void f(Metadata*));
+
   static void gc_epilogue();
   static void gc_prologue();
+#ifdef ASSERT
+  static bool is_vm_complete() { return _vm_complete; }
+#endif
 
   // Verification
   static void verify();