Skip to content

Commit a0707cc

Browse files
author
duke
committedJun 27, 2021
Automatic merge of jdk:master into master
2 parents 3b334ea + 8bed353 commit a0707cc

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed
 

‎src/hotspot/share/classfile/placeholders.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -43,21 +43,21 @@
4343
// result the first thread gets.
4444
class SeenThread: public CHeapObj<mtInternal> {
4545
private:
46-
Thread *_thread;
46+
JavaThread* _thread;
4747
SeenThread* _stnext;
4848
SeenThread* _stprev;
4949
public:
50-
SeenThread(Thread *thread) {
50+
SeenThread(JavaThread* thread) {
5151
_thread = thread;
5252
_stnext = NULL;
5353
_stprev = NULL;
5454
}
55-
Thread* thread() const { return _thread;}
56-
void set_thread(Thread *thread) { _thread = thread; }
55+
JavaThread* thread() const { return _thread;}
56+
void set_thread(JavaThread* thread) { _thread = thread; }
5757

58-
SeenThread* next() const { return _stnext;}
59-
void set_next(SeenThread *seen) { _stnext = seen; }
60-
void set_prev(SeenThread *seen) { _stprev = seen; }
58+
SeenThread* next() const { return _stnext;}
59+
void set_next(SeenThread* seen) { _stnext = seen; }
60+
void set_prev(SeenThread* seen) { _stprev = seen; }
6161

6262
void print_action_queue(outputStream* st) {
6363
SeenThread* seen = this;
@@ -107,7 +107,7 @@ void PlaceholderEntry::set_threadQ(SeenThread* seenthread, PlaceholderTable::cla
107107
// bootstrap loader support: links in a thread before load_instance_class
108108
// definers: use as queue of define requestors, including owner of
109109
// define token. Appends for debugging of requestor order
110-
void PlaceholderEntry::add_seen_thread(Thread* thread, PlaceholderTable::classloadAction action) {
110+
void PlaceholderEntry::add_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action) {
111111
assert_lock_strong(SystemDictionary_lock);
112112
SeenThread* threadEntry = new SeenThread(thread);
113113
SeenThread* seen = actionToQueue(action);
@@ -128,7 +128,7 @@ void PlaceholderEntry::add_seen_thread(Thread* thread, PlaceholderTable::classlo
128128
return;
129129
}
130130

131-
bool PlaceholderEntry::check_seen_thread(Thread* thread, PlaceholderTable::classloadAction action) {
131+
bool PlaceholderEntry::check_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action) {
132132
assert_lock_strong(SystemDictionary_lock);
133133
SeenThread* threadQ = actionToQueue(action);
134134
SeenThread* seen = threadQ;
@@ -146,7 +146,7 @@ bool PlaceholderEntry::check_seen_thread(Thread* thread, PlaceholderTable::class
146146
// SystemDictionary_lock
147147
// ignores if cleanup has already been done
148148
// if found, deletes SeenThread
149-
bool PlaceholderEntry::remove_seen_thread(Thread* thread, PlaceholderTable::classloadAction action) {
149+
bool PlaceholderEntry::remove_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action) {
150150
assert_lock_strong(SystemDictionary_lock);
151151
SeenThread* threadQ = actionToQueue(action);
152152
SeenThread* seen = threadQ;
@@ -288,7 +288,7 @@ PlaceholderEntry* PlaceholderTable::find_and_add(unsigned int hash,
288288
ClassLoaderData* loader_data,
289289
classloadAction action,
290290
Symbol* supername,
291-
Thread* thread) {
291+
JavaThread* thread) {
292292
assert(action != LOAD_SUPER || supername != NULL, "must have a super class name");
293293
PlaceholderEntry* probe = get_entry(hash, name, loader_data);
294294
if (probe == NULL) {
@@ -321,7 +321,7 @@ PlaceholderEntry* PlaceholderTable::find_and_add(unsigned int hash,
321321
void PlaceholderTable::find_and_remove(unsigned int hash,
322322
Symbol* name, ClassLoaderData* loader_data,
323323
classloadAction action,
324-
Thread* thread) {
324+
JavaThread* thread) {
325325
assert_locked_or_safepoint(SystemDictionary_lock);
326326
PlaceholderEntry *probe = get_entry(hash, name, loader_data);
327327
if (probe != NULL) {

‎src/hotspot/share/classfile/placeholders.hpp

+9-9
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class PlaceholderTable : public Hashtable<Symbol*, mtClass> {
8585
PlaceholderEntry* find_and_add(unsigned int hash,
8686
Symbol* name, ClassLoaderData* loader_data,
8787
classloadAction action, Symbol* supername,
88-
Thread* thread);
88+
JavaThread* thread);
8989

9090
void remove_entry(unsigned int hash,
9191
Symbol* name, ClassLoaderData* loader_data);
@@ -94,7 +94,7 @@ class PlaceholderTable : public Hashtable<Symbol*, mtClass> {
9494
// If all queues are empty and definer is null, remove the PlacheholderEntry completely
9595
void find_and_remove(unsigned int hash,
9696
Symbol* name, ClassLoaderData* loader_data,
97-
classloadAction action, Thread* thread);
97+
classloadAction action, JavaThread* thread);
9898

9999
void print_on(outputStream* st) const;
100100
void print() const;
@@ -116,7 +116,7 @@ class PlaceholderEntry : public HashtableEntry<Symbol*, mtClass> {
116116
private:
117117
ClassLoaderData* _loader_data; // initiating loader
118118
Symbol* _supername;
119-
Thread* _definer; // owner of define token
119+
JavaThread* _definer; // owner of define token
120120
InstanceKlass* _instanceKlass; // InstanceKlass from successful define
121121
SeenThread* _superThreadQ; // doubly-linked queue of Threads loading a superclass for this class
122122
SeenThread* _loadInstanceThreadQ; // loadInstance thread
@@ -130,8 +130,8 @@ class PlaceholderEntry : public HashtableEntry<Symbol*, mtClass> {
130130

131131
SeenThread* actionToQueue(PlaceholderTable::classloadAction action);
132132
void set_threadQ(SeenThread* seenthread, PlaceholderTable::classloadAction action);
133-
void add_seen_thread(Thread* thread, PlaceholderTable::classloadAction action);
134-
bool remove_seen_thread(Thread* thread, PlaceholderTable::classloadAction action);
133+
void add_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action);
134+
bool remove_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action);
135135

136136
public:
137137
// Simple accessors, used only by SystemDictionary
@@ -146,8 +146,8 @@ class PlaceholderEntry : public HashtableEntry<Symbol*, mtClass> {
146146
if (_supername != NULL) _supername->increment_refcount();
147147
}
148148

149-
Thread* definer() const {return _definer; }
150-
void set_definer(Thread* definer) { _definer = definer; }
149+
JavaThread* definer() const {return _definer; }
150+
void set_definer(JavaThread* definer) { _definer = definer; }
151151

152152
InstanceKlass* instance_klass() const {return _instanceKlass; }
153153
void set_instance_klass(InstanceKlass* ik) { _instanceKlass = ik; }
@@ -158,7 +158,7 @@ class PlaceholderEntry : public HashtableEntry<Symbol*, mtClass> {
158158
SeenThread* loadInstanceThreadQ() const { return _loadInstanceThreadQ; }
159159
void set_loadInstanceThreadQ(SeenThread* SeenThread) { _loadInstanceThreadQ = SeenThread; }
160160

161-
SeenThread* defineThreadQ() const { return _defineThreadQ; }
161+
SeenThread* defineThreadQ() const { return _defineThreadQ; }
162162
void set_defineThreadQ(SeenThread* SeenThread) { _defineThreadQ = SeenThread; }
163163

164164
PlaceholderEntry* next() const {
@@ -188,7 +188,7 @@ class PlaceholderEntry : public HashtableEntry<Symbol*, mtClass> {
188188
}
189189

190190
// Used for ClassCircularityError checking
191-
bool check_seen_thread(Thread* thread, PlaceholderTable::classloadAction action);
191+
bool check_seen_thread(JavaThread* thread, PlaceholderTable::classloadAction action);
192192

193193
// Print method doesn't append a cr
194194
void print_entry(outputStream* st) const;

0 commit comments

Comments
 (0)
Please sign in to comment.