< prev index next >

src/hotspot/share/classfile/placeholders.cpp

Print this page
@@ -39,10 +39,12 @@
  // For bootclasssearchpath, set before calling load_instance_class.
  // Defining must be single threaded on a class/classloader basis
  // For DEFINE_CLASS, the head of the queue owns the
  // define token and the rest of the threads wait to return the
  // result the first thread gets.
+ // For INLINE_FIELD, set when loading inline type fields for
+ // class circularity checking.
  class SeenThread: public CHeapObj<mtInternal> {
  private:
     JavaThread* _thread;
     SeenThread* _stnext;
     SeenThread* _stprev;

@@ -79,10 +81,13 @@
         queuehead = _superThreadQ;
         break;
      case PlaceholderTable::DEFINE_CLASS:
         queuehead = _defineThreadQ;
         break;
+     case PlaceholderTable::INLINE_TYPE_FIELD:
+        queuehead = _inlineTypeFieldQ;
+        break;
      default: Unimplemented();
    }
    return queuehead;
  }
  

@@ -95,10 +100,13 @@
         _superThreadQ = seenthread;
         break;
      case PlaceholderTable::DEFINE_CLASS:
         _defineThreadQ = seenthread;
         break;
+     case PlaceholderTable::INLINE_TYPE_FIELD:
+        _inlineTypeFieldQ = seenthread;
+        break;
      default: Unimplemented();
    }
    return;
  }
  

@@ -182,10 +190,11 @@
    entry->set_loader_data(loader_data);
    entry->set_supername(supername);
    entry->set_superThreadQ(NULL);
    entry->set_loadInstanceThreadQ(NULL);
    entry->set_defineThreadQ(NULL);
+   entry->set_inlineTypeFieldQ(NULL);
    entry->set_definer(NULL);
    entry->set_instance_klass(NULL);
    return entry;
  }
  

@@ -262,10 +271,11 @@
  static const char* action_to_string(PlaceholderTable::classloadAction action) {
    switch (action) {
    case PlaceholderTable::LOAD_INSTANCE: return "LOAD_INSTANCE";
    case PlaceholderTable::LOAD_SUPER:    return "LOAD_SUPER";
    case PlaceholderTable::DEFINE_CLASS:  return "DEFINE_CLASS";
+   case PlaceholderTable::INLINE_TYPE_FIELD: return "INLINE_TYPE_FIELD";
   }
   return "";
  }
  
  inline void log(PlaceholderEntry* entry, const char* function, PlaceholderTable::classloadAction action) {

@@ -327,11 +337,12 @@
      if (probe != NULL) {
         log(probe, "find_and_remove", action);
         probe->remove_seen_thread(thread, action);
         // If no other threads using this entry, and this thread is not using this entry for other states
         if ((probe->superThreadQ() == NULL) && (probe->loadInstanceThreadQ() == NULL)
-           && (probe->defineThreadQ() == NULL) && (probe->definer() == NULL)) {
+           && (probe->defineThreadQ() == NULL) && (probe->definer() == NULL)
+           && (probe->inlineTypeFieldQ() == NULL)) {
           remove_entry(hash, name, loader_data);
         }
      }
    }
  

@@ -382,10 +393,13 @@
    superThreadQ()->print_action_queue(st);
    st->cr();
    st->print("defineThreadQ threads:");
    defineThreadQ()->print_action_queue(st);
    st->cr();
+   st->print("inlineTypeFieldQ threads:");
+   inlineTypeFieldQ()->print_action_queue(st);
+   st->cr();
  }
  
  void PlaceholderTable::print_on(outputStream* st) const {
    st->print_cr("Placeholder table (table_size=%d, placeholders=%d)",
                  table_size(), number_of_entries());
< prev index next >