diff options
author | Mark Janes <[email protected]> | 2019-07-17 14:36:44 -0700 |
---|---|---|
committer | Mark Janes <[email protected]> | 2019-08-07 21:33:56 -0700 |
commit | 1f4f421ce07e16d7bbef16c016fbc1d5b2055516 (patch) | |
tree | 5e3e5cfc0f650d1337f3f83f0438d60a18d47a51 /src/intel | |
parent | a663c8c26e6d5f77ae4c9e09625c4a12c9c75b53 (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/intel')
-rw-r--r-- | src/intel/perf/gen_perf.c | 30 | ||||
-rw-r--r-- | src/intel/perf/gen_perf.h | 5 |
2 files changed, 35 insertions, 0 deletions
diff --git a/src/intel/perf/gen_perf.c b/src/intel/perf/gen_perf.c index 2d1a58bae9e..0bac1fd2888 100644 --- a/src/intel/perf/gen_perf.c +++ b/src/intel/perf/gen_perf.c @@ -2266,3 +2266,33 @@ gen_perf_get_query_data(struct gen_perf_context *perf_ctx, if (bytes_written) *bytes_written = written; } + +void +gen_perf_dump_query_count(struct gen_perf_context *perf_ctx) +{ + DBG("Queries: (Open queries = %d, OA users = %d)\n", + perf_ctx->n_active_oa_queries, perf_ctx->n_oa_users); +} + +void +gen_perf_dump_query(struct gen_perf_context *ctx, + struct gen_perf_query_object *obj, + void *current_batch) +{ + switch (obj->queryinfo->kind) { + case GEN_PERF_QUERY_TYPE_OA: + case GEN_PERF_QUERY_TYPE_RAW: + DBG("BO: %-4s OA data: %-10s %-15s\n", + obj->oa.bo ? "yes," : "no,", + gen_perf_is_query_ready(ctx, obj, current_batch) ? "ready," : "not ready,", + obj->oa.results_accumulated ? "accumulated" : "not accumulated"); + break; + case GEN_PERF_QUERY_TYPE_PIPELINE: + DBG("BO: %-4s\n", + obj->pipeline_stats.bo ? "yes" : "no"); + break; + default: + unreachable("Unknown query type"); + break; + } +} diff --git a/src/intel/perf/gen_perf.h b/src/intel/perf/gen_perf.h index 1b0836f9ff1..d4178900714 100644 --- a/src/intel/perf/gen_perf.h +++ b/src/intel/perf/gen_perf.h @@ -445,4 +445,9 @@ void gen_perf_get_query_data(struct gen_perf_context *perf_ctx, unsigned *data, unsigned *bytes_written); +void gen_perf_dump_query_count(struct gen_perf_context *perf_ctx); +void gen_perf_dump_query(struct gen_perf_context *perf_ctx, + struct gen_perf_query_object *obj, + void *current_batch); + #endif /* GEN_PERF_H */ |