summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorMark Janes <[email protected]>2019-07-17 14:36:44 -0700
committerMark Janes <[email protected]>2019-08-07 21:33:56 -0700
commit1f4f421ce07e16d7bbef16c016fbc1d5b2055516 (patch)
tree5e3e5cfc0f650d1337f3f83f0438d60a18d47a51 /src/mesa/drivers/dri/i965
parenta663c8c26e6d5f77ae4c9e09625c4a12c9c75b53 (diff)
intel/perf: print debug information
INTEL_DEBUG=perfmon will iterate over the perf queries, printing information about the state of each query. Some of this information will be private to intel/perf, and needs to a dump routine that can be called from i965. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_performance_query.c33
1 files changed, 8 insertions, 25 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_performance_query.c b/src/mesa/drivers/dri/i965/brw_performance_query.c
index c1cba62cb3a..80a2ba6f4b4 100644
--- a/src/mesa/drivers/dri/i965/brw_performance_query.c
+++ b/src/mesa/drivers/dri/i965/brw_performance_query.c
@@ -111,41 +111,24 @@ brw_is_perf_query_ready(struct gl_context *ctx,
static void
dump_perf_query_callback(GLuint id, void *query_void, void *brw_void)
{
- struct gl_context *ctx = brw_void;
+ struct brw_context *ctx = brw_void;
+ struct gen_perf_context *perf_ctx = &ctx->perf_ctx;
struct gl_perf_query_object *o = query_void;
struct brw_perf_query_object * brw_query = brw_perf_query(o);
struct gen_perf_query_object *obj = brw_query->query;
- switch (obj->queryinfo->kind) {
- case GEN_PERF_QUERY_TYPE_OA:
- case GEN_PERF_QUERY_TYPE_RAW:
- DBG("%4d: %-6s %-8s BO: %-4s OA data: %-10s %-15s\n",
- id,
- o->Used ? "Dirty," : "New,",
- o->Active ? "Active," : (o->Ready ? "Ready," : "Pending,"),
- obj->oa.bo ? "yes," : "no,",
- brw_is_perf_query_ready(ctx, o) ? "ready," : "not ready,",
- obj->oa.results_accumulated ? "accumulated" : "not accumulated");
- break;
- case GEN_PERF_QUERY_TYPE_PIPELINE:
- DBG("%4d: %-6s %-8s BO: %-4s\n",
- id,
- o->Used ? "Dirty," : "New,",
- o->Active ? "Active," : (o->Ready ? "Ready," : "Pending,"),
- obj->pipeline_stats.bo ? "yes" : "no");
- break;
- default:
- unreachable("Unknown query type");
- break;
- }
+ DBG("%4d: %-6s %-8s ",
+ id,
+ o->Used ? "Dirty," : "New,",
+ o->Active ? "Active," : (o->Ready ? "Ready," : "Pending,"));
+ gen_perf_dump_query(perf_ctx, obj, &ctx->batch);
}
static void
dump_perf_queries(struct brw_context *brw)
{
struct gl_context *ctx = &brw->ctx;
- DBG("Queries: (Open queries = %d, OA users = %d)\n",
- brw->perf_ctx.n_active_oa_queries, brw->perf_ctx.n_oa_users);
+ gen_perf_dump_query_count(&brw->perf_ctx);
_mesa_HashWalk(ctx->PerfQuery.Objects, dump_perf_query_callback, brw);
}