public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v6] drm/i915: Add tracepoints to track a vm during its lifetime
Date: Mon, 10 Nov 2014 11:43:49 +0000	[thread overview]
Message-ID: <5460A4F5.2090709@intel.com> (raw)
In-Reply-To: <5460A438.5080804@intel.com>

On 11/10/2014 11:40 AM, Ceraolo Spurio, Daniele wrote:
> On 11/8/2014 8:44 AM, Chris Wilson wrote:
>> On Fri, Nov 07, 2014 at 05:45:01PM +0000,
>> daniele.ceraolospurio@intel.com wrote:
>>> +/**
>>> + * DOC: execlist_submit_context tracepoint
>>> + *
>>> + * These tracepoint are used to track the contexts that are
>>> submitted to the
>>> + * ring. An mm switch is automatically performed by the GPU during
>>> the context
>>> + * switch. Given the fact that the mm switch is an important point
>>> in the
>>> + * lifetime of a vm, the vm assigned to the context is also printed
>>> by the
>>> + * tracepoint when full ppgtt is enabled.
>>> + */
>>> +TRACE_EVENT(execlists_submit_context,
>>> +    TP_PROTO(struct intel_engine_cs *ring, u32 to_num, struct
>>> intel_context *to),
>>> +
>>> +    TP_ARGS(ring, to_num, to),
>>> +
>>> +    TP_STRUCT__entry(
>>> +            __field(u32, ring)
>>> +            __field(u32, to_num)
>>> +            __field(struct intel_context *, to)
>>> +            __field(struct i915_address_space *, vm)
>>> +            __field(u32, dev)
>>> +    ),
>>> +
>>> +    TP_fast_assign(
>>> +            __entry->ring = ring->id;
>>> +            __entry->to_num = to_num;
>>> +            __entry->to = to;
>>> +            __entry->vm = to->ppgtt ? &to->ppgtt->base : NULL;
>>> +            __entry->dev = ring->dev->primary->index;
>>> +    ),
>>> +
>>> +    TP_printk("dev=%u, ring=%u, ctx%d=%p, ctx_vm=%p",
>>> +          __entry->dev, __entry->ring,
>>> +          __entry->to_num, __entry->to, __entry->vm)
>>> +);
>>> +
>>>   #endif /* _I915_TRACE_H_ */
>>>
>>>   /* This part must be outside protection */
>>> diff --git a/drivers/gpu/drm/i915/intel_lrc.c
>>> b/drivers/gpu/drm/i915/intel_lrc.c
>>> index 6025ac7..e72759d 100644
>>> --- a/drivers/gpu/drm/i915/intel_lrc.c
>>> +++ b/drivers/gpu/drm/i915/intel_lrc.c
>>> @@ -135,6 +135,7 @@
>>>   #include <drm/drmP.h>
>>>   #include <drm/i915_drm.h>
>>>   #include "i915_drv.h"
>>> +#include "i915_trace.h"
>>>
>>>   #define GEN8_LR_CONTEXT_RENDER_SIZE (20 * PAGE_SIZE)
>>>   #define GEN8_LR_CONTEXT_OTHER_SIZE (2 * PAGE_SIZE)
>>> @@ -367,6 +368,7 @@ static void execlists_submit_contexts(struct
>>> intel_engine_cs *ring,
>>>       BUG_ON(!ctx_obj0);
>>>       WARN_ON(!i915_gem_obj_is_pinned(ctx_obj0));
>>>
>>> +    trace_execlists_submit_context(ring, 0, to0);
>>>       execlists_ctx_write_tail(ctx_obj0, tail0);
>>
>> This is very tenuous. This is not part of the context lifetime but of
>> the request.
>> -Chris
>>
>
> The aim wasn't to track the context or the request but to track the
> switch_mm. considering that in execlist mode that is automatically done
> by the GPU when the ctx is moved on the ring, this looked like a good
> place to put the trace. What were you exactly concerned about?
>
> Thanks,
> Daniele
>

+ intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2014-11-10 11:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25 16:10 [PATCH v3] drm/i915: Add ppgtt create/release trace points daniele.ceraolospurio
2014-09-29 13:06 ` Daniel Vetter
2014-10-22 13:28 ` [PATCH v4] " daniele.ceraolospurio
2014-10-22 15:29   ` Daniel Vetter
2014-10-24 15:30   ` [PATCH v5] " daniele.ceraolospurio
2014-10-27  8:49     ` Chris Wilson
2014-10-27 11:03       ` Ceraolo Spurio, Daniele
2014-10-28  8:47         ` Chris Wilson
2014-11-07 17:45     ` [PATCH v6] drm/i915: Add tracepoints to track a vm during its lifetime daniele.ceraolospurio
2014-11-08  8:44       ` Chris Wilson
     [not found]         ` <5460A438.5080804@intel.com>
2014-11-10 11:43           ` Ceraolo Spurio, Daniele [this message]
     [not found]           ` <20141110115431.GC22109@nuc-i3427.alporthouse.com>
2014-11-10 12:28             ` Ceraolo Spurio, Daniele
2014-11-10 12:34               ` Chris Wilson
2014-11-10 13:44       ` [PATCH v7] " daniele.ceraolospurio
2014-11-11  3:00         ` [PATCH v7] drm/i915: Add tracepoints to track a vm shuang.he
2014-11-11  9:21         ` [PATCH v7] drm/i915: Add tracepoints to track a vm during its lifetime Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5460A4F5.2090709@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox