mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
intel/perf: move free_sample_bufs into perf
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
2f712d21b9
commit
4b2c885207
3 changed files with 12 additions and 15 deletions
|
|
@ -867,3 +867,13 @@ gen_perf_reap_old_sample_buffers(struct gen_perf_context *perf_ctx)
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gen_perf_free_sample_bufs(struct gen_perf_context *perf_ctx)
|
||||
{
|
||||
foreach_list_typed_safe(struct oa_sample_buf, buf, link,
|
||||
&perf_ctx->free_sample_buffers)
|
||||
ralloc_free(buf);
|
||||
|
||||
exec_list_make_empty(&perf_ctx->free_sample_buffers);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -506,6 +506,7 @@ uint64_t gen_perf_query_get_metric_id(struct gen_perf_config *perf,
|
|||
const struct gen_perf_query_info *query);
|
||||
struct oa_sample_buf * gen_perf_get_free_sample_buf(struct gen_perf_context *perf);
|
||||
void gen_perf_reap_old_sample_buffers(struct gen_perf_context *perf_ctx);
|
||||
void gen_perf_free_sample_bufs(struct gen_perf_context *perf_ctx);
|
||||
|
||||
|
||||
#endif /* GEN_PERF_H */
|
||||
|
|
|
|||
|
|
@ -144,20 +144,6 @@ dump_perf_queries(struct brw_context *brw)
|
|||
_mesa_HashWalk(ctx->PerfQuery.Objects, dump_perf_query_callback, brw);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
static void
|
||||
free_sample_bufs(struct brw_context *brw)
|
||||
{
|
||||
foreach_list_typed_safe(struct oa_sample_buf, buf, link,
|
||||
&brw->perf_ctx.free_sample_buffers)
|
||||
ralloc_free(buf);
|
||||
|
||||
exec_list_make_empty(&brw->perf_ctx.free_sample_buffers);
|
||||
}
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
/**
|
||||
* Driver hook for glGetPerfQueryInfoINTEL().
|
||||
*/
|
||||
|
|
@ -1393,7 +1379,7 @@ brw_delete_perf_query(struct gl_context *ctx,
|
|||
* buffers and close any current i915-perf stream.
|
||||
*/
|
||||
if (--brw->perf_ctx.n_query_instances == 0) {
|
||||
free_sample_bufs(brw);
|
||||
gen_perf_free_sample_bufs(&brw->perf_ctx);
|
||||
close_perf(brw, obj->query);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue