author | mgronlun |
Tue, 10 Sep 2019 13:14:36 +0200 | |
branch | JEP-349-branch |
changeset 58068 | 22dab580786c |
parent 57887 | a9cc3698a55c |
child 58073 | 76d4428af8b6 |
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 |
||
57361 | 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 |
||
57361 | 30 |
class JfrChunk : public JfrCHeapObj { |
50113 | 31 |
friend class JfrChunkWriter; |
57361 | 32 |
friend class JfrChunkHeadWriter; |
50113 | 33 |
private: |
34 |
char* _path; |
|
53897
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
35 |
int64_t _start_ticks; |
57361 | 36 |
int64_t _previous_start_ticks; |
53897
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
37 |
int64_t _start_nanos; |
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
38 |
int64_t _previous_start_nanos; |
57361 | 39 |
int64_t _last_update_nanos; |
40 |
int64_t _last_checkpoint_offset; |
|
41 |
int64_t _last_metadata_offset; |
|
42 |
mutable u1 _generation; |
|
43 |
||
44 |
JfrChunk(); |
|
45 |
~JfrChunk(); |
|
57870
00860d9caf4d
New metadata system for oldobjects built on top of simplified tagging model. Caching and serialization improvements. Flushpoint checkpoint with chunkheader contents.
mgronlun
parents:
57361
diff
changeset
|
46 |
void reset(); |
00860d9caf4d
New metadata system for oldobjects built on top of simplified tagging model. Caching and serialization improvements. Flushpoint checkpoint with chunkheader contents.
mgronlun
parents:
57361
diff
changeset
|
47 |
|
00860d9caf4d
New metadata system for oldobjects built on top of simplified tagging model. Caching and serialization improvements. Flushpoint checkpoint with chunkheader contents.
mgronlun
parents:
57361
diff
changeset
|
48 |
const char* magic() const; |
00860d9caf4d
New metadata system for oldobjects built on top of simplified tagging model. Caching and serialization improvements. Flushpoint checkpoint with chunkheader contents.
mgronlun
parents:
57361
diff
changeset
|
49 |
u2 major_version() const; |
00860d9caf4d
New metadata system for oldobjects built on top of simplified tagging model. Caching and serialization improvements. Flushpoint checkpoint with chunkheader contents.
mgronlun
parents:
57361
diff
changeset
|
50 |
u2 minor_version() const; |
00860d9caf4d
New metadata system for oldobjects built on top of simplified tagging model. Caching and serialization improvements. Flushpoint checkpoint with chunkheader contents.
mgronlun
parents:
57361
diff
changeset
|
51 |
int64_t cpu_frequency() const; |
00860d9caf4d
New metadata system for oldobjects built on top of simplified tagging model. Caching and serialization improvements. Flushpoint checkpoint with chunkheader contents.
mgronlun
parents:
57361
diff
changeset
|
52 |
u2 capabilities() const; |
50113 | 53 |
|
54 |
void update_start_ticks(); |
|
55 |
void update_start_nanos(); |
|
56 |
void save_current_and_update_start_ticks(); |
|
57 |
void save_current_and_update_start_nanos(); |
|
58 |
||
57361 | 59 |
int64_t last_checkpoint_offset() const; |
60 |
void set_last_checkpoint_offset(int64_t offset); |
|
61 |
||
62 |
int64_t last_metadata_offset() const; |
|
63 |
void set_last_metadata_offset(int64_t offset); |
|
64 |
bool has_metadata() const; |
|
65 |
||
66 |
int64_t start_ticks() const; |
|
67 |
int64_t start_nanos() const; |
|
68 |
||
53897
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
69 |
int64_t previous_start_ticks() const; |
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
70 |
int64_t previous_start_nanos() const; |
0abec72a3ac2
8217647: JFR: recordings on 32-bit systems unreadable
bulasevich
parents:
53244
diff
changeset
|
71 |
int64_t last_chunk_duration() const; |
57361 | 72 |
|
57887 | 73 |
void set_time_stamp(); |
74 |
void update(); |
|
75 |
||
50113 | 76 |
void set_path(const char* path); |
77 |
const char* path() const; |
|
57361 | 78 |
|
79 |
bool is_started() const; |
|
80 |
bool is_finished() const; |
|
81 |
||
82 |
int64_t duration() const; |
|
83 |
u1 generation() const; |
|
57870
00860d9caf4d
New metadata system for oldobjects built on top of simplified tagging model. Caching and serialization improvements. Flushpoint checkpoint with chunkheader contents.
mgronlun
parents:
57361
diff
changeset
|
84 |
u1 next_generation() const; |
50113 | 85 |
}; |
86 |
||
57361 | 87 |
#endif // SHARE_VM_JFR_RECORDER_REPOSITORY_JFRRCHUNK_HPP |