#define FILE_DEBUG_FLAG DEBUG_PERFMON
-#define OA_REPORT_INVALID_CTX_ID (0xffffffff)
-
static bool
is_dir_or_link(const struct dirent *entry, const char *parent_dir)
{
{
int i;
- if (result->hw_id == OA_REPORT_INVALID_CTX_ID &&
- start[2] != OA_REPORT_INVALID_CTX_ID)
+ if (result->hw_id == INTEL_PERF_INVALID_CTX_ID &&
+ start[2] != INTEL_PERF_INVALID_CTX_ID)
result->hw_id = start[2];
if (result->reports_accumulated == 0)
result->begin_timestamp = start[1];
intel_perf_query_result_clear(struct intel_perf_query_result *result)
{
memset(result, 0, sizeof(*result));
- result->hw_id = OA_REPORT_INVALID_CTX_ID; /* invalid */
+ result->hw_id = INTEL_PERF_INVALID_CTX_ID;
}
void
struct intel_perf_config;
struct intel_perf_query_info;
+#define INTEL_PERF_INVALID_CTX_ID (0xffffffff)
+
enum intel_perf_counter_type {
INTEL_PERF_COUNTER_TYPE_EVENT,
INTEL_PERF_COUNTER_TYPE_DURATION_NORM,
uint64_t properties[DRM_I915_PERF_PROP_MAX * 2];
uint32_t p = 0;
- /* Single context sampling */
- properties[p++] = DRM_I915_PERF_PROP_CTX_HANDLE;
- properties[p++] = ctx_id;
+ /* Single context sampling if valid context id. */
+ if (ctx_id != INTEL_PERF_INVALID_CTX_ID) {
+ properties[p++] = DRM_I915_PERF_PROP_CTX_HANDLE;
+ properties[p++] = ctx_id;
+ }
/* Include OA reports in samples */
properties[p++] = DRM_I915_PERF_PROP_SAMPLE_OA;