}
static void
-number_to_human_readable(uint64_t num, enum pipe_driver_query_type type,
+number_to_human_readable(double num, enum pipe_driver_query_type type,
char *out)
{
static const char *byte_units[] =
}
void
-hud_graph_add_value(struct hud_graph *gr, uint64_t value)
+hud_graph_add_value(struct hud_graph *gr, double value)
{
gr->current_value = value;
value = value > gr->pane->ceiling ? gr->pane->ceiling : value;
- if (gr->fd)
- fprintf(gr->fd, "%" PRIu64 "\n", value);
+ if (gr->fd) {
+ if (fabs(value - lround(value)) > FLT_EPSILON) {
+ fprintf(gr->fd, "%f\n", value);
+ }
+ else {
+ fprintf(gr->fd, "%" PRIu64 "\n", (uint64_t) lround(value));
+ }
+ }
if (gr->index == gr->pane->max_num_vertices) {
gr->vertices[0] = 0;
else if (sscanf(name, "cpu%u%s", &i, s) == 1) {
hud_cpu_graph_install(pane, i);
}
+ else if (strcmp(name, "API-thread-busy") == 0) {
+ hud_thread_busy_install(pane, name, false);
+ }
+ else if (strcmp(name, "API-thread-offloaded-slots") == 0) {
+ hud_thread_counter_install(pane, name, HUD_COUNTER_OFFLOADED);
+ }
+ else if (strcmp(name, "API-thread-direct-slots") == 0) {
+ hud_thread_counter_install(pane, name, HUD_COUNTER_DIRECT);
+ }
+ else if (strcmp(name, "API-thread-num-syncs") == 0) {
+ hud_thread_counter_install(pane, name, HUD_COUNTER_SYNCS);
+ }
else if (strcmp(name, "main-thread-busy") == 0) {
- hud_main_thread_busy_install(pane, name);
+ hud_thread_busy_install(pane, name, true);
}
#if HAVE_GALLIUM_EXTRA_HUD
else if (sscanf(name, "nic-rx-%s", arg_name) == 1) {