comparison src/share/vm/gc_implementation/g1/concurrentMarkThread.hpp @ 4836:d30fa85f9994

6484965: G1: piggy-back liveness accounting phase on marking Summary: Remove the separate counting phase of concurrent marking by tracking the amount of marked bytes and the cards spanned by marked objects in marking task/worker thread local data structures, which are updated as individual objects are marked. Reviewed-by: brutisso, tonyp
author johnc
date Thu, 12 Jan 2012 00:06:47 -0800
parents f95d63e2154a
children 581e70386ec9
comparison
equal deleted inserted replaced
4835:877914d90c57 4836:d30fa85f9994
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
38 38
39 double _vtime_start; // Initial virtual time. 39 double _vtime_start; // Initial virtual time.
40 double _vtime_accum; // Accumulated virtual time. 40 double _vtime_accum; // Accumulated virtual time.
41 41
42 double _vtime_mark_accum; 42 double _vtime_mark_accum;
43 double _vtime_count_accum;
44 43
45 public: 44 public:
46 virtual void run(); 45 virtual void run();
47 46
48 private: 47 private:
67 66
68 // Total virtual time so far. 67 // Total virtual time so far.
69 double vtime_accum(); 68 double vtime_accum();
70 // Marking virtual time so far 69 // Marking virtual time so far
71 double vtime_mark_accum(); 70 double vtime_mark_accum();
72 // Counting virtual time so far.
73 double vtime_count_accum() { return _vtime_count_accum; }
74 71
75 ConcurrentMark* cm() { return _cm; } 72 ConcurrentMark* cm() { return _cm; }
76 73
77 void set_started() { assert(!_in_progress, "cycle in progress"); _started = true; } 74 void set_started() { assert(!_in_progress, "cycle in progress"); _started = true; }
78 void clear_started() { assert(_in_progress, "must be starting a cycle"); _started = false; } 75 void clear_started() { assert(_in_progress, "must be starting a cycle"); _started = false; }