提交 78a6b0c2 编写于 作者: T tonyp

7055073: G1: code cleanup in the concurrentMark.* files

Summary: Only cosmetic changes to make the concurrentMark.* more consistent, code-style-wise, with the rest of the codebase.
Reviewed-by: johnc, ysr
上级 d67c3523
...@@ -605,10 +605,10 @@ public: ...@@ -605,10 +605,10 @@ public:
void mark_stack_pop(oop* arr, int max, int* n) { void mark_stack_pop(oop* arr, int max, int* n) {
_markStack.par_pop_arr(arr, max, n); _markStack.par_pop_arr(arr, max, n);
} }
size_t mark_stack_size() { return _markStack.size(); } size_t mark_stack_size() { return _markStack.size(); }
size_t partial_mark_stack_size_target() { return _markStack.maxElems()/3; } size_t partial_mark_stack_size_target() { return _markStack.maxElems()/3; }
bool mark_stack_overflow() { return _markStack.overflow(); } bool mark_stack_overflow() { return _markStack.overflow(); }
bool mark_stack_empty() { return _markStack.isEmpty(); } bool mark_stack_empty() { return _markStack.isEmpty(); }
// (Lock-free) Manipulation of the region stack // (Lock-free) Manipulation of the region stack
bool region_stack_push_lock_free(MemRegion mr) { bool region_stack_push_lock_free(MemRegion mr) {
...@@ -833,8 +833,9 @@ public: ...@@ -833,8 +833,9 @@ public:
// _min_finger then we need to gray objects. // _min_finger then we need to gray objects.
// This routine is like registerCSetRegion but for an entire // This routine is like registerCSetRegion but for an entire
// collection of regions. // collection of regions.
if (max_finger > _min_finger) if (max_finger > _min_finger) {
_should_gray_objects = true; _should_gray_objects = true;
}
} }
// Returns "true" if at least one mark has been completed. // Returns "true" if at least one mark has been completed.
...@@ -880,14 +881,18 @@ public: ...@@ -880,14 +881,18 @@ public:
// The following indicate whether a given verbose level has been // The following indicate whether a given verbose level has been
// set. Notice that anything above stats is conditional to // set. Notice that anything above stats is conditional to
// _MARKING_VERBOSE_ having been set to 1 // _MARKING_VERBOSE_ having been set to 1
bool verbose_stats() bool verbose_stats() {
{ return _verbose_level >= stats_verbose; } return _verbose_level >= stats_verbose;
bool verbose_low() }
{ return _MARKING_VERBOSE_ && _verbose_level >= low_verbose; } bool verbose_low() {
bool verbose_medium() return _MARKING_VERBOSE_ && _verbose_level >= low_verbose;
{ return _MARKING_VERBOSE_ && _verbose_level >= medium_verbose; } }
bool verbose_high() bool verbose_medium() {
{ return _MARKING_VERBOSE_ && _verbose_level >= high_verbose; } return _MARKING_VERBOSE_ && _verbose_level >= medium_verbose;
}
bool verbose_high() {
return _MARKING_VERBOSE_ && _verbose_level >= high_verbose;
}
}; };
// A class representing a marking task. // A class representing a marking task.
...@@ -1063,8 +1068,9 @@ private: ...@@ -1063,8 +1068,9 @@ private:
// respective limit and calls reached_limit() if they have // respective limit and calls reached_limit() if they have
void check_limits() { void check_limits() {
if (_words_scanned >= _words_scanned_limit || if (_words_scanned >= _words_scanned_limit ||
_refs_reached >= _refs_reached_limit) _refs_reached >= _refs_reached_limit) {
reached_limit(); reached_limit();
}
} }
// this is supposed to be called regularly during a marking step as // this is supposed to be called regularly during a marking step as
// it checks a bunch of conditions that might cause the marking step // it checks a bunch of conditions that might cause the marking step
......
...@@ -59,8 +59,9 @@ inline void CMTask::push(oop obj) { ...@@ -59,8 +59,9 @@ inline void CMTask::push(oop obj) {
} }
statsOnly( int tmp_size = _task_queue->size(); statsOnly( int tmp_size = _task_queue->size();
if (tmp_size > _local_max_size) if (tmp_size > _local_max_size) {
_local_max_size = tmp_size; _local_max_size = tmp_size;
}
++_local_pushes ); ++_local_pushes );
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册