``offsets``
print offsets of instructions
+.. envvar:: INTEL_EXTENDED_METRICS
+
+ By default, only a standard set of gpu metrics are advertised. This
+ reduces time to collect metrics and hides infrequently used metrics.
+ To enable all metrics, set value to 1.
+
.. envvar:: INTEL_MEASURE
Collects GPU timestamps over common intervals, and generates a CSV report
#include "util/bitscan.h"
#include "util/macros.h"
#include "util/mesa-sha1.h"
+#include "util/u_debug.h"
#include "util/u_math.h"
#define FILE_DEBUG_FLAG DEBUG_PERFMON
return read_file_uint64(buf, value);
}
+static bool
+oa_config_enabled(struct intel_perf_config *perf,
+ const struct intel_perf_query_info *query) {
+ // Hide extended metrics unless enabled with env param
+ bool is_extended_metric = strncmp(query->name, "Ext", 3) == 0;
+
+ return perf->enable_all_metrics || !is_extended_metric;
+}
+
static void
register_oa_config(struct intel_perf_config *perf,
const struct intel_device_info *devinfo,
const struct intel_perf_query_info *query,
uint64_t config_id)
{
+ if (!oa_config_enabled(perf, query))
+ return;
+
struct intel_perf_query_info *registered_query =
intel_perf_append_query_info(perf, 0);
}
perf->i915_query_supported = i915_query_perf_config_supported(perf, fd);
+ perf->enable_all_metrics = debug_get_bool_option("INTEL_EXTENDED_METRICS", false);
perf->i915_perf_version = i915_perf_version(fd);
/* TODO: We should query this from i915 */
/* Whether i915 has DRM_I915_QUERY_PERF_CONFIG support. */
bool i915_query_supported;
+ /* Have extended metrics been enabled */
+ bool enable_all_metrics;
+
/* Version of the i915-perf subsystem, refer to i915_drm.h. */
int i915_perf_version;