author | mgronlun |
Wed, 30 Oct 2019 19:43:52 +0100 | |
changeset 58863 | c16ac7a2eba4 |
parent 58132 | src/hotspot/share/jfr/recorder/repository/jfrChunkState.hpp@caa25ab47aca |
child 59226 | a0f39cc47387 |
permissions | -rw-r--r-- |
50113 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
50113
diff
changeset
|
2 |
* Copyright (c) 2012, 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 |
||
58863 | 25 |
#ifndef SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNK_HPP |
26 |
#define SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNK_HPP |
|
50113 | 27 |
|
28 |
#include "jfr/utilities/jfrAllocation.hpp" |
|
29 |
||
58863 | 30 |
const u1 COMPLETE = 0; |
31 |
const u1 GUARD = 0xff; |
|
32 |
const u1 PAD = 0; |
|
33 |
||
34 |
class JfrChunk : public JfrCHeapObj { |
|
50113 | 35 |
friend class JfrChunkWriter; |
58863 | 36 |
friend class JfrChunkHeadWriter; |
50113 | 37 |
private: |
38 |
char* _path; |
|
53897
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
39 |
int64_t _start_ticks; |
58863 | 40 |
int64_t _previous_start_ticks; |
53897
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
41 |
int64_t _start_nanos; |
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
42 |
int64_t _previous_start_nanos; |
58863 | 43 |
int64_t _last_update_nanos; |
58132
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
53897
diff
changeset
|
44 |
int64_t _last_checkpoint_offset; |
58863 | 45 |
int64_t _last_metadata_offset; |
46 |
mutable u1 _generation; |
|
47 |
||
48 |
JfrChunk(); |
|
49 |
~JfrChunk(); |
|
50 |
void reset(); |
|
51 |
||
52 |
const char* magic() const; |
|
53 |
u2 major_version() const; |
|
54 |
u2 minor_version() const; |
|
55 |
int64_t cpu_frequency() const; |
|
56 |
u2 capabilities() const; |
|
50113 | 57 |
|
58 |
void update_start_ticks(); |
|
59 |
void update_start_nanos(); |
|
60 |
void save_current_and_update_start_ticks(); |
|
61 |
void save_current_and_update_start_nanos(); |
|
62 |
||
58132
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
53897
diff
changeset
|
63 |
int64_t last_checkpoint_offset() const; |
caa25ab47aca
8225797: OldObjectSample event creates unexpected amount of checkpoint data
mgronlun
parents:
53897
diff
changeset
|
64 |
void set_last_checkpoint_offset(int64_t offset); |
58863 | 65 |
|
66 |
int64_t last_metadata_offset() const; |
|
67 |
void set_last_metadata_offset(int64_t offset); |
|
68 |
bool has_metadata() const; |
|
69 |
||
70 |
int64_t start_ticks() const; |
|
71 |
int64_t start_nanos() const; |
|
72 |
||
53897
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
73 |
int64_t previous_start_ticks() const; |
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
74 |
int64_t previous_start_nanos() const; |
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
75 |
int64_t last_chunk_duration() const; |
58863 | 76 |
|
77 |
void set_time_stamp(); |
|
78 |
void update_current_nanos(); |
|
79 |
||
50113 | 80 |
void set_path(const char* path); |
81 |
const char* path() const; |
|
58863 | 82 |
|
83 |
bool is_started() const; |
|
84 |
bool is_finished() const; |
|
85 |
||
86 |
int64_t duration() const; |
|
87 |
u1 generation() const; |
|
88 |
u1 next_generation() const; |
|
50113 | 89 |
}; |
90 |
||
58863 | 91 |
#endif // SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNK_HPP |