Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the eetop field on Thread for?

Tags:

java

I can find no documentation and only the following discussion which is not very clear on what it's for.

like image 839
Nitsan Wakart Avatar asked Jun 14 '13 08:06

Nitsan Wakart


1 Answers

Note: JDK1.1 and before had a privateInfo_offset field which was used for the platform thread structure, and a eetop offset which was used for thread local storage (and unused by the HotSpot VM). In JDK1.2 the two structures merged, so in the HotSpot VM we just use the eetop field for the thread instead of the privateInfo_offset.

It the JRE source, it is a pointer to the underlying OS-level native thread instance of the JVM (ref). In the latest JDK source, the file hotspot/src/share/vm/classfile/javaClasses.cpp still contains the field, and also the comment is there.

In the corresponding java class, (jdk/src/share/classes/java/lang/Thread.java), it is declared as private long (probably because Java doesn't know pointers).

like image 198
peterh Avatar answered Oct 07 '22 01:10

peterh