author | mgronlun |
Wed, 30 Oct 2019 19:43:52 +0100 | |
changeset 58863 | c16ac7a2eba4 |
parent 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
50113 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50113
diff
changeset
|
2 |
* Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved. |
50113 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
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 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50113
diff
changeset
|
25 |
#ifndef SHARE_JFR_RECORDER_SERVICE_JFRRECORDERSERVICE_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50113
diff
changeset
|
26 |
#define SHARE_JFR_RECORDER_SERVICE_JFRRECORDERSERVICE_HPP |
50113 | 27 |
|
28 |
#include "jfr/utilities/jfrAllocation.hpp" |
|
29 |
||
30 |
class JfrCheckpointManager; |
|
31 |
class JfrChunkWriter; |
|
32 |
class JfrRepository; |
|
33 |
class JfrStackTraceRepository; |
|
34 |
class JfrStorage; |
|
35 |
class JfrStringPool; |
|
36 |
||
37 |
class JfrRecorderService : public StackObj { |
|
38 |
private: |
|
39 |
JfrCheckpointManager& _checkpoint_manager; |
|
40 |
JfrChunkWriter& _chunkwriter; |
|
41 |
JfrRepository& _repository; |
|
42 |
JfrStackTraceRepository& _stack_trace_repository; |
|
43 |
JfrStorage& _storage; |
|
44 |
JfrStringPool& _string_pool; |
|
45 |
||
46 |
void open_new_chunk(bool vm_error = false); |
|
47 |
void chunk_rotation(); |
|
48 |
void in_memory_rotation(); |
|
49 |
void finalize_current_chunk(); |
|
50 |
void prepare_for_vm_error_rotation(); |
|
51 |
void vm_error_rotation(); |
|
58863 | 52 |
void invoke_flush(); |
50113 | 53 |
|
54 |
void clear(); |
|
55 |
void pre_safepoint_clear(); |
|
56 |
void safepoint_clear(); |
|
57 |
void invoke_safepoint_clear(); |
|
58 |
void post_safepoint_clear(); |
|
59 |
||
60 |
void write(); |
|
61 |
void pre_safepoint_write(); |
|
62 |
void safepoint_write(); |
|
63 |
void invoke_safepoint_write(); |
|
64 |
void post_safepoint_write(); |
|
65 |
||
66 |
public: |
|
67 |
JfrRecorderService(); |
|
68 |
void start(); |
|
58863 | 69 |
size_t flush(); |
50113 | 70 |
void rotate(int msgs); |
58863 | 71 |
void flushpoint(); |
50113 | 72 |
void process_full_buffers(); |
73 |
void scavenge(); |
|
74 |
void evaluate_chunk_size_for_rotation(); |
|
75 |
static bool is_recording(); |
|
76 |
}; |
|
77 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50113
diff
changeset
|
78 |
#endif // SHARE_JFR_RECORDER_SERVICE_JFRRECORDERSERVICE_HPP |