-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjdk12_jfr.patch
28 lines (27 loc) · 1.96 KB
/
jdk12_jfr.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp b/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp
index cbd539568..aa5f9b5f5 100644
--- a/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp
+++ b/src/hotspot/share/jfr/recorder/repository/jfrChunkWriter.cpp
@@ -88,17 +88,17 @@ size_t JfrChunkWriter::close(int64_t metadata_offset) {
void JfrChunkWriter::write_header(int64_t metadata_offset) {
assert(this->is_valid(), "invariant");
// Chunk size
- this->write_be_at_offset(size_written(), CHUNK_SIZE_OFFSET);
+ this->write_be_at_offset((u8)size_written(), CHUNK_SIZE_OFFSET);
// initial checkpoint event offset
- this->write_be_at_offset(_chunkstate->previous_checkpoint_offset(), CHUNK_SIZE_OFFSET + (1 * FILEHEADER_SLOT_SIZE));
+ this->write_be_at_offset((u8)_chunkstate->previous_checkpoint_offset(), CHUNK_SIZE_OFFSET + (1 * FILEHEADER_SLOT_SIZE));
// metadata event offset
- this->write_be_at_offset(metadata_offset, CHUNK_SIZE_OFFSET + (2 * FILEHEADER_SLOT_SIZE));
+ this->write_be_at_offset((u8)metadata_offset, CHUNK_SIZE_OFFSET + (2 * FILEHEADER_SLOT_SIZE));
// start of chunk in nanos since epoch
- this->write_be_at_offset(_chunkstate->previous_start_nanos(), CHUNK_SIZE_OFFSET + (3 * FILEHEADER_SLOT_SIZE));
+ this->write_be_at_offset((u8)_chunkstate->previous_start_nanos(), CHUNK_SIZE_OFFSET + (3 * FILEHEADER_SLOT_SIZE));
// duration of chunk in nanos
- this->write_be_at_offset(_chunkstate->last_chunk_duration(), CHUNK_SIZE_OFFSET + (4 * FILEHEADER_SLOT_SIZE));
+ this->write_be_at_offset((u8)_chunkstate->last_chunk_duration(), CHUNK_SIZE_OFFSET + (4 * FILEHEADER_SLOT_SIZE));
// start of chunk in ticks
- this->write_be_at_offset(_chunkstate->previous_start_ticks(), CHUNK_SIZE_OFFSET + (5 * FILEHEADER_SLOT_SIZE));
+ this->write_be_at_offset((u8)_chunkstate->previous_start_ticks(), CHUNK_SIZE_OFFSET + (5 * FILEHEADER_SLOT_SIZE));
}
void JfrChunkWriter::set_chunk_path(const char* chunk_path) {