[PATCH 1/2] drm/i915/gvt: Add set_ggtt_entry tracing event
Zhenyu Wang
zhenyuw at linux.intel.com
Mon May 20 05:55:35 UTC 2019
On 2019.05.20 13:36:48 +0800, Tina Zhang wrote:
> Add set_ggtt_entry tracing event.
>
> Signed-off-by: Tina Zhang <tina.zhang at intel.com>
> ---
> drivers/gpu/drm/i915/gvt/gtt.c | 1 +
> drivers/gpu/drm/i915/gvt/trace.h | 19 +++++++++++++++++++
> 2 files changed, 20 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
> index c2f7d20f6346..dcc207f04b75 100644
> --- a/drivers/gpu/drm/i915/gvt/gtt.c
> +++ b/drivers/gpu/drm/i915/gvt/gtt.c
> @@ -629,6 +629,7 @@ static void ggtt_set_host_entry(struct intel_vgpu_mm *mm,
> struct intel_gvt_gtt_pte_ops *pte_ops = mm->vgpu->gvt->gtt.pte_ops;
>
> GEM_BUG_ON(mm->type != INTEL_GVT_MM_GGTT);
> + trace_set_ggtt_entry(mm->vgpu->id, entry->val64);
>
yep, adding trace is good for this, and assume we also need index info too.
Also for this issue, we might also add type validation for entry as well.
> pte_ops->set_entry(NULL, entry, index, false, 0, mm->vgpu);
> }
> diff --git a/drivers/gpu/drm/i915/gvt/trace.h b/drivers/gpu/drm/i915/gvt/trace.h
> index 6d787750d279..69c374868146 100644
> --- a/drivers/gpu/drm/i915/gvt/trace.h
> +++ b/drivers/gpu/drm/i915/gvt/trace.h
> @@ -373,6 +373,25 @@ TRACE_EVENT(render_mmio,
> __entry->old_val, __entry->new_val)
> );
>
> +TRACE_EVENT(set_ggtt_entry,
> + TP_PROTO(int id, unsigned long address),
> +
> + TP_ARGS(id, address),
> +
> + TP_STRUCT__entry(
> + __field(int, id)
> + __field(unsigned long, address)
> + ),
> +
> + TP_fast_assign(
> + __entry->id = id;
> + __entry->address = address;
> + ),
> +
> + TP_printk("vgpu%d:set ggtt entry 0x%lx \n",
> + __entry->id, __entry->address)
> +);
> +
> #endif /* _GVT_TRACE_H_ */
>
> /* This part must be out of protection */
> --
> 2.17.1
>
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20190520/9a952541/attachment-0001.sig>
More information about the intel-gvt-dev
mailing list