anv: drop likely/unlikely around INTEL_DEBUG
It's included in declaration of INTEL_DEBUG. Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6732>
This commit is contained in:

committed by
Marge Bot

parent
4b9e38ca06
commit
e06da554e9
@@ -1750,7 +1750,7 @@ anv_queue_execbuf_locked(struct anv_queue *queue,
|
|||||||
submit->cmd_buffer &&
|
submit->cmd_buffer &&
|
||||||
submit->cmd_buffer->perf_query_pool;
|
submit->cmd_buffer->perf_query_pool;
|
||||||
|
|
||||||
if (unlikely(INTEL_DEBUG & DEBUG_BATCH)) {
|
if (INTEL_DEBUG & DEBUG_BATCH) {
|
||||||
if (submit->cmd_buffer) {
|
if (submit->cmd_buffer) {
|
||||||
if (has_perf_query) {
|
if (has_perf_query) {
|
||||||
struct anv_query_pool *query_pool = submit->cmd_buffer->perf_query_pool;
|
struct anv_query_pool *query_pool = submit->cmd_buffer->perf_query_pool;
|
||||||
@@ -1816,7 +1816,7 @@ anv_queue_execbuf_locked(struct anv_queue *queue,
|
|||||||
/* Some performance queries just the pipeline statistic HW, no need for
|
/* Some performance queries just the pipeline statistic HW, no need for
|
||||||
* OA in that case, so no need to reconfigure.
|
* OA in that case, so no need to reconfigure.
|
||||||
*/
|
*/
|
||||||
if (likely((INTEL_DEBUG & DEBUG_NO_OACONFIG) == 0) &&
|
if ((INTEL_DEBUG & DEBUG_NO_OACONFIG) == 0 &&
|
||||||
(query_info->kind == GEN_PERF_QUERY_TYPE_OA ||
|
(query_info->kind == GEN_PERF_QUERY_TYPE_OA ||
|
||||||
query_info->kind == GEN_PERF_QUERY_TYPE_RAW)) {
|
query_info->kind == GEN_PERF_QUERY_TYPE_RAW)) {
|
||||||
int ret = gen_ioctl(device->perf_fd, I915_PERF_IOCTL_CONFIG,
|
int ret = gen_ioctl(device->perf_fd, I915_PERF_IOCTL_CONFIG,
|
||||||
|
@@ -97,7 +97,7 @@ compiler_perf_log(void *data, const char *fmt, ...)
|
|||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
|
||||||
if (unlikely(INTEL_DEBUG & DEBUG_PERF))
|
if (INTEL_DEBUG & DEBUG_PERF)
|
||||||
mesa_logd_v(fmt, args);
|
mesa_logd_v(fmt, args);
|
||||||
|
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
@@ -398,7 +398,7 @@ add_aux_surface_if_supported(struct anv_device *device,
|
|||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(INTEL_DEBUG & DEBUG_NO_HIZ))
|
if (INTEL_DEBUG & DEBUG_NO_HIZ)
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
|
|
||||||
ok = isl_surf_get_hiz_surf(&device->isl_dev,
|
ok = isl_surf_get_hiz_surf(&device->isl_dev,
|
||||||
@@ -481,7 +481,7 @@ add_aux_surface_if_supported(struct anv_device *device,
|
|||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(INTEL_DEBUG & DEBUG_NO_RBC))
|
if (INTEL_DEBUG & DEBUG_NO_RBC)
|
||||||
return VK_SUCCESS;
|
return VK_SUCCESS;
|
||||||
|
|
||||||
ok = isl_surf_get_ccs_surf(&device->isl_dev,
|
ok = isl_surf_get_ccs_surf(&device->isl_dev,
|
||||||
|
@@ -187,7 +187,7 @@ VkResult anv_AcquirePerformanceConfigurationINTEL(
|
|||||||
if (!config)
|
if (!config)
|
||||||
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
|
return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||||
|
|
||||||
if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) {
|
if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) {
|
||||||
config->register_config =
|
config->register_config =
|
||||||
gen_perf_load_configuration(device->physical->perf, device->fd,
|
gen_perf_load_configuration(device->physical->perf, device->fd,
|
||||||
GEN_PERF_QUERY_GUID_MDAPI);
|
GEN_PERF_QUERY_GUID_MDAPI);
|
||||||
@@ -223,7 +223,7 @@ VkResult anv_ReleasePerformanceConfigurationINTEL(
|
|||||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||||
ANV_FROM_HANDLE(anv_performance_configuration_intel, config, _configuration);
|
ANV_FROM_HANDLE(anv_performance_configuration_intel, config, _configuration);
|
||||||
|
|
||||||
if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG)))
|
if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG))
|
||||||
gen_ioctl(device->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config->config_id);
|
gen_ioctl(device->fd, DRM_IOCTL_I915_PERF_REMOVE_CONFIG, &config->config_id);
|
||||||
|
|
||||||
ralloc_free(config->register_config);
|
ralloc_free(config->register_config);
|
||||||
@@ -241,7 +241,7 @@ VkResult anv_QueueSetPerformanceConfigurationINTEL(
|
|||||||
ANV_FROM_HANDLE(anv_performance_configuration_intel, config, _configuration);
|
ANV_FROM_HANDLE(anv_performance_configuration_intel, config, _configuration);
|
||||||
struct anv_device *device = queue->device;
|
struct anv_device *device = queue->device;
|
||||||
|
|
||||||
if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) {
|
if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) {
|
||||||
if (device->perf_fd < 0) {
|
if (device->perf_fd < 0) {
|
||||||
device->perf_fd = anv_device_perf_open(device, config->config_id);
|
device->perf_fd = anv_device_perf_open(device, config->config_id);
|
||||||
if (device->perf_fd < 0)
|
if (device->perf_fd < 0)
|
||||||
@@ -370,7 +370,7 @@ VkResult anv_AcquireProfilingLockKHR(
|
|||||||
|
|
||||||
assert(device->perf_fd == -1);
|
assert(device->perf_fd == -1);
|
||||||
|
|
||||||
if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) {
|
if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) {
|
||||||
fd = anv_device_perf_open(device, first_metric_set->oa_metrics_set_id);
|
fd = anv_device_perf_open(device, first_metric_set->oa_metrics_set_id);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return VK_TIMEOUT;
|
return VK_TIMEOUT;
|
||||||
@@ -385,7 +385,7 @@ void anv_ReleaseProfilingLockKHR(
|
|||||||
{
|
{
|
||||||
ANV_FROM_HANDLE(anv_device, device, _device);
|
ANV_FROM_HANDLE(anv_device, device, _device);
|
||||||
|
|
||||||
if (likely(!(INTEL_DEBUG & DEBUG_NO_OACONFIG))) {
|
if (!(INTEL_DEBUG & DEBUG_NO_OACONFIG)) {
|
||||||
assert(device->perf_fd >= 0);
|
assert(device->perf_fd >= 0);
|
||||||
close(device->perf_fd);
|
close(device->perf_fd);
|
||||||
}
|
}
|
||||||
|
@@ -247,7 +247,7 @@ anv_shader_compile_to_nir(struct anv_device *device,
|
|||||||
|
|
||||||
free(spec_entries);
|
free(spec_entries);
|
||||||
|
|
||||||
if (unlikely(INTEL_DEBUG & intel_debug_flag_for_shader_stage(stage))) {
|
if (INTEL_DEBUG & intel_debug_flag_for_shader_stage(stage)) {
|
||||||
fprintf(stderr, "NIR (from SPIR-V) for %s shader:\n",
|
fprintf(stderr, "NIR (from SPIR-V) for %s shader:\n",
|
||||||
gl_shader_stage_name(stage));
|
gl_shader_stage_name(stage));
|
||||||
nir_print_shader(nir, stderr);
|
nir_print_shader(nir, stderr);
|
||||||
|
@@ -536,7 +536,7 @@ void anv_loge_v(const char *format, va_list va);
|
|||||||
#define anv_perf_warn(instance, obj, format, ...) \
|
#define anv_perf_warn(instance, obj, format, ...) \
|
||||||
do { \
|
do { \
|
||||||
static bool reported = false; \
|
static bool reported = false; \
|
||||||
if (!reported && unlikely(INTEL_DEBUG & DEBUG_PERF)) { \
|
if (!reported && (INTEL_DEBUG & DEBUG_PERF)) { \
|
||||||
__anv_perf_warn(instance, obj, REPORT_OBJECT_TYPE(obj), __FILE__, __LINE__,\
|
__anv_perf_warn(instance, obj, REPORT_OBJECT_TYPE(obj), __FILE__, __LINE__,\
|
||||||
format, ##__VA_ARGS__); \
|
format, ##__VA_ARGS__); \
|
||||||
reported = true; \
|
reported = true; \
|
||||||
|
@@ -1827,7 +1827,7 @@ genX(cmd_buffer_config_l3)(struct anv_cmd_buffer *cmd_buffer,
|
|||||||
if (cfg == cmd_buffer->state.current_l3_config)
|
if (cfg == cmd_buffer->state.current_l3_config)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (unlikely(INTEL_DEBUG & DEBUG_L3)) {
|
if (INTEL_DEBUG & DEBUG_L3) {
|
||||||
mesa_logd("L3 config transition: ");
|
mesa_logd("L3 config transition: ");
|
||||||
gen_dump_l3_config(cfg, stderr);
|
gen_dump_l3_config(cfg, stderr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user