Lines Matching full:gr

231 query_cpu_load(struct hud_graph *gr, struct pipe_context *pipe)  in query_cpu_load()  argument
233 struct cpu_info *info = gr->query_data; in query_cpu_load()
237 if (info->last_time + gr->pane->period <= now) { in query_cpu_load()
245 hud_graph_add_value(gr, cpu_load); in query_cpu_load()
269 struct hud_graph *gr; in hud_cpu_graph_install() local
278 gr = CALLOC_STRUCT(hud_graph); in hud_cpu_graph_install()
279 if (!gr) in hud_cpu_graph_install()
283 strcpy(gr->name, "cpu"); in hud_cpu_graph_install()
285 sprintf(gr->name, "cpu%u", cpu_index); in hud_cpu_graph_install()
287 gr->query_data = CALLOC_STRUCT(cpu_info); in hud_cpu_graph_install()
288 if (!gr->query_data) { in hud_cpu_graph_install()
289 FREE(gr); in hud_cpu_graph_install()
293 gr->query_new_value = query_cpu_load; in hud_cpu_graph_install()
298 gr->free_query_data = free_query_data; in hud_cpu_graph_install()
300 info = gr->query_data; in hud_cpu_graph_install()
303 hud_pane_add_graph(pane, gr); in hud_cpu_graph_install()
326 query_api_thread_busy_status(struct hud_graph *gr, struct pipe_context *pipe) in query_api_thread_busy_status() argument
328 struct thread_info *info = gr->query_data; in query_api_thread_busy_status()
332 if (info->last_time + gr->pane->period*1000 <= now) { in query_api_thread_busy_status()
338 struct util_queue_monitoring *mon = gr->pane->hud->monitored_queue; in query_api_thread_busy_status()
355 hud_graph_add_value(gr, percent); in query_api_thread_busy_status()
370 struct hud_graph *gr; in hud_thread_busy_install() local
372 gr = CALLOC_STRUCT(hud_graph); in hud_thread_busy_install()
373 if (!gr) in hud_thread_busy_install()
376 strcpy(gr->name, name); in hud_thread_busy_install()
378 gr->query_data = CALLOC_STRUCT(thread_info); in hud_thread_busy_install()
379 if (!gr->query_data) { in hud_thread_busy_install()
380 FREE(gr); in hud_thread_busy_install()
384 ((struct thread_info*)gr->query_data)->main_thread = main; in hud_thread_busy_install()
385 gr->query_new_value = query_api_thread_busy_status; in hud_thread_busy_install()
390 gr->free_query_data = free_query_data; in hud_thread_busy_install()
392 hud_pane_add_graph(pane, gr); in hud_thread_busy_install()
402 static unsigned get_counter(struct hud_graph *gr, enum hud_counter counter) in get_counter() argument
404 struct util_queue_monitoring *mon = gr->pane->hud->monitored_queue; in get_counter()
423 query_thread_counter(struct hud_graph *gr, struct pipe_context *pipe) in query_thread_counter() argument
425 struct counter_info *info = gr->query_data; in query_thread_counter()
429 if (info->last_time + gr->pane->period*1000 <= now) { in query_thread_counter()
430 unsigned current_value = get_counter(gr, info->counter); in query_thread_counter()
432 hud_graph_add_value(gr, current_value - info->last_value); in query_thread_counter()
438 info->last_value = get_counter(gr, info->counter); in query_thread_counter()
446 struct hud_graph *gr = CALLOC_STRUCT(hud_graph); in hud_thread_counter_install() local
447 if (!gr) in hud_thread_counter_install()
450 strcpy(gr->name, name); in hud_thread_counter_install()
452 gr->query_data = CALLOC_STRUCT(counter_info); in hud_thread_counter_install()
453 if (!gr->query_data) { in hud_thread_counter_install()
454 FREE(gr); in hud_thread_counter_install()
458 ((struct counter_info*)gr->query_data)->counter = counter; in hud_thread_counter_install()
459 gr->query_new_value = query_thread_counter; in hud_thread_counter_install()
464 gr->free_query_data = free_query_data; in hud_thread_counter_install()
466 hud_pane_add_graph(pane, gr); in hud_thread_counter_install()