Quoting Lionel Landwerlin (2018-02-09 17:47:44)
> Hey Chris,
> From the i915/perf point of view, I'm fine with this change.
> The pinning of the hw_id when monitoring a single context (with OA)
> doesn't break the existing userspace (I can only think of Mesa).
> I'm also trying to build up a system wide monitoring feature in GPUTop
> with a timeline display. This change makes it a bit more challenging.
> But this isn't really an expected feature, it's just nice to have.
> What I'm thinking of would be to keep a circular buffer of requests in
> the order they're submitted to an engine.
> Then the i915 perf driver could correlate between the context-switch
> tagged reports coming from OA and the requests submitted.
> Much like the OA buffer, this circular buffer could overflow at which
> point we signal the application using the i915 perf driver and it'll
> most likely close the driver and try again.
> I would need that have the hw_id added to the requests. Does that sounds
You already add hw_id to the tracepoint. For the requests, it is just
req->ctx->hw_id, valid from submission to retirement. Hmm, the
tracepoint is broken (use-after-free in ctx->hw_id). What value do you
want for HSW? (This patch will assign all legacy submission to HW ID 0.)
But aiui, for HSW oa you want lrca not HW ID. So both the use-after-free
and alternative ids suggest storing it on the request directly.
How do you get the HW ID out, via the tracepoint right?
Intel-gfx mailing list