[Mesa-dev] [PATCH 04/11] gallium/hud: rename API-thread-busy to main-thread-busy
Marek Olšák
maraeo at gmail.com
Thu Jun 22 01:02:59 UTC 2017
From: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/auxiliary/hud/hud_context.c | 4 ++--
src/gallium/auxiliary/hud/hud_cpu.c | 4 ++--
src/gallium/auxiliary/hud/hud_private.h | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index cb7ed44..922ab96 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -1187,22 +1187,22 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
/* IF YOU CHANGE THIS, UPDATE print_help! */
if (strcmp(name, "fps") == 0) {
hud_fps_graph_install(pane);
}
else if (strcmp(name, "cpu") == 0) {
hud_cpu_graph_install(pane, ALL_CPUS);
}
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_api_thread_busy_install(pane);
+ else if (strcmp(name, "main-thread-busy") == 0) {
+ hud_main_thread_busy_install(pane, name);
}
#if HAVE_GALLIUM_EXTRA_HUD
else if (sscanf(name, "nic-rx-%s", arg_name) == 1) {
hud_nic_graph_install(pane, arg_name, NIC_DIRECTION_RX);
}
else if (sscanf(name, "nic-tx-%s", arg_name) == 1) {
hud_nic_graph_install(pane, arg_name, NIC_DIRECTION_TX);
}
else if (sscanf(name, "nic-rssi-%s", arg_name) == 1) {
hud_nic_graph_install(pane, arg_name, NIC_RSSI_DBM);
diff --git a/src/gallium/auxiliary/hud/hud_cpu.c b/src/gallium/auxiliary/hud/hud_cpu.c
index 302445d..26f9fa7 100644
--- a/src/gallium/auxiliary/hud/hud_cpu.c
+++ b/src/gallium/auxiliary/hud/hud_cpu.c
@@ -259,29 +259,29 @@ query_api_thread_busy_status(struct hud_graph *gr)
info->last_time = now;
}
} else {
/* initialize */
info->last_time = now;
info->last_thread_time = pipe_current_thread_get_time_nano();
}
}
void
-hud_api_thread_busy_install(struct hud_pane *pane)
+hud_main_thread_busy_install(struct hud_pane *pane, const char *name)
{
struct hud_graph *gr;
gr = CALLOC_STRUCT(hud_graph);
if (!gr)
return;
- strcpy(gr->name, "API-thread-busy");
+ strcpy(gr->name, name);
gr->query_data = CALLOC_STRUCT(thread_info);
if (!gr->query_data) {
FREE(gr);
return;
}
gr->query_new_value = query_api_thread_busy_status;
/* Don't use free() as our callback as that messes up Gallium's
diff --git a/src/gallium/auxiliary/hud/hud_private.h b/src/gallium/auxiliary/hud/hud_private.h
index bbc5ec7..bf9962d 100644
--- a/src/gallium/auxiliary/hud/hud_private.h
+++ b/src/gallium/auxiliary/hud/hud_private.h
@@ -86,21 +86,21 @@ void hud_graph_add_value(struct hud_graph *gr, uint64_t value);
/* graphs/queries */
struct hud_batch_query_context;
#define ALL_CPUS ~0 /* optionally set as cpu_index */
int hud_get_num_cpus(void);
void hud_fps_graph_install(struct hud_pane *pane);
void hud_cpu_graph_install(struct hud_pane *pane, unsigned cpu_index);
-void hud_api_thread_busy_install(struct hud_pane *pane);
+void hud_main_thread_busy_install(struct hud_pane *pane, const char *name);
void hud_pipe_query_install(struct hud_batch_query_context **pbq,
struct hud_pane *pane, struct pipe_context *pipe,
const char *name, unsigned query_type,
unsigned result_index,
uint64_t max_value,
enum pipe_driver_query_type type,
enum pipe_driver_query_result_type result_type,
unsigned flags);
boolean hud_driver_query_install(struct hud_batch_query_context **pbq,
struct hud_pane *pane,
--
2.7.4
More information about the mesa-dev
mailing list