--- a/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp Fri Feb 22 19:58:22 2019 +0530
+++ b/src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp Fri Feb 22 17:30:07 2019 +0300
@@ -130,18 +130,18 @@
bool not_acquired() const { return !_acquired; }
};
-static intptr_t write_checkpoint_event_prologue(JfrChunkWriter& cw, u8 type_id) {
- const intptr_t prev_cp_offset = cw.previous_checkpoint_offset();
- const intptr_t prev_cp_relative_offset = 0 == prev_cp_offset ? 0 : prev_cp_offset - cw.current_offset();
+static int64_t write_checkpoint_event_prologue(JfrChunkWriter& cw, u8 type_id) {
+ const int64_t prev_cp_offset = cw.previous_checkpoint_offset();
+ const int64_t prev_cp_relative_offset = 0 == prev_cp_offset ? 0 : prev_cp_offset - cw.current_offset();
cw.reserve(sizeof(u4));
cw.write<u8>(EVENT_CHECKPOINT);
cw.write(JfrTicks::now());
- cw.write<jlong>((jlong)0);
+ cw.write((int64_t)0);
cw.write(prev_cp_relative_offset); // write previous checkpoint offset delta
cw.write<bool>(false); // flushpoint
- cw.write<u4>((u4)1); // nof types in this checkpoint
- cw.write<u8>(type_id);
- const intptr_t number_of_elements_offset = cw.current_offset();
+ cw.write((u4)1); // nof types in this checkpoint
+ cw.write(type_id);
+ const int64_t number_of_elements_offset = cw.current_offset();
cw.reserve(sizeof(u4));
return number_of_elements_offset;
}
@@ -161,8 +161,8 @@
}
bool process() {
// current_cp_offset is also offset for the event size header field
- const intptr_t current_cp_offset = _cw.current_offset();
- const intptr_t num_elements_offset = write_checkpoint_event_prologue(_cw, _type_id);
+ const int64_t current_cp_offset = _cw.current_offset();
+ const int64_t num_elements_offset = write_checkpoint_event_prologue(_cw, _type_id);
// invocation
_content_functor.process();
const u4 number_of_elements = (u4)_content_functor.processed();
@@ -468,9 +468,9 @@
JfrMetadataEvent::lock();
}
-static jlong write_metadata_event(JfrChunkWriter& chunkwriter) {
+static int64_t write_metadata_event(JfrChunkWriter& chunkwriter) {
assert(chunkwriter.is_valid(), "invariant");
- const jlong metadata_offset = chunkwriter.current_offset();
+ const int64_t metadata_offset = chunkwriter.current_offset();
JfrMetadataEvent::write(chunkwriter, metadata_offset);
return metadata_offset;
}