mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
intel/perf: Add intel_perf_free()
There was no function to free resources allocated in intel_perf_config or it self. Other callers will be added in separated patches. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29077>
This commit is contained in:
parent
a9a53c914d
commit
ebe8d2f9ea
3 changed files with 10 additions and 0 deletions
|
|
@ -1561,3 +1561,9 @@ intel_perf_init_metrics(struct intel_perf_config *perf_cfg,
|
||||||
if (oa_metrics)
|
if (oa_metrics)
|
||||||
intel_perf_register_mdapi_oa_query(perf_cfg, devinfo);
|
intel_perf_register_mdapi_oa_query(perf_cfg, devinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
intel_perf_free(struct intel_perf_config *perf_cfg)
|
||||||
|
{
|
||||||
|
ralloc_free(perf_cfg);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -532,6 +532,8 @@ intel_perf_new(void *ctx)
|
||||||
return perf;
|
return perf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void intel_perf_free(struct intel_perf_config *perf_cfg);
|
||||||
|
|
||||||
/** Whether we have the ability to hold off preemption on a batch so we don't
|
/** Whether we have the ability to hold off preemption on a batch so we don't
|
||||||
* have to look at the OA buffer to subtract unrelated workloads off the
|
* have to look at the OA buffer to subtract unrelated workloads off the
|
||||||
* values captured through MI_* commands.
|
* values captured through MI_* commands.
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
if (!perf_cfg->i915_query_supported) {
|
if (!perf_cfg->i915_query_supported) {
|
||||||
fprintf(stderr, "No supported queries for platform.\n");
|
fprintf(stderr, "No supported queries for platform.\n");
|
||||||
|
intel_perf_free(perf_cfg);
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -133,5 +134,6 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
intel_perf_free(perf_cfg);
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue