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/jfr.hpp"
27 #include "jfr/jni/jfrJavaSupport.hpp"
28 #include "jfr/recorder/jfrRecorder.hpp"
29 #include "jfr/recorder/repository/jfrChunkState.hpp"
30 #include "jfr/recorder/repository/jfrChunkWriter.hpp"
31 #include "jfr/recorder/repository/jfrEmergencyDump.hpp"
32 #include "jfr/recorder/repository/jfrRepository.hpp"
33 #include "jfr/recorder/service/jfrPostBox.hpp"
34 #include "memory/resourceArea.hpp"
35 #include "runtime/mutex.hpp"
36 #include "runtime/thread.inline.hpp"
37
38 static JfrRepository* _instance = NULL;
39
40 JfrRepository& JfrRepository::instance() {
41 return *_instance;
42 }
43
44 static JfrChunkWriter* _chunkwriter = NULL;
45
46 static bool initialize_chunkwriter() {
47 assert(_chunkwriter == NULL, "invariant");
48 _chunkwriter = new JfrChunkWriter();
49 return _chunkwriter != NULL && _chunkwriter->initialize();
50 }
51
52 JfrChunkWriter& JfrRepository::chunkwriter() {
53 return *_chunkwriter;
54 }
55
|
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/jfr.hpp"
27 #include "jfr/jni/jfrJavaSupport.hpp"
28 #include "jfr/recorder/jfrRecorder.hpp"
29 #include "jfr/recorder/repository/jfrChunkState.hpp"
30 #include "jfr/recorder/repository/jfrChunkWriter.hpp"
31 #include "jfr/recorder/repository/jfrEmergencyDump.hpp"
32 #include "jfr/recorder/repository/jfrRepository.hpp"
33 #include "jfr/recorder/service/jfrPostBox.hpp"
34 #include "memory/resourceArea.hpp"
35 #include "runtime/mutexLocker.inline.hpp"
36 #include "runtime/thread.inline.hpp"
37
38 static JfrRepository* _instance = NULL;
39
40 JfrRepository& JfrRepository::instance() {
41 return *_instance;
42 }
43
44 static JfrChunkWriter* _chunkwriter = NULL;
45
46 static bool initialize_chunkwriter() {
47 assert(_chunkwriter == NULL, "invariant");
48 _chunkwriter = new JfrChunkWriter();
49 return _chunkwriter != NULL && _chunkwriter->initialize();
50 }
51
52 JfrChunkWriter& JfrRepository::chunkwriter() {
53 return *_chunkwriter;
54 }
55
|