< prev index next >
src/hotspot/share/services/mallocSiteTable.hpp
Print this page
rev 50951 : imported patch static_initialization.patch
*** 245,272 ****
static inline unsigned int hash_to_index(unsigned int hash) {
return (hash % table_size);
}
static inline const NativeCallStack* hash_entry_allocation_stack() {
! return (NativeCallStack*)_hash_entry_allocation_stack;
}
private:
// Counter for counting concurrent access
static volatile int _access_count;
// The callsite hashtable. It has to be a static table,
// since malloc call can come from C runtime linker.
static MallocSiteHashtableEntry* _table[table_size];
- // Reserve enough memory for placing the objects
-
- // The memory for hashtable entry allocation stack object
- static size_t _hash_entry_allocation_stack[CALC_OBJ_SIZE_IN_TYPE(NativeCallStack, size_t)];
- // The memory for hashtable entry allocation callsite object
- static size_t _hash_entry_allocation_site[CALC_OBJ_SIZE_IN_TYPE(MallocSiteHashtableEntry, size_t)];
NOT_PRODUCT(static int _peak_count;)
};
#endif // INCLUDE_NMT
#endif // SHARE_VM_SERVICES_MALLOC_SITE_TABLE_HPP
--- 245,274 ----
static inline unsigned int hash_to_index(unsigned int hash) {
return (hash % table_size);
}
static inline const NativeCallStack* hash_entry_allocation_stack() {
! assert(_hash_entry_allocation_stack != NULL, "Must be set");
! return _hash_entry_allocation_stack;
! }
!
! static inline const MallocSiteHashtableEntry* hash_entry_allocation_site() {
! assert(_hash_entry_allocation_site != NULL, "Must be set");
! return _hash_entry_allocation_site;
}
private:
// Counter for counting concurrent access
static volatile int _access_count;
// The callsite hashtable. It has to be a static table,
// since malloc call can come from C runtime linker.
static MallocSiteHashtableEntry* _table[table_size];
+ static const NativeCallStack* _hash_entry_allocation_stack;
+ static const MallocSiteHashtableEntry* _hash_entry_allocation_site;
NOT_PRODUCT(static int _peak_count;)
};
#endif // INCLUDE_NMT
#endif // SHARE_VM_SERVICES_MALLOC_SITE_TABLE_HPP
< prev index next >