src/hotspot/share/prims/resolvedMethodTable.hpp
changeset 54896 ea619918de95
parent 54574 7b74bbe5085b
child 57828 35db8fba55f9
equal deleted inserted replaced
54895:4f1f939d8f5d 54896:ea619918de95
    24 
    24 
    25 #ifndef SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP
    25 #ifndef SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP
    26 #define SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP
    26 #define SHARE_PRIMS_RESOLVEDMETHODTABLE_HPP
    27 
    27 
    28 #include "gc/shared/oopStorage.hpp"
    28 #include "gc/shared/oopStorage.hpp"
    29 #include "gc/shared/oopStorageParState.hpp"
       
    30 #include "memory/allocation.hpp"
    29 #include "memory/allocation.hpp"
    31 #include "oops/symbol.hpp"
    30 #include "oops/symbol.hpp"
    32 #include "oops/weakHandle.hpp"
    31 #include "oops/weakHandle.hpp"
    33 #include "utilities/concurrentHashTable.hpp"
       
    34 #include "utilities/hashtable.hpp"
       
    35 
    32 
    36 class ResolvedMethodTable;
    33 class ResolvedMethodTable;
    37 class ResolvedMethodTableConfig;
    34 class ResolvedMethodTableConfig;
    38 typedef ConcurrentHashTable<WeakHandle<vm_resolved_method_table_data>, ResolvedMethodTableConfig, mtClass> ResolvedMethodTableHash;
       
    39 
    35 
    40 class ResolvedMethodTable : public AllStatic {
    36 class ResolvedMethodTable : public AllStatic {
    41   static ResolvedMethodTableHash* _local_table;
       
    42   static size_t                   _current_size;
       
    43 
       
    44   static OopStorage*              _weak_handles;
    37   static OopStorage*              _weak_handles;
    45 
    38 
    46   static volatile bool            _has_work;
    39   static volatile bool            _has_work;
    47 
       
    48   static volatile size_t          _items_count;
       
    49   static volatile size_t          _uncleaned_items_count;
       
    50 
       
    51 public:
    40 public:
    52   // Initialization
    41   // Initialization
    53   static void create_table();
    42   static void create_table();
    54 
    43 
    55   static size_t table_size();
    44   static size_t table_size();
    61   // Callbacks
    50   // Callbacks
    62   static void item_added();
    51   static void item_added();
    63   static void item_removed();
    52   static void item_removed();
    64 
    53 
    65   // Cleaning
    54   // Cleaning
    66   static bool has_work();
    55   static bool has_work() { return _has_work; }
    67 
    56 
    68   // GC Support - Backing storage for the oop*s
    57   // GC Support - Backing storage for the oop*s
    69   static OopStorage* weak_storage();
    58   static OopStorage* weak_storage() { return _weak_handles; }
    70 
    59 
    71   // Cleaning and table management
    60   // Cleaning and table management
    72 
    61 
    73   static double get_load_factor();
    62   static double get_load_factor();
    74   static double get_dead_factor();
    63   static double get_dead_factor();