@@ -96,6 +96,10 @@ int CreateCheckpointsCommand::run(std::vector<std::string>& args) {
96
96
return 1 ;
97
97
}
98
98
99
+ if (trace_dir.empty ()) {
100
+ trace_dir = real_path (resolve_trace_name (" " ));
101
+ }
102
+
99
103
auto verified_frames_to_checkpoint_at =
100
104
CreateCheckpointsCommand::find_events_to_checkpoint (trace_dir, flags);
101
105
if (verified_frames_to_checkpoint_at.empty ()) {
@@ -108,6 +112,7 @@ int CreateCheckpointsCommand::run(std::vector<std::string>& args) {
108
112
static bool create_persistent_checkpoint_dir (const string& trace_dir,
109
113
FrameTime time) {
110
114
string checkpoint_dir = trace_dir + " /checkpoint-" + std::to_string (time );
115
+ LOG (debug) << " create checkpoint dir " << checkpoint_dir;
111
116
if (mkdir (checkpoint_dir.c_str (), 0755 ) == 0 ) {
112
117
return true ;
113
118
}
@@ -119,6 +124,7 @@ int CreateCheckpointsCommand::run_main(
119
124
const std::vector<FrameTime>& verified_events) {
120
125
DEBUG_ASSERT (!verified_events.empty () &&
121
126
" No events provided to checkpoint at." );
127
+ LOG (debug) << " creating " << verified_events.size () << " persistent checkpoints" ;
122
128
ReplaySession::Flags session_flags{};
123
129
ReplayTimeline timeline{ ReplaySession::create (trace_dir, session_flags) };
124
130
auto & reader = timeline.current_session ().trace_reader ();
@@ -141,7 +147,8 @@ int CreateCheckpointsCommand::run_main(
141
147
timeline.remove_explicit_checkpoint (mark);
142
148
LOG (debug) << " Serialized checkpoint at event " << evt;
143
149
} else {
144
- FATAL () << " Stopped at wrong event" ;
150
+ FATAL () << " Stopped at wrong event: expected=" << evt
151
+ << " stopped at=" << session.trace_reader ().time ();
145
152
}
146
153
}
147
154
@@ -153,6 +160,7 @@ int CreateCheckpointsCommand::run_main(
153
160
std::vector<FrameTime> CreateCheckpointsCommand::find_events_to_checkpoint (
154
161
const std::string& trace_dir, const CreateCheckpointsFlags& flags) {
155
162
TraceReader reader{ trace_dir };
163
+ LOG (debug) << " find events to checkpoint in " << trace_dir;
156
164
std::vector<FrameTime> events;
157
165
auto total = 0ul ;
158
166
0 commit comments