src/share/vm/gc_implementation/g1/concurrentG1RefineThread.hpp

Thu, 14 Jun 2018 09:15:08 -0700

author
kevinw
date
Thu, 14 Jun 2018 09:15:08 -0700
changeset 9327
f96fcd9e1e1b
parent 6930
570cb6369f17
child 7535
7ae4e26cb1e0
permissions
-rw-r--r--

8081202: Hotspot compile warning: "Invalid suffix on literal; C++11 requires a space between literal and identifier"
Summary: Need to add a space between macro identifier and string literal
Reviewed-by: bpittore, stefank, dholmes, kbarrett

ysr@777 1 /*
stefank@2314 2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
ysr@777 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
ysr@777 4 *
ysr@777 5 * This code is free software; you can redistribute it and/or modify it
ysr@777 6 * under the terms of the GNU General Public License version 2 only, as
ysr@777 7 * published by the Free Software Foundation.
ysr@777 8 *
ysr@777 9 * This code is distributed in the hope that it will be useful, but WITHOUT
ysr@777 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
ysr@777 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
ysr@777 12 * version 2 for more details (a copy is included in the LICENSE file that
ysr@777 13 * accompanied this code).
ysr@777 14 *
ysr@777 15 * You should have received a copy of the GNU General Public License version
ysr@777 16 * 2 along with this work; if not, write to the Free Software Foundation,
ysr@777 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ysr@777 18 *
trims@1907 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 20 * or visit www.oracle.com if you need additional information or have any
trims@1907 21 * questions.
ysr@777 22 *
ysr@777 23 */
ysr@777 24
stefank@2314 25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTG1REFINETHREAD_HPP
stefank@2314 26 #define SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTG1REFINETHREAD_HPP
stefank@2314 27
stefank@2314 28 #include "gc_implementation/shared/concurrentGCThread.hpp"
stefank@2314 29
ysr@777 30 // Forward Decl.
tschatzl@6930 31 class CardTableEntryClosure;
ysr@777 32 class ConcurrentG1Refine;
ysr@777 33
ysr@777 34 // The G1 Concurrent Refinement Thread (could be several in the future).
ysr@777 35
ysr@777 36 class ConcurrentG1RefineThread: public ConcurrentGCThread {
ysr@777 37 friend class VMStructs;
ysr@777 38 friend class G1CollectedHeap;
ysr@777 39
ysr@777 40 double _vtime_start; // Initial virtual time.
ysr@777 41 double _vtime_accum; // Initial virtual time.
vkempik@6552 42 uint _worker_id;
vkempik@6552 43 uint _worker_id_offset;
ysr@777 44
iveresov@1229 45 // The refinement threads collection is linked list. A predecessor can activate a successor
iveresov@1229 46 // when the number of the rset update buffer crosses a certain threshold. A successor
iveresov@1229 47 // would self-deactivate when the number of the buffers falls below the threshold.
iveresov@1229 48 bool _active;
iveresov@1546 49 ConcurrentG1RefineThread* _next;
iveresov@1546 50 Monitor* _monitor;
iveresov@1546 51 ConcurrentG1Refine* _cg1r;
ysr@777 52
tschatzl@6930 53 // The closure applied to completed log buffers.
tschatzl@6930 54 CardTableEntryClosure* _refine_closure;
tschatzl@6930 55
iveresov@1546 56 int _thread_threshold_step;
iveresov@1546 57 // This thread activation threshold
iveresov@1546 58 int _threshold;
iveresov@1546 59 // This thread deactivation threshold
iveresov@1546 60 int _deactivation_threshold;
iveresov@1229 61
iveresov@1546 62 void sample_young_list_rs_lengths();
iveresov@1546 63 void run_young_rs_sampling();
iveresov@1546 64 void wait_for_completed_buffers();
ysr@777 65
iveresov@1546 66 void set_active(bool x) { _active = x; }
iveresov@1546 67 bool is_active();
iveresov@1546 68 void activate();
iveresov@1546 69 void deactivate();
ysr@777 70
iveresov@1546 71 public:
iveresov@1546 72 virtual void run();
ysr@777 73 // Constructor
iveresov@1230 74 ConcurrentG1RefineThread(ConcurrentG1Refine* cg1r, ConcurrentG1RefineThread* next,
tschatzl@6930 75 CardTableEntryClosure* refine_closure,
vkempik@6552 76 uint worker_id_offset, uint worker_id);
ysr@777 77
iveresov@1546 78 void initialize();
iveresov@1546 79
ysr@777 80 // Printing
tonyp@1454 81 void print() const;
tonyp@1454 82 void print_on(outputStream* st) const;
ysr@777 83
ysr@777 84 // Total virtual time so far.
ysr@777 85 double vtime_accum() { return _vtime_accum; }
ysr@777 86
iveresov@1546 87 ConcurrentG1Refine* cg1r() { return _cg1r; }
ysr@777 88
ysr@777 89 // shutdown
iveresov@1229 90 void stop();
ysr@777 91 };
stefank@2314 92
stefank@2314 93 #endif // SHARE_VM_GC_IMPLEMENTATION_G1_CONCURRENTG1REFINETHREAD_HPP

mercurial