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 #include "precompiled.hpp"
26 #include "jfr/jfrEvents.hpp"
27 #include "jfr/leakprofiler/sampling/objectSample.hpp"
28 #include "jfr/leakprofiler/sampling/objectSampler.hpp"
29 #include "jfr/leakprofiler/sampling/sampleList.hpp"
30 #include "jfr/leakprofiler/sampling/samplePriorityQueue.hpp"
31 #include "jfr/recorder/jfrEventSetting.inline.hpp"
32 #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp"
33 #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp"
34 #include "jfr/support/jfrThreadLocal.hpp"
35 #include "jfr/utilities/jfrTryLock.hpp"
36 #include "logging/log.hpp"
37 #include "memory/universe.hpp"
38 #include "oops/oop.inline.hpp"
39 #include "runtime/atomic.hpp"
40 #include "runtime/orderAccess.hpp"
41 #include "runtime/safepoint.hpp"
42 #include "runtime/thread.hpp"
43
44 static ObjectSampler* _instance = NULL;
45
46 static ObjectSampler& instance() {
47 assert(_instance != NULL, "invariant");
48 return *_instance;
49 }
50
51 ObjectSampler::ObjectSampler(size_t size) :
52 _priority_queue(new SamplePriorityQueue(size)),
53 _list(new SampleList(size)),
54 _last_sweep(JfrTicks::now()),
55 _total_allocated(0),
|
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 #include "precompiled.hpp"
26 #include "jfr/jfrEvents.hpp"
27 #include "jfr/leakprofiler/sampling/objectSample.hpp"
28 #include "jfr/leakprofiler/sampling/objectSampler.hpp"
29 #include "jfr/leakprofiler/sampling/sampleList.hpp"
30 #include "jfr/leakprofiler/sampling/samplePriorityQueue.hpp"
31 #include "jfr/recorder/jfrEventSetting.inline.hpp"
32 #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp"
33 #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp"
34 #include "jfr/support/jfrThreadLocal.hpp"
35 #include "jfr/utilities/jfrTryLock.inline.hpp"
36 #include "logging/log.hpp"
37 #include "memory/universe.hpp"
38 #include "oops/oop.inline.hpp"
39 #include "runtime/atomic.hpp"
40 #include "runtime/orderAccess.hpp"
41 #include "runtime/safepoint.hpp"
42 #include "runtime/thread.hpp"
43
44 static ObjectSampler* _instance = NULL;
45
46 static ObjectSampler& instance() {
47 assert(_instance != NULL, "invariant");
48 return *_instance;
49 }
50
51 ObjectSampler::ObjectSampler(size_t size) :
52 _priority_queue(new SamplePriorityQueue(size)),
53 _list(new SampleList(size)),
54 _last_sweep(JfrTicks::now()),
55 _total_allocated(0),
|