< prev index next >

src/hotspot/share/classfile/placeholders.cpp

Print this page
*** 60,10 ***
--- 60,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;

*** 99,10 ***
--- 101,13 ---
         queuehead = _superThreadQ;
         break;
      case PlaceholderTable::DEFINE_CLASS:
         queuehead = _defineThreadQ;
         break;
+     case PlaceholderTable::PRIMITIVE_OBJECT_FIELD:
+        queuehead = _inlineTypeFieldQ;
+        break;
      default: Unimplemented();
    }
    return queuehead;
  }
  

*** 115,10 ***
--- 120,13 ---
         _superThreadQ = seenthread;
         break;
      case PlaceholderTable::DEFINE_CLASS:
         _defineThreadQ = seenthread;
         break;
+     case PlaceholderTable::PRIMITIVE_OBJECT_FIELD:
+        _inlineTypeFieldQ = seenthread;
+        break;
      default: Unimplemented();
    }
    return;
  }
  

*** 230,10 ***
--- 238,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::PRIMITIVE_OBJECT_FIELD: return "PRIMITIVE_OBJECT_FIELD";
   }
   return "";
  }
  
  inline void log(Symbol* name, PlaceholderEntry* entry, const char* function, PlaceholderTable::classloadAction action) {

*** 298,11 ***
    if (probe->superThreadQ() == nullptr) {
      probe->set_supername(nullptr);
    }
    // If no other threads using this entry, and this thread is not using this entry for other states
    if ((probe->superThreadQ() == nullptr) && (probe->loadInstanceThreadQ() == nullptr)
!       && (probe->defineThreadQ() == nullptr) && (probe->definer() == nullptr)) {
      remove_entry(name, loader_data);
    }
  }
  
  void PlaceholderKey::print_on(outputStream* st) const {
--- 307,12 ---
    if (probe->superThreadQ() == nullptr) {
      probe->set_supername(nullptr);
    }
    // If no other threads using this entry, and this thread is not using this entry for other states
    if ((probe->superThreadQ() == nullptr) && (probe->loadInstanceThreadQ() == nullptr)
!       && (probe->defineThreadQ() == nullptr) && (probe->definer() == nullptr)
+       && (probe->inlineTypeFieldQ() == nullptr)) {
      remove_entry(name, loader_data);
    }
  }
  
  void PlaceholderKey::print_on(outputStream* st) const {

*** 332,10 ***
--- 342,13 ---
    SeenThread::print_action_queue(superThreadQ(), st);
    st->cr();
    st->print("defineThreadQ threads:");
    SeenThread::print_action_queue(defineThreadQ(), st);
    st->cr();
+   st->print("inlineTypeFieldQ threads:");
+   SeenThread::print_action_queue(inlineTypeFieldQ(), st);
+   st->cr();
  }
  
  void PlaceholderTable::print_on(outputStream* st) {
    auto printer = [&] (PlaceholderKey& key, PlaceholderEntry& entry) {
        st->print("placeholder ");
< prev index next >