1.1 --- a/src/share/vm/jfr/recorder/service/jfrRecorderService.cpp Fri Dec 06 12:42:29 2019 +0100 1.2 +++ b/src/share/vm/jfr/recorder/service/jfrRecorderService.cpp Tue Jun 16 11:03:04 2020 +0800 1.3 @@ -131,18 +131,18 @@ 1.4 bool not_acquired() const { return !_acquired; } 1.5 }; 1.6 1.7 -static intptr_t write_checkpoint_event_prologue(JfrChunkWriter& cw, u8 type_id) { 1.8 - const intptr_t prev_cp_offset = cw.previous_checkpoint_offset(); 1.9 - const intptr_t prev_cp_relative_offset = 0 == prev_cp_offset ? 0 : prev_cp_offset - cw.current_offset(); 1.10 +static int64_t write_checkpoint_event_prologue(JfrChunkWriter& cw, u8 type_id) { 1.11 + const int64_t prev_cp_offset = cw.previous_checkpoint_offset(); 1.12 + const int64_t prev_cp_relative_offset = 0 == prev_cp_offset ? 0 : prev_cp_offset - cw.current_offset(); 1.13 cw.reserve(sizeof(u4)); 1.14 cw.write<u8>(EVENT_CHECKPOINT); 1.15 cw.write(JfrTicks::now()); 1.16 - cw.write<jlong>((jlong)0); 1.17 - cw.write<jlong>((jlong)prev_cp_relative_offset); // write previous checkpoint offset delta 1.18 + cw.write((int64_t)0); 1.19 + cw.write(prev_cp_relative_offset); // write previous checkpoint offset delta 1.20 cw.write<bool>(false); // flushpoint 1.21 - cw.write<u4>((u4)1); // nof types in this checkpoint 1.22 - cw.write<u8>(type_id); 1.23 - const intptr_t number_of_elements_offset = cw.current_offset(); 1.24 + cw.write((u4)1); // nof types in this checkpoint 1.25 + cw.write(type_id); 1.26 + const int64_t number_of_elements_offset = cw.current_offset(); 1.27 cw.reserve(sizeof(u4)); 1.28 return number_of_elements_offset; 1.29 } 1.30 @@ -162,8 +162,8 @@ 1.31 } 1.32 bool process() { 1.33 // current_cp_offset is also offset for the event size header field 1.34 - const intptr_t current_cp_offset = _cw.current_offset(); 1.35 - const intptr_t num_elements_offset = write_checkpoint_event_prologue(_cw, _type_id); 1.36 + const int64_t current_cp_offset = _cw.current_offset(); 1.37 + const int64_t num_elements_offset = write_checkpoint_event_prologue(_cw, _type_id); 1.38 // invocation 1.39 _content_functor.process(); 1.40 const u4 number_of_elements = (u4)_content_functor.processed(); 1.41 @@ -476,9 +476,9 @@ 1.42 JfrMetadataEvent::lock(); 1.43 } 1.44 1.45 -static jlong write_metadata_event(JfrChunkWriter& chunkwriter) { 1.46 +static int64_t write_metadata_event(JfrChunkWriter& chunkwriter) { 1.47 assert(chunkwriter.is_valid(), "invariant"); 1.48 - const jlong metadata_offset = chunkwriter.current_offset(); 1.49 + const int64_t metadata_offset = chunkwriter.current_offset(); 1.50 JfrMetadataEvent::write(chunkwriter, metadata_offset); 1.51 return metadata_offset; 1.52 }