< prev index next >

src/hotspot/share/classfile/stringTable.hpp

Print this page




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

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




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


< prev index next >