anv/iris: report counter symbols with debug option
v2: rename to INTEL_DEBUG=perf-symbol-names Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Ivan Briano <ivan.briano@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17672>
This commit is contained in:

committed by
Marge Bot

parent
e6735409ee
commit
8dd960e056
@@ -500,6 +500,10 @@ Intel driver environment variables
|
||||
emit messages about performance issues
|
||||
``perfmon``
|
||||
emit messages about :ext:`GL_AMD_performance_monitor`
|
||||
``perf-symbol-names``
|
||||
use performance counter symbols instead of the counter name
|
||||
(counter symbols are like variable names, it's sometimes easier
|
||||
to work with when you have lots of metrics to collect)
|
||||
``reemit``
|
||||
mark all state dirty on each draw call
|
||||
``rt``
|
||||
@@ -1019,7 +1023,7 @@ Shared Vulkan driver environment variables
|
||||
after n frames. Currently, only RADV implements this.
|
||||
|
||||
.. envvar:: MESA_VK_MEMORY_TRACE_TRIGGER
|
||||
|
||||
|
||||
enable trigger file-based memory tracing. (e.g.
|
||||
``export MESA_VK_MEMORY_TRACE_TRIGGER=/tmp/memory_trigger`` and then
|
||||
``touch /tmp/memory_trigger`` to capture a memory trace).
|
||||
|
@@ -62,7 +62,8 @@ iris_get_monitor_info(struct pipe_screen *pscreen, unsigned index,
|
||||
intel_perf_query_result_clear(&results);
|
||||
|
||||
info->group_id = counter_info->location.group_idx;
|
||||
info->name = counter->name;
|
||||
info->name = INTEL_DEBUG(DEBUG_PERF_SYMBOL_NAMES) ?
|
||||
counter->symbol_name : counter->name;
|
||||
info->query_type = PIPE_QUERY_DRIVER_SPECIFIC + index;
|
||||
|
||||
if (counter->type == INTEL_PERF_COUNTER_TYPE_THROUGHPUT)
|
||||
|
@@ -180,7 +180,8 @@ iris_get_perf_counter_info(struct pipe_context *pipe,
|
||||
|
||||
intel_perf_query_result_clear(&results);
|
||||
|
||||
*name = counter->name;
|
||||
*name = INTEL_DEBUG(DEBUG_PERF_SYMBOL_NAMES) ?
|
||||
counter->symbol_name : counter->name;
|
||||
*desc = counter->desc;
|
||||
*offset = counter->offset;
|
||||
*data_size = intel_perf_query_counter_get_size(counter);
|
||||
|
@@ -99,6 +99,7 @@ static const struct debug_control debug_control[] = {
|
||||
{ "mesh", DEBUG_MESH },
|
||||
{ "stall", DEBUG_STALL },
|
||||
{ "capture-all", DEBUG_CAPTURE_ALL },
|
||||
{ "perf-symbol-names", DEBUG_PERF_SYMBOL_NAMES },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
|
@@ -89,6 +89,7 @@ extern uint64_t intel_debug;
|
||||
#define DEBUG_TASK (1ull << 41)
|
||||
#define DEBUG_MESH (1ull << 42)
|
||||
#define DEBUG_CAPTURE_ALL (1ull << 43)
|
||||
#define DEBUG_PERF_SYMBOL_NAMES (1ull << 44)
|
||||
|
||||
#define DEBUG_ANY (~0ull)
|
||||
|
||||
|
@@ -366,7 +366,10 @@ VkResult anv_EnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR(
|
||||
|
||||
vk_outarray_append_typed(VkPerformanceCounterDescriptionKHR, &out_desc, desc) {
|
||||
desc->flags = 0; /* None so far. */
|
||||
snprintf(desc->name, sizeof(desc->name), "%s", intel_counter->name);
|
||||
snprintf(desc->name, sizeof(desc->name), "%s",
|
||||
INTEL_DEBUG(DEBUG_PERF_SYMBOL_NAMES) ?
|
||||
intel_counter->symbol_name :
|
||||
intel_counter->name);
|
||||
snprintf(desc->category, sizeof(desc->category), "%s", intel_counter->category);
|
||||
snprintf(desc->description, sizeof(desc->description), "%s", intel_counter->desc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user