Skip to content

Commit 4680dc9

Browse files
committed
8365264: Rename ResourceHashtable to HashTable
Reviewed-by: iklam, ayang
1 parent ecbdd34 commit 4680dc9

File tree

68 files changed

+214
-215
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+214
-215
lines changed

src/hotspot/share/asm/codeBuffer.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "utilities/debug.hpp"
3434
#include "utilities/growableArray.hpp"
3535
#include "utilities/linkedlist.hpp"
36-
#include "utilities/resizeableResourceHash.hpp"
36+
#include "utilities/resizableHashTable.hpp"
3737
#include "utilities/macros.hpp"
3838

3939
template <typename T>
@@ -541,7 +541,7 @@ class CodeBuffer: public StackObj DEBUG_ONLY(COMMA private Scrubber) {
541541
};
542542

543543
typedef LinkedListImpl<int> Offsets;
544-
typedef ResizeableResourceHashtable<address, Offsets, AnyObj::C_HEAP, mtCompiler> SharedTrampolineRequests;
544+
typedef ResizeableHashTable<address, Offsets, AnyObj::C_HEAP, mtCompiler> SharedTrampolineRequests;
545545

546546
private:
547547
enum {

src/hotspot/share/cds/aotArtifactFinder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#include "oops/instanceKlass.hpp"
3838
#include "oops/objArrayKlass.hpp"
3939
#include "oops/trainingData.hpp"
40-
#include "utilities/resourceHash.hpp"
40+
#include "utilities/hashTable.hpp"
4141

4242
// All the classes that should be included in the AOT cache (in at least the "allocated" state)
4343
static GrowableArrayCHeap<Klass*, mtClassShared>* _all_cached_classes = nullptr;
@@ -47,7 +47,7 @@ static GrowableArrayCHeap<Klass*, mtClassShared>* _all_cached_classes = nullptr;
4747
static GrowableArrayCHeap<InstanceKlass*, mtClassShared>* _pending_aot_inited_classes = nullptr;
4848

4949
static const int TABLE_SIZE = 15889; // prime number
50-
using ClassesTable = ResourceHashtable<Klass*, bool, TABLE_SIZE, AnyObj::C_HEAP, mtClassShared>;
50+
using ClassesTable = HashTable<Klass*, bool, TABLE_SIZE, AnyObj::C_HEAP, mtClassShared>;
5151
static ClassesTable* _seen_classes; // all classes that have been seen by AOTArtifactFinder
5252
static ClassesTable* _aot_inited_classes; // all classes that need to be AOT-initialized.
5353

src/hotspot/share/cds/aotClassLinker.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#include "oops/oopsHierarchy.hpp"
3232
#include "utilities/exceptions.hpp"
3333
#include "utilities/growableArray.hpp"
34+
#include "utilities/hashTable.hpp"
3435
#include "utilities/macros.hpp"
35-
#include "utilities/resourceHash.hpp"
3636

3737
class AOTLinkedClassTable;
3838
class InstanceKlass;
@@ -69,7 +69,7 @@ enum class AOTLinkedClassCategory : int;
6969
//
7070
class AOTClassLinker : AllStatic {
7171
static const int TABLE_SIZE = 15889; // prime number
72-
using ClassesTable = ResourceHashtable<InstanceKlass*, bool, TABLE_SIZE, AnyObj::C_HEAP, mtClassShared>;
72+
using ClassesTable = HashTable<InstanceKlass*, bool, TABLE_SIZE, AnyObj::C_HEAP, mtClassShared>;
7373

7474
// Classes loaded inside vmClasses::resolve_all()
7575
static ClassesTable* _vm_classes;

src/hotspot/share/cds/aotConstantPoolResolver.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#include "oops/oopsHierarchy.hpp"
3232
#include "runtime/handles.hpp"
3333
#include "utilities/exceptions.hpp"
34+
#include "utilities/hashTable.hpp"
3435
#include "utilities/macros.hpp"
35-
#include "utilities/resourceHash.hpp"
3636

3737
class ConstantPool;
3838
class constantPoolHandle;
@@ -53,7 +53,7 @@ template <typename T> class GrowableArray;
5353
// if all of its supertypes are loaded from the CDS archive.
5454
class AOTConstantPoolResolver : AllStatic {
5555
static const int TABLE_SIZE = 15889; // prime number
56-
using ClassesTable = ResourceHashtable<InstanceKlass*, bool, TABLE_SIZE, AnyObj::C_HEAP, mtClassShared> ;
56+
using ClassesTable = HashTable<InstanceKlass*, bool, TABLE_SIZE, AnyObj::C_HEAP, mtClassShared> ;
5757
static ClassesTable* _processed_classes;
5858

5959
#ifdef ASSERT

src/hotspot/share/cds/aotReferenceObjSupport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
#include "oops/oopHandle.inline.hpp"
3636
#include "runtime/fieldDescriptor.inline.hpp"
3737
#include "runtime/javaCalls.hpp"
38-
#include "utilities/resourceHash.hpp"
38+
#include "utilities/hashTable.hpp"
3939

4040
// Handling of java.lang.ref.Reference objects in the AOT cache
4141
// ============================================================
@@ -92,7 +92,7 @@
9292

9393
#if INCLUDE_CDS_JAVA_HEAP
9494

95-
class KeepAliveObjectsTable : public ResourceHashtable<oop, bool,
95+
class KeepAliveObjectsTable : public HashTable<oop, bool,
9696
36137, // prime number
9797
AnyObj::C_HEAP,
9898
mtClassShared,

src/hotspot/share/cds/archiveBuilder.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
#include "runtime/os.hpp"
3737
#include "utilities/bitMap.hpp"
3838
#include "utilities/growableArray.hpp"
39-
#include "utilities/resizeableResourceHash.hpp"
40-
#include "utilities/resourceHash.hpp"
39+
#include "utilities/hashTable.hpp"
40+
#include "utilities/resizableHashTable.hpp"
4141

4242
class ArchiveHeapInfo;
4343
class CHeapBitMap;
@@ -229,8 +229,8 @@ class ArchiveBuilder : public StackObj {
229229

230230
SourceObjList _rw_src_objs; // objs to put in rw region
231231
SourceObjList _ro_src_objs; // objs to put in ro region
232-
ResizeableResourceHashtable<address, SourceObjInfo, AnyObj::C_HEAP, mtClassShared> _src_obj_table;
233-
ResizeableResourceHashtable<address, address, AnyObj::C_HEAP, mtClassShared> _buffered_to_src_table;
232+
ResizeableHashTable<address, SourceObjInfo, AnyObj::C_HEAP, mtClassShared> _src_obj_table;
233+
ResizeableHashTable<address, address, AnyObj::C_HEAP, mtClassShared> _buffered_to_src_table;
234234
GrowableArray<Klass*>* _klasses;
235235
GrowableArray<Symbol*>* _symbols;
236236
unsigned int _entropy_seed;

src/hotspot/share/cds/archiveHeapLoader.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,10 +348,10 @@ bool ArchiveHeapLoader::load_heap_region(FileMapInfo* mapinfo) {
348348
}
349349

350350
class VerifyLoadedHeapEmbeddedPointers: public BasicOopIterateClosure {
351-
ResourceHashtable<uintptr_t, bool>* _table;
351+
HashTable<uintptr_t, bool>* _table;
352352

353353
public:
354-
VerifyLoadedHeapEmbeddedPointers(ResourceHashtable<uintptr_t, bool>* table) : _table(table) {}
354+
VerifyLoadedHeapEmbeddedPointers(HashTable<uintptr_t, bool>* table) : _table(table) {}
355355

356356
virtual void do_oop(narrowOop* p) {
357357
// This should be called before the loaded region is modified, so all the embedded pointers
@@ -411,7 +411,7 @@ void ArchiveHeapLoader::verify_loaded_heap() {
411411
log_info(aot, heap)("Verify all oops and pointers in loaded heap");
412412

413413
ResourceMark rm;
414-
ResourceHashtable<uintptr_t, bool> table;
414+
HashTable<uintptr_t, bool> table;
415415
VerifyLoadedHeapEmbeddedPointers verifier(&table);
416416
HeapWord* bottom = (HeapWord*)_loaded_heap_bottom;
417417
HeapWord* top = (HeapWord*)_loaded_heap_top;

src/hotspot/share/cds/archiveHeapWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ ArchiveHeapWriter::BufferOffsetToSourceObjectTable*
7070
ArchiveHeapWriter::_buffer_offset_to_source_obj_table = nullptr;
7171

7272

73-
typedef ResourceHashtable<
73+
typedef HashTable<
7474
size_t, // offset of a filler from ArchiveHeapWriter::buffer_bottom()
7575
size_t, // size of this filler (in bytes)
7676
127, // prime number

src/hotspot/share/cds/archiveHeapWriter.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
#include "utilities/bitMap.hpp"
3333
#include "utilities/exceptions.hpp"
3434
#include "utilities/growableArray.hpp"
35+
#include "utilities/hashTable.hpp"
3536
#include "utilities/macros.hpp"
36-
#include "utilities/resourceHash.hpp"
3737

3838
class MemRegion;
3939

@@ -152,7 +152,7 @@ class ArchiveHeapWriter : AllStatic {
152152
};
153153
static GrowableArrayCHeap<HeapObjOrder, mtClassShared>* _source_objs_order;
154154

155-
typedef ResizeableResourceHashtable<size_t, oop,
155+
typedef ResizeableHashTable<size_t, oop,
156156
AnyObj::C_HEAP,
157157
mtClassShared> BufferOffsetToSourceObjectTable;
158158
static BufferOffsetToSourceObjectTable* _buffer_offset_to_source_obj_table;

src/hotspot/share/cds/cdsHeapVerifier.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include "cds/heapShared.hpp"
2929
#include "memory/iterator.hpp"
3030
#include "utilities/growableArray.hpp"
31-
#include "utilities/resourceHash.hpp"
31+
#include "utilities/hashTable.hpp"
3232

3333
class InstanceKlass;
3434
class Symbol;
@@ -47,7 +47,7 @@ class CDSHeapVerifier : public KlassClosure {
4747
Symbol* _name;
4848
};
4949

50-
ResourceHashtable<oop, StaticFieldInfo,
50+
HashTable<oop, StaticFieldInfo,
5151
15889, // prime number
5252
AnyObj::C_HEAP,
5353
mtClassShared,
@@ -79,7 +79,7 @@ class CDSHeapVerifier : public KlassClosure {
7979
// Overrides KlassClosure::do_klass()
8080
virtual void do_klass(Klass* k);
8181

82-
// For ResourceHashtable::iterate()
82+
// For HashTable::iterate()
8383
inline bool do_entry(oop& orig_obj, HeapShared::CachedOopInfo& value);
8484

8585
static void verify();

0 commit comments

Comments
 (0)