- fprintf(f, "%lu, %lu, %u, %u\n",
- (unsigned long) log->log[i].time,
- (unsigned long) log->log[i].val,
- log->log[i].ddir, log->log[i].bs);
+ struct io_sample *s = get_sample(log, i);
+
+ if (!log->log_offset) {
+ fprintf(f, "%lu, %lu, %u, %u\n",
+ (unsigned long) s->time,
+ (unsigned long) s->val,
+ s->ddir, s->bs);
+ } else {
+ struct io_sample_offset *so = (void *) s;
+
+ fprintf(f, "%lu, %lu, %u, %u, %llu\n",
+ (unsigned long) s->time,
+ (unsigned long) s->val,
+ s->ddir, s->bs,
+ (unsigned long long) so->offset);
+ }