22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "jfr/jfrEvents.hpp"
27 #include "jfr/jni/jfrJavaSupport.hpp"
28 #include "jfr/recorder/jfrRecorder.hpp"
29 #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp"
30 #include "jfr/recorder/repository/jfrChunkWriter.hpp"
31 #include "jfr/recorder/service/jfrOptionSet.hpp"
32 #include "jfr/recorder/service/jfrPostBox.hpp"
33 #include "jfr/recorder/storage/jfrMemorySpace.inline.hpp"
34 #include "jfr/recorder/storage/jfrStorage.hpp"
35 #include "jfr/recorder/storage/jfrStorageControl.hpp"
36 #include "jfr/recorder/storage/jfrStorageUtils.inline.hpp"
37 #include "jfr/utilities/jfrIterator.hpp"
38 #include "jfr/utilities/jfrTime.hpp"
39 #include "jfr/writers/jfrNativeEventWriter.hpp"
40 #include "logging/log.hpp"
41 #include "runtime/mutexLocker.hpp"
42 #include "runtime/orderAccess.hpp"
43 #include "runtime/os.inline.hpp"
44 #include "runtime/safepoint.hpp"
45 #include "runtime/thread.hpp"
46
47 typedef JfrStorage::Buffer* BufferPtr;
48
49 static JfrStorage* _instance = NULL;
50 static JfrStorageControl* _control;
51
52 JfrStorage& JfrStorage::instance() {
53 return *_instance;
54 }
55
56 JfrStorage* JfrStorage::create(JfrChunkWriter& chunkwriter, JfrPostBox& post_box) {
57 assert(_instance == NULL, "invariant");
58 _instance = new JfrStorage(chunkwriter, post_box);
59 return _instance;
60 }
61
62 void JfrStorage::destroy() {
|
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "jfr/jfrEvents.hpp"
27 #include "jfr/jni/jfrJavaSupport.hpp"
28 #include "jfr/recorder/jfrRecorder.hpp"
29 #include "jfr/recorder/checkpoint/jfrCheckpointManager.hpp"
30 #include "jfr/recorder/repository/jfrChunkWriter.hpp"
31 #include "jfr/recorder/service/jfrOptionSet.hpp"
32 #include "jfr/recorder/service/jfrPostBox.hpp"
33 #include "jfr/recorder/storage/jfrMemorySpace.inline.hpp"
34 #include "jfr/recorder/storage/jfrStorage.hpp"
35 #include "jfr/recorder/storage/jfrStorageControl.hpp"
36 #include "jfr/recorder/storage/jfrStorageUtils.inline.hpp"
37 #include "jfr/utilities/jfrIterator.hpp"
38 #include "jfr/utilities/jfrTime.hpp"
39 #include "jfr/writers/jfrNativeEventWriter.hpp"
40 #include "logging/log.hpp"
41 #include "runtime/mutexLocker.hpp"
42 #include "runtime/os.inline.hpp"
43 #include "runtime/safepoint.hpp"
44 #include "runtime/thread.hpp"
45
46 typedef JfrStorage::Buffer* BufferPtr;
47
48 static JfrStorage* _instance = NULL;
49 static JfrStorageControl* _control;
50
51 JfrStorage& JfrStorage::instance() {
52 return *_instance;
53 }
54
55 JfrStorage* JfrStorage::create(JfrChunkWriter& chunkwriter, JfrPostBox& post_box) {
56 assert(_instance == NULL, "invariant");
57 _instance = new JfrStorage(chunkwriter, post_box);
58 return _instance;
59 }
60
61 void JfrStorage::destroy() {
|