< prev index next >

src/hotspot/share/classfile/stringTable.hpp

Print this page
rev 52316 : 8185525: Add JFR event for DictionarySizes
Summary: Added TableStatistics event
Reviewed-by: egahlin, coleenp


  84   static size_t item_added();
  85   static void item_removed();
  86   size_t add_items_to_clean(size_t ndead);
  87 
  88   StringTable();
  89 
  90   static oop intern(Handle string_or_null_h, jchar* name, int len, TRAPS);
  91   oop do_intern(Handle string_or_null, jchar* name, int len, uintx hash, TRAPS);
  92   oop do_lookup(jchar* name, int len, uintx hash);
  93 
  94   void concurrent_work(JavaThread* jt);
  95   void print_table_statistics(outputStream* st, const char* table_name);
  96 
  97   void try_rehash_table();
  98   bool do_rehash();
  99 
 100  public:
 101   // The string table
 102   static StringTable* the_table() { return _the_table; }
 103   size_t table_size(Thread* thread = NULL);

 104 
 105   static OopStorage* weak_storage() { return the_table()->_weak_handles; }
 106 
 107   static void create_table() {
 108     assert(_the_table == NULL, "One string table allowed.");
 109     _the_table = new StringTable();
 110   }
 111 
 112   static void do_concurrent_work(JavaThread* jt);
 113   static bool has_work() { return the_table()->_has_work; }
 114 
 115   // GC support
 116 
 117   // Must be called before a parallel walk where strings might die.
 118   static void reset_dead_counter() {
 119     the_table()->_uncleaned_items = 0;
 120   }
 121   // After the parallel walk this method must be called to trigger
 122   // cleaning. Note it might trigger a resize instead.
 123   static void finish_dead_counter() {




  84   static size_t item_added();
  85   static void item_removed();
  86   size_t add_items_to_clean(size_t ndead);
  87 
  88   StringTable();
  89 
  90   static oop intern(Handle string_or_null_h, jchar* name, int len, TRAPS);
  91   oop do_intern(Handle string_or_null, jchar* name, int len, uintx hash, TRAPS);
  92   oop do_lookup(jchar* name, int len, uintx hash);
  93 
  94   void concurrent_work(JavaThread* jt);
  95   void print_table_statistics(outputStream* st, const char* table_name);
  96 
  97   void try_rehash_table();
  98   bool do_rehash();
  99 
 100  public:
 101   // The string table
 102   static StringTable* the_table() { return _the_table; }
 103   size_t table_size(Thread* thread = NULL);
 104   TableStatistics get_table_statistics();
 105 
 106   static OopStorage* weak_storage() { return the_table()->_weak_handles; }
 107 
 108   static void create_table() {
 109     assert(_the_table == NULL, "One string table allowed.");
 110     _the_table = new StringTable();
 111   }
 112 
 113   static void do_concurrent_work(JavaThread* jt);
 114   static bool has_work() { return the_table()->_has_work; }
 115 
 116   // GC support
 117 
 118   // Must be called before a parallel walk where strings might die.
 119   static void reset_dead_counter() {
 120     the_table()->_uncleaned_items = 0;
 121   }
 122   // After the parallel walk this method must be called to trigger
 123   // cleaning. Note it might trigger a resize instead.
 124   static void finish_dead_counter() {


< prev index next >