< prev index next >
src/share/vm/runtime/timer.hpp
Print this page
rev 7854 : imported patch 8027962-per-phase-timing-measurements-for-strong-roots-processing
rev 7855 : [mq]: 8027962-bengt-suggestions
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -101,10 +101,27 @@
// Activation
void suspend() { if (_active) _t.stop(); }
void resume() { if (_active) _t.start(); }
};
+class PhaseTimeData : public StackObj {
+public:
+ virtual bool active() const = 0;
+ virtual void set_value(uint phase, double value) = 0;
+};
+
+class TrackPhaseTime : public StackObj {
+ private:
+ PhaseTimeData* _data;
+ uint _phase;
+ jlong _last;
+ public:
+ // Constructors
+ TrackPhaseTime(PhaseTimeData *data, uint phase);
+ ~TrackPhaseTime();
+};
+
class TraceCPUTime: public StackObj {
private:
bool _active; // true if times will be measured and printed
bool _print_cr; // if true print carriage return at end
double _starting_user_time; // user time at start of measurement
< prev index next >