8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_GC_G1_G1CONCURRENTSTARTTOMIXEDTIMETRACKER_HPP
26 #define SHARE_GC_G1_G1CONCURRENTSTARTTOMIXEDTIMETRACKER_HPP
27
28 #include "utilities/globalDefinitions.hpp"
29 #include "utilities/debug.hpp"
30
31 // Used to track time from the end of concurrent start to the first mixed GC.
32 // After calling the concurrent start/mixed gc notifications, the result can be
33 // obtained in last_marking_time() once, after which the tracking resets.
34 // Any pauses recorded by add_pause() will be subtracted from that results.
35 class G1ConcurrentStartToMixedTimeTracker {
36 private:
37 bool _active;
38 double _concurrent_start_end_time;
39 double _mixed_start_time;
40 double _total_pause_time;
41
42 double wall_time() const {
43 return _mixed_start_time - _concurrent_start_end_time;
44 }
45 public:
46 G1ConcurrentStartToMixedTimeTracker() { reset(); }
47
48 // Record concurrent start pause end, starting the time tracking.
49 void record_concurrent_start_end(double end_time) {
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #ifndef SHARE_GC_G1_G1CONCURRENTSTARTTOMIXEDTIMETRACKER_HPP
26 #define SHARE_GC_G1_G1CONCURRENTSTARTTOMIXEDTIMETRACKER_HPP
27
28 #include "utilities/debug.hpp"
29 #include "utilities/globalDefinitions.hpp"
30
31 // Used to track time from the end of concurrent start to the first mixed GC.
32 // After calling the concurrent start/mixed gc notifications, the result can be
33 // obtained in last_marking_time() once, after which the tracking resets.
34 // Any pauses recorded by add_pause() will be subtracted from that results.
35 class G1ConcurrentStartToMixedTimeTracker {
36 private:
37 bool _active;
38 double _concurrent_start_end_time;
39 double _mixed_start_time;
40 double _total_pause_time;
41
42 double wall_time() const {
43 return _mixed_start_time - _concurrent_start_end_time;
44 }
45 public:
46 G1ConcurrentStartToMixedTimeTracker() { reset(); }
47
48 // Record concurrent start pause end, starting the time tracking.
49 void record_concurrent_start_end(double end_time) {
|