intel: change INTEL_MEASURE output to microseconds
Change time event durations from ns -> us. Microseconds are easier to work with. Reviewed-by: Mark Janes <markjanes@swizzler.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15348>
This commit is contained in:
@@ -205,7 +205,7 @@ intel_measure_init(struct intel_measure_device *device)
|
||||
|
||||
fputs("draw_start,draw_end,frame,batch,"
|
||||
"event_index,event_count,type,count,vs,tcs,tes,"
|
||||
"gs,fs,cs,framebuffer,idle_ns,time_ns\n",
|
||||
"gs,fs,cs,framebuffer,idle_us,time_us\n",
|
||||
config.file);
|
||||
}
|
||||
|
||||
@@ -591,18 +591,22 @@ print_combined_results(struct intel_measure_device *measure_device,
|
||||
event_count += current_result->snapshot.event_count;
|
||||
}
|
||||
|
||||
uint64_t duration_idle_ns =
|
||||
intel_device_info_timebase_scale(info, start_result->idle_duration);
|
||||
uint64_t duration_time_ns =
|
||||
intel_device_info_timebase_scale(info, duration_ts);
|
||||
const struct intel_measure_snapshot *begin = &start_result->snapshot;
|
||||
fprintf(config.file, "%"PRIu64",%"PRIu64",%u,%u,%u,%u,%s,%u,"
|
||||
"0x%"PRIxPTR",0x%"PRIxPTR",0x%"PRIxPTR",0x%"PRIxPTR",0x%"PRIxPTR","
|
||||
"0x%"PRIxPTR",0x%"PRIxPTR",%"PRIu64",%"PRIu64"\n",
|
||||
"0x%"PRIxPTR",0x%"PRIxPTR",%.3lf,%.3lf\n",
|
||||
start_result->start_ts, current_result->end_ts,
|
||||
start_result->frame, start_result->batch_count,
|
||||
start_result->event_index, event_count,
|
||||
begin->event_name, begin->count,
|
||||
begin->vs, begin->tcs, begin->tes, begin->gs, begin->fs, begin->cs,
|
||||
begin->framebuffer,
|
||||
intel_device_info_timebase_scale(info, start_result->idle_duration),
|
||||
intel_device_info_timebase_scale(info, duration_ts));
|
||||
(double)duration_idle_ns / 1000.0,
|
||||
(double)duration_time_ns / 1000.0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user