< prev index next >
src/share/vm/runtime/thread.hpp
Print this page
rev 8802 : G1 performance improvements: card batching, joining, sorting, prefetching and write barrier fence elision and simplification based on a global syncrhonization using handshakes piggybacking on thread-local safepoints.
rev 8803 : Implementation improvements to pass JPRT
*** 99,108 ****
--- 99,111 ----
// - JavaThread
// - WatcherThread
class Thread: public ThreadShadow {
friend class VMStructs;
+ friend class Threads;
+ friend class ScanHazardPointerThreadClosure;
+ friend class ScanHazardPointerThreadsClosure;
private:
// Exception handling
// (Note: _pending_exception and friends are in ThreadShadow)
//oop _pending_exception; // pending exception for current thread
// const char* _exception_file; // file information for exception (debugging only)
*** 235,244 ****
--- 238,249 ----
// The parity of the last strong_roots iteration in which this thread was
// claimed as a task.
jint _oops_do_parity;
+ JavaThread **volatile _java_threads_do_hp;
+
public:
void set_last_handle_mark(HandleMark* mark) { _last_handle_mark = mark; }
HandleMark* last_handle_mark() const { return _last_handle_mark; }
private:
*** 586,595 ****
--- 591,602 ----
// Code generation
static ByteSize exception_file_offset() { return byte_offset_of(Thread, _exception_file); }
static ByteSize exception_line_offset() { return byte_offset_of(Thread, _exception_line); }
static ByteSize active_handles_offset() { return byte_offset_of(Thread, _active_handles); }
+ static ByteSize yieldpoint_offset() { return byte_offset_of(Thread, _yieldpoint_poll); }
+
static ByteSize stack_base_offset() { return byte_offset_of(Thread, _stack_base); }
static ByteSize stack_size_offset() { return byte_offset_of(Thread, _stack_size); }
#define TLAB_FIELD_OFFSET(name) \
static ByteSize tlab_##name##_offset() { return byte_offset_of(Thread, _tlab) + ThreadLocalAllocBuffer::name##_offset(); }
*** 934,943 ****
--- 941,963 ----
const char* _file;
int _line;
} _jmp_ring[jump_ring_buffer_size];
#endif // PRODUCT
+ private:
+ volatile int _serialized_memory_version;
+ volatile bool _force_yield;
+
+ public:
+ int serialized_memory_version() { return _serialized_memory_version; }
+ void update_serialized_memory_version();
+
+ void set_force_yield() { _force_yield = true; }
+
+ bool is_online_vm();
+ bool is_online_os();
+
#if INCLUDE_ALL_GCS
// Support for G1 barriers
ObjPtrQueue _satb_mark_queue; // Thread-local log for SATB barrier.
// Set of all such queues.
*** 1865,1894 ****
--- 1885,1923 ----
// thread priorities.
class Threads: AllStatic {
friend class VMStructs;
private:
static JavaThread* _thread_list;
+ static JavaThread* _thread_smr_list;
+ static JavaThread** _thread_smr_list_list;
static int _number_of_threads;
static int _number_of_non_daemon_threads;
static int _return_code;
static int _thread_claim_parity;
#ifdef ASSERT
static bool _vm_complete;
#endif
+ static JavaThread **volatile _fast_java_thread_list;
+
static void initialize_java_lang_classes(JavaThread* main_thread, TRAPS);
static void initialize_jsr292_core_classes(TRAPS);
+ static JavaThread *smr_free_work(JavaThread *thread);
+ static void smr_free_list(JavaThread **threads);
public:
// Thread management
// force_daemon is a concession to JNI, where we may need to add a
// thread to the thread list before allocating its thread object
static void add(JavaThread* p, bool force_daemon = false);
static void remove(JavaThread* p);
static bool includes(JavaThread* p);
static JavaThread* first() { return _thread_list; }
static void threads_do(ThreadClosure* tc);
+ static void java_threads_do_fast(ThreadClosure *tc, Thread *self);
+ static void smr_free(JavaThread *thread, bool have_lock);
+
// Initializes the vm and creates the vm thread
static jint create_vm(JavaVMInitArgs* args, bool* canTryAgain);
static void convert_vm_init_libraries_to_agents();
static void create_vm_init_libraries();
static void create_vm_init_agents();
< prev index next >