src/share/vm/runtime/safepoint.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/runtime/safepoint.hpp Wed Jan 15 01:42:52 2014
--- new/src/share/vm/runtime/safepoint.hpp Wed Jan 15 01:42:52 2014
*** 57,67 ****
--- 57,67 ----
//
class SafepointSynchronize : AllStatic {
public:
enum SynchronizeState {
_not_synchronized = 0, // Threads not synchronized at a safepoint
! // Keep this value 0. See the coment in do_call_back()
! // Keep this value 0. See the comment in do_call_back()
_synchronizing = 1, // Synchronizing in progress
_synchronized = 2 // All Java threads are stopped at a safepoint. Only VM thread is running
};
enum SafepointingThread {
*** 89,99 ****
--- 89,99 ----
jlong _time_to_sync; // total time in millis spent in getting to _synchronized
jlong _time_to_exec_vmop; // total time in millis spent in vm operation itself
} SafepointStats;
private:
! static volatile SynchronizeState _state; // Threads might read this flag directly, without acquireing the Threads_lock
! static volatile SynchronizeState _state; // Threads might read this flag directly, without acquiring the Threads_lock
static volatile int _waiting_to_block; // number of threads we are waiting for to block
static int _current_jni_active_count; // Counts the number of active critical natives during the safepoint
// This counter is used for fast versions of jni_Get<Primitive>Field.
// An even value means there is no ongoing safepoint operations.
*** 104,114 ****
--- 104,114 ----
public:
static volatile int _safepoint_counter;
private:
static long _end_of_last_safepoint; // Time of last safepoint in milliseconds
// statistics
+ // Statistics
static jlong _safepoint_begin_time; // time when safepoint begins
static SafepointStats* _safepoint_stats; // array of SafepointStats struct
static int _cur_stat_index; // current index to the above array
static julong _safepoint_reasons[]; // safepoint count for each VM op
static julong _coalesced_vmop_count; // coalesced vmop count
*** 153,163 ****
--- 153,163 ----
inline static void increment_jni_active_count() {
assert_locked_or_safepoint(Safepoint_lock);
_current_jni_active_count++;
}
! // Called when a thread volantary blocks
! // Called when a thread voluntarily blocks
static void block(JavaThread *thread);
static void signal_thread_at_safepoint() { _waiting_to_block--; }
// Exception handling for page polling
static void handle_polling_page_exception(JavaThread *thread);
*** 170,191 ****
--- 170,191 ----
return _end_of_last_safepoint;
}
static bool is_cleanup_needed();
static void do_cleanup_tasks();
// debugging
+ // Debugging
static void print_state() PRODUCT_RETURN;
static void safepoint_msg(const char* format, ...) PRODUCT_RETURN;
static void deferred_initialize_stat();
static void print_stat_on_exit();
inline static void inc_vmop_coalesced_count() { _coalesced_vmop_count++; }
static void set_is_at_safepoint() { _state = _synchronized; }
static void set_is_not_at_safepoint() { _state = _not_synchronized; }
! // assembly support
! // Assembly support
static address address_of_state() { return (address)&_state; }
static address safepoint_counter_addr() { return (address)&_safepoint_counter; }
};
src/share/vm/runtime/safepoint.hpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File