mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 13:38:06 +02:00
intel/ds: report when OA metrics are unavailable
Promote DBG() failure paths in enumerate_sysfs_metrics() to mesa_logw() so users see why OA metrics are unavailable without needing INTEL_DEBUG. Also log in PPS when no OA queries are available after initialization. Signed-off-by: Michael Cheng <michael.cheng@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40898>
This commit is contained in:
parent
16c17d6698
commit
06c9c08c48
3 changed files with 15 additions and 3 deletions
|
|
@ -80,13 +80,21 @@ bool IntelDriver::init_perfcnt()
|
|||
|
||||
if (perf->cfg->features_supported & INTEL_PERF_FEATURE_OA_BLOCKED_BY_POLICY) {
|
||||
PPS_LOG_ERROR("OA metrics access blocked by system policy "
|
||||
"(gpu=%d, driver=%s). "
|
||||
"(gpu=%d, driver=%s): "
|
||||
"Check kernel paranoid settings or run as root.",
|
||||
drm_device.gpu_num,
|
||||
drm_device.name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
if (perf->cfg->n_queries == 0) {
|
||||
PPS_LOG_ERROR("No OA queries available for this device "
|
||||
"(gpu=%d, driver=%s)",
|
||||
drm_device.gpu_num,
|
||||
drm_device.name.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
const char *metric_set_name = os_get_option("INTEL_PERFETTO_METRIC_SET");
|
||||
|
||||
struct intel_perf_query_info *default_query = nullptr;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,10 @@
|
|||
#include "intel_pps_perf.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <util/ralloc.h>
|
||||
#include <utility>
|
||||
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@
|
|||
|
||||
#include "dev/intel_debug.h"
|
||||
#include "dev/intel_device_info.h"
|
||||
#include "util/log.h"
|
||||
#include "dev/virtio/intel_virtio.h"
|
||||
|
||||
#include "perf/i915/intel_perf.h"
|
||||
|
|
@ -201,13 +202,13 @@ enumerate_sysfs_metrics(struct intel_perf_config *perf,
|
|||
|
||||
len = snprintf(buf, sizeof(buf), "%s/metrics", perf->sysfs_dev_dir);
|
||||
if (len < 0 || len >= sizeof(buf)) {
|
||||
DBG("Failed to concatenate path to sysfs metrics/ directory\n");
|
||||
mesa_logw("intel_perf: failed to concatenate path to sysfs metrics/ directory\n");
|
||||
return;
|
||||
}
|
||||
|
||||
metricsdir = opendir(buf);
|
||||
if (!metricsdir) {
|
||||
DBG("Failed to open %s: %m\n", buf);
|
||||
mesa_logw("intel_perf: failed to open OA metrics directory %s: %m\n", buf);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue