comparison src/share/vm/runtime/safepoint.hpp @ 14309:63a4eb8bcd23

8025856: Fix typos in the GC code Summary: Fix about 440 typos in comments in the VM code Reviewed-by: mgerdin, tschatzl, coleenp, kmo, jcoomes
author jwilhelm
date Thu, 23 Jan 2014 14:47:23 +0100
parents d2a62e0f25eb
children 4ca6dc0799b6
comparison
equal deleted inserted replaced
14308:870aedf4ba4f 14309:63a4eb8bcd23
57 // 57 //
58 class SafepointSynchronize : AllStatic { 58 class SafepointSynchronize : AllStatic {
59 public: 59 public:
60 enum SynchronizeState { 60 enum SynchronizeState {
61 _not_synchronized = 0, // Threads not synchronized at a safepoint 61 _not_synchronized = 0, // Threads not synchronized at a safepoint
62 // Keep this value 0. See the coment in do_call_back() 62 // Keep this value 0. See the comment in do_call_back()
63 _synchronizing = 1, // Synchronizing in progress 63 _synchronizing = 1, // Synchronizing in progress
64 _synchronized = 2 // All Java threads are stopped at a safepoint. Only VM thread is running 64 _synchronized = 2 // All Java threads are stopped at a safepoint. Only VM thread is running
65 }; 65 };
66 66
67 enum SafepointingThread { 67 enum SafepointingThread {
89 jlong _time_to_sync; // total time in millis spent in getting to _synchronized 89 jlong _time_to_sync; // total time in millis spent in getting to _synchronized
90 jlong _time_to_exec_vmop; // total time in millis spent in vm operation itself 90 jlong _time_to_exec_vmop; // total time in millis spent in vm operation itself
91 } SafepointStats; 91 } SafepointStats;
92 92
93 private: 93 private:
94 static volatile SynchronizeState _state; // Threads might read this flag directly, without acquireing the Threads_lock 94 static volatile SynchronizeState _state; // Threads might read this flag directly, without acquiring the Threads_lock
95 static volatile int _waiting_to_block; // number of threads we are waiting for to block 95 static volatile int _waiting_to_block; // number of threads we are waiting for to block
96 static int _current_jni_active_count; // Counts the number of active critical natives during the safepoint 96 static int _current_jni_active_count; // Counts the number of active critical natives during the safepoint
97 97
98 // This counter is used for fast versions of jni_Get<Primitive>Field. 98 // This counter is used for fast versions of jni_Get<Primitive>Field.
99 // An even value means there is no ongoing safepoint operations. 99 // An even value means there is no ongoing safepoint operations.
104 public: 104 public:
105 static volatile int _safepoint_counter; 105 static volatile int _safepoint_counter;
106 private: 106 private:
107 static long _end_of_last_safepoint; // Time of last safepoint in milliseconds 107 static long _end_of_last_safepoint; // Time of last safepoint in milliseconds
108 108
109 // statistics 109 // Statistics
110 static jlong _safepoint_begin_time; // time when safepoint begins 110 static jlong _safepoint_begin_time; // time when safepoint begins
111 static SafepointStats* _safepoint_stats; // array of SafepointStats struct 111 static SafepointStats* _safepoint_stats; // array of SafepointStats struct
112 static int _cur_stat_index; // current index to the above array 112 static int _cur_stat_index; // current index to the above array
113 static julong _safepoint_reasons[]; // safepoint count for each VM op 113 static julong _safepoint_reasons[]; // safepoint count for each VM op
114 static julong _coalesced_vmop_count; // coalesced vmop count 114 static julong _coalesced_vmop_count; // coalesced vmop count
153 inline static void increment_jni_active_count() { 153 inline static void increment_jni_active_count() {
154 assert_locked_or_safepoint(Safepoint_lock); 154 assert_locked_or_safepoint(Safepoint_lock);
155 _current_jni_active_count++; 155 _current_jni_active_count++;
156 } 156 }
157 157
158 // Called when a thread volantary blocks 158 // Called when a thread voluntarily blocks
159 static void block(JavaThread *thread); 159 static void block(JavaThread *thread);
160 static void signal_thread_at_safepoint() { _waiting_to_block--; } 160 static void signal_thread_at_safepoint() { _waiting_to_block--; }
161 161
162 // Exception handling for page polling 162 // Exception handling for page polling
163 static void handle_polling_page_exception(JavaThread *thread); 163 static void handle_polling_page_exception(JavaThread *thread);
170 return _end_of_last_safepoint; 170 return _end_of_last_safepoint;
171 } 171 }
172 static bool is_cleanup_needed(); 172 static bool is_cleanup_needed();
173 static void do_cleanup_tasks(); 173 static void do_cleanup_tasks();
174 174
175 // debugging 175 // Debugging
176 static void print_state() PRODUCT_RETURN; 176 static void print_state() PRODUCT_RETURN;
177 static void safepoint_msg(const char* format, ...) PRODUCT_RETURN; 177 static void safepoint_msg(const char* format, ...) PRODUCT_RETURN;
178 178
179 static void deferred_initialize_stat(); 179 static void deferred_initialize_stat();
180 static void print_stat_on_exit(); 180 static void print_stat_on_exit();
181 inline static void inc_vmop_coalesced_count() { _coalesced_vmop_count++; } 181 inline static void inc_vmop_coalesced_count() { _coalesced_vmop_count++; }
182 182
183 static void set_is_at_safepoint() { _state = _synchronized; } 183 static void set_is_at_safepoint() { _state = _synchronized; }
184 static void set_is_not_at_safepoint() { _state = _not_synchronized; } 184 static void set_is_not_at_safepoint() { _state = _not_synchronized; }
185 185
186 // assembly support 186 // Assembly support
187 static address address_of_state() { return (address)&_state; } 187 static address address_of_state() { return (address)&_state; }
188 188
189 static address safepoint_counter_addr() { return (address)&_safepoint_counter; } 189 static address safepoint_counter_addr() { return (address)&_safepoint_counter; }
190 }; 190 };
191 191