Lines Matching refs:report

124  *   and while we could pull a report out of the OA buffer we can't
125 * trigger a report from the cpu on demand.
127 * Related to being report based; the OA counters are configured in HW as a
132 * OA unit report format used to capture all counters in a set, or specify a
148 * With the OA unit's report formats, counters are packed together as 32
149 * or 40bit values, with the largest report size being 256 bytes.
173 * ring buffer. To include more than the OA report we'd have to copy the
174 * report into an intermediate larger buffer. I'd been considering allowing a
188 * majority of the OA driver ran in atomic context, including all OA report
240 * by checking for a zeroed report-id field in tail reports, we want to account
246 * report with its first 2 dwords not 0 meaning its previous report is
249 * first dword is the reason for this report while the second is the timestamp,
281 * overflow in OA report timestamps.
314 /* XXX: beware if future OA HW adds new report formats that the current
350 * @oa_format: An OA unit HW report format
462 static u64 oa_report_id(struct i915_perf_stream *stream, void *report)
464 return oa_report_header_64bit(stream) ? *(u64 *)report : *(u32 *)report;
467 static u64 oa_report_reason(struct i915_perf_stream *stream, void *report)
469 return (oa_report_id(stream, report) >> OAREPORT_REASON_SHIFT) &
475 static void oa_report_id_clear(struct i915_perf_stream *stream, u32 *report)
478 *(u64 *)report = 0;
480 *report = 0;
483 static bool oa_report_ctx_invalid(struct i915_perf_stream *stream, void *report)
485 return !(oa_report_id(stream, report) &
489 static u64 oa_timestamp(struct i915_perf_stream *stream, void *report)
492 *((u64 *)report + 1) :
493 *((u32 *)report + 1);
496 static void oa_timestamp_clear(struct i915_perf_stream *stream, u32 *report)
499 *(u64 *)&report[2] = 0;
501 report[1] = 0;
504 static u32 oa_context_id(struct i915_perf_stream *stream, u32 *report)
506 u32 ctx_id = oa_report_header_64bit(stream) ? report[4] : report[2];
511 static void oa_context_id_squash(struct i915_perf_stream *stream, u32 *report)
514 report[4] = INVALID_CTX_ID;
516 report[2] = INVALID_CTX_ID;
561 * steps. Also the report size may not be a power of 2. Compute
562 * potentially partially landed report in the OA buffer
572 /* Walk the stream backward until we find a report with report
575 * to 256 bytes long, we can't tell whether a report has fully
576 * landed in memory before the report id and timestamp of the
577 * following report have effectively landed.
584 void *report = stream->oa_buffer.vaddr + tail;
586 if (oa_report_id(stream, report) ||
587 oa_timestamp(stream, report))
596 "unlanded report(s) head=0x%x tail=0x%x hw_tail=0x%x\n",
615 * @type: The kind of status to report to userspace
644 * append_oa_sample - Copies single OA report into userspace read() buffer.
649 * @report: A single OA report to (optionally) include as part of the sample
664 const u8 *report)
684 report_size_partial = oa_buf_end - report;
687 if (copy_to_user(buf, report, report_size_partial))
694 } else if (copy_to_user(buf, report, report_size)) {
753 * only be incremented by multiples of the report size.
766 u8 *report = oa_buf_base + head;
767 u32 *report32 = (void *)report;
773 * triggered this specific report (mostly timer
776 reason = oa_report_reason(stream, report);
793 * context-switch-report: This is a report with the reason type
797 * context-valid-bit: A bit that is set in the report ID field
801 * context-switch-report with context-valid-bit set to 0.
807 * switch report if a new context switched in. For all other
813 * below to squash the context ID would render the report
819 if (oa_report_ctx_invalid(stream, report) &&
854 * identify a switch before any 'context switch' report.
871 report);
880 * Clear out the report id and timestamp as a means
890 /* Zero out the entire report */
1062 * only be incremented by multiples of the report size (notably also
1076 u8 *report = oa_buf_base + head;
1077 u32 *report32 = (void *)report;
1079 /* All the report sizes factor neatly into the buffer
1080 * size so we never expect to see a report split
1090 "Spurious OA head ptr: non-integral report offset\n");
1094 /* The report-ID field for periodic samples includes
1096 * the report and is never expected to be zero so we
1097 * can check that the report isn't invalid before
1103 "Skipping spurious, invalid OA report\n");
1107 ret = append_oa_sample(stream, buf, count, offset, report);
1173 * which will start to report a near-empty buffer after an
1691 gt_notice(gt, "%d spurious OA report notices suppressed due to ratelimiting\n",
1734 * report-id field to make sure it's non-zero which relies on
3291 "Only OA report sampling supported\n");
3314 "OA report format not specified\n");
3479 * oabuffer has >= 1 report we don't immediately know whether
3497 /* We allow the poll checking to sometimes report false positive EPOLLIN
3498 * events where we might actually report EAGAIN on read() if there's
4069 "Out-of-range OA report format %llu\n",
4075 "Unsupported OA report format %llu\n",