hotspot/src/share/vm/services/mallocSiteTable.cpp
changeset 46630 75aa3e39d02c
parent 46489 40abcea5a9d5
equal deleted inserted replaced
46629:8eeacdc76bf2 46630:75aa3e39d02c
   180 
   180 
   181 // Access malloc site
   181 // Access malloc site
   182 MallocSite* MallocSiteTable::malloc_site(size_t bucket_idx, size_t pos_idx) {
   182 MallocSite* MallocSiteTable::malloc_site(size_t bucket_idx, size_t pos_idx) {
   183   assert(bucket_idx < table_size, "Invalid bucket index");
   183   assert(bucket_idx < table_size, "Invalid bucket index");
   184   MallocSiteHashtableEntry* head = _table[bucket_idx];
   184   MallocSiteHashtableEntry* head = _table[bucket_idx];
   185   for (size_t index = 0; index < pos_idx && head != NULL;
   185   for (size_t index = 0;
   186     index ++, head = (MallocSiteHashtableEntry*)head->next());
   186        index < pos_idx && head != NULL;
       
   187        index++, head = (MallocSiteHashtableEntry*)head->next()) {}
   187   assert(head != NULL, "Invalid position index");
   188   assert(head != NULL, "Invalid position index");
   188   return head->data();
   189   return head->data();
   189 }
   190 }
   190 
   191 
   191 // Allocates MallocSiteHashtableEntry object. Special call stack
   192 // Allocates MallocSiteHashtableEntry object. Special call stack
   254     os::naked_yield();
   255     os::naked_yield();
   255 #endif
   256 #endif
   256   }
   257   }
   257   _lock_state = ExclusiveLock;
   258   _lock_state = ExclusiveLock;
   258 }
   259 }
   259 
       
   260