37 _path(NULL), |
37 _path(NULL), |
38 _start_ticks(0), |
38 _start_ticks(0), |
39 _start_nanos(0), |
39 _start_nanos(0), |
40 _previous_start_ticks(0), |
40 _previous_start_ticks(0), |
41 _previous_start_nanos(0), |
41 _previous_start_nanos(0), |
42 _previous_checkpoint_offset(0) {} |
42 _last_checkpoint_offset(0) {} |
43 |
43 |
44 JfrChunkState::~JfrChunkState() { |
44 JfrChunkState::~JfrChunkState() { |
45 reset(); |
45 reset(); |
46 } |
46 } |
47 |
47 |
48 void JfrChunkState::reset() { |
48 void JfrChunkState::reset() { |
49 if (_path != NULL) { |
49 if (_path != NULL) { |
50 JfrCHeapObj::free(_path, strlen(_path) + 1); |
50 JfrCHeapObj::free(_path, strlen(_path) + 1); |
51 _path = NULL; |
51 _path = NULL; |
52 } |
52 } |
53 set_previous_checkpoint_offset(0); |
53 set_last_checkpoint_offset(0); |
54 } |
54 } |
55 |
55 |
56 void JfrChunkState::set_previous_checkpoint_offset(int64_t offset) { |
56 void JfrChunkState::set_last_checkpoint_offset(int64_t offset) { |
57 _previous_checkpoint_offset = offset; |
57 _last_checkpoint_offset = offset; |
58 } |
58 } |
59 |
59 |
60 int64_t JfrChunkState::previous_checkpoint_offset() const { |
60 int64_t JfrChunkState::last_checkpoint_offset() const { |
61 return _previous_checkpoint_offset; |
61 return _last_checkpoint_offset; |
62 } |
62 } |
63 |
63 |
64 int64_t JfrChunkState::previous_start_ticks() const { |
64 int64_t JfrChunkState::previous_start_ticks() const { |
65 return _previous_start_ticks; |
65 return _previous_start_ticks; |
66 } |
66 } |