From: Chris Wilson <chris@chris-wilson.co.uk> To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>, Tvrtko Ursulin <tursulin@ursulin.net>, igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Subject: Re: [igt-dev] [PATCH i-g-t 2/2] intel_gpu_overlay: Update for class:instance engine tracepoints Date: Tue, 05 Jun 2018 20:40:42 +0100 [thread overview] Message-ID: <152822764202.9058.18039377220321146761@mail.alporthouse.com> (raw) In-Reply-To: <87698ffe-ed92-bbf9-d94f-2b9886e4554d@intel.com> Quoting Lionel Landwerlin (2018-06-05 18:14:58) > On 05/06/18 17:50, Tvrtko Ursulin wrote: > > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > > > A miminal hack to parse the new tracepoint format and invent new "ring > > id's" based on engine class and instance. > > > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> > > --- > > overlay/gpu-perf.c | 36 ++++++++++++++++++++++++++++-------- > > 1 file changed, 28 insertions(+), 8 deletions(-) > > > > diff --git a/overlay/gpu-perf.c b/overlay/gpu-perf.c > > index ea3480050ab9..e77125672088 100644 > > --- a/overlay/gpu-perf.c > > +++ b/overlay/gpu-perf.c > > @@ -85,7 +85,8 @@ struct tracepoint { > > > > int device_field; > > int ctx_field; > > - int ring_field; > > + int class_field; > > + int instance_field; > > int seqno_field; > > int global_seqno_field; > > int plane_field; > > @@ -151,8 +152,10 @@ tracepoint_id(int tp_id) > > tp->device_field = f; > > } else if (!strcmp(tp->fields[f].name, "ctx")) { > > tp->ctx_field = f; > > - } else if (!strcmp(tp->fields[f].name, "ring")) { > > - tp->ring_field = f; > > + } else if (!strcmp(tp->fields[f].name, "class")) { > > + tp->class_field = f; > > + } else if (!strcmp(tp->fields[f].name, "instance")) { > > + tp->instance_field = f; > > That looks good to me. We only support the most recent kernel? Yes. It's a devtool using a dev interface. It's sole purpose is for debugging the current kernel, or userspace in conjunction with drm-tip. It's a temporary hack... > > } else if (!strcmp(tp->fields[f].name, "seqno")) { > > tp->seqno_field = f; > > } else if (!strcmp(tp->fields[f].name, "global_seqno")) { > > @@ -175,6 +178,23 @@ tracepoint_id(int tp_id) > > tracepoints[tp_id].fields[ \ > > tracepoints[tp_id].field_name##_field].offset)) > > > > +#define READ_TP_FIELD_U16(sample, tp_id, field_name) \ > > + (*(const uint16_t *)((sample)->tracepoint_data + \ > > + tracepoints[tp_id].fields[ \ > > + tracepoints[tp_id].field_name##_field].offset)) > > + > > +#define GET_RING_ID(sample, tp_id) \ > > +({ \ > > + unsigned char class, instance, ring; \ > > +\ > > + class = READ_TP_FIELD_U16(sample, tp_id, class); \ > > + instance = READ_TP_FIELD_U16(sample, tp_id, instance); \ > > +\ > > + ring = class * 2 + instance; \ > > Do you want to make it clear that we cannot have more than 2 instances > per class? Or make it easier to spot and expand in future. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk> To: Lionel Landwerlin <lionel.g.landwerlin@intel.com>, Tvrtko Ursulin <tursulin@ursulin.net>, igt-dev@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org, Tvrtko Ursulin <tvrtko.ursulin@intel.com> Subject: Re: [igt-dev] [PATCH i-g-t 2/2] intel_gpu_overlay: Update for class:instance engine tracepoints Date: Tue, 05 Jun 2018 20:40:42 +0100 [thread overview] Message-ID: <152822764202.9058.18039377220321146761@mail.alporthouse.com> (raw) In-Reply-To: <87698ffe-ed92-bbf9-d94f-2b9886e4554d@intel.com> Quoting Lionel Landwerlin (2018-06-05 18:14:58) > On 05/06/18 17:50, Tvrtko Ursulin wrote: > > From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > > > A miminal hack to parse the new tracepoint format and invent new "ring > > id's" based on engine class and instance. > > > > Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> > > Cc: Lionel Landwerlin <lionel.g.landwerlin@intel.com> > > --- > > overlay/gpu-perf.c | 36 ++++++++++++++++++++++++++++-------- > > 1 file changed, 28 insertions(+), 8 deletions(-) > > > > diff --git a/overlay/gpu-perf.c b/overlay/gpu-perf.c > > index ea3480050ab9..e77125672088 100644 > > --- a/overlay/gpu-perf.c > > +++ b/overlay/gpu-perf.c > > @@ -85,7 +85,8 @@ struct tracepoint { > > > > int device_field; > > int ctx_field; > > - int ring_field; > > + int class_field; > > + int instance_field; > > int seqno_field; > > int global_seqno_field; > > int plane_field; > > @@ -151,8 +152,10 @@ tracepoint_id(int tp_id) > > tp->device_field = f; > > } else if (!strcmp(tp->fields[f].name, "ctx")) { > > tp->ctx_field = f; > > - } else if (!strcmp(tp->fields[f].name, "ring")) { > > - tp->ring_field = f; > > + } else if (!strcmp(tp->fields[f].name, "class")) { > > + tp->class_field = f; > > + } else if (!strcmp(tp->fields[f].name, "instance")) { > > + tp->instance_field = f; > > That looks good to me. We only support the most recent kernel? Yes. It's a devtool using a dev interface. It's sole purpose is for debugging the current kernel, or userspace in conjunction with drm-tip. It's a temporary hack... > > } else if (!strcmp(tp->fields[f].name, "seqno")) { > > tp->seqno_field = f; > > } else if (!strcmp(tp->fields[f].name, "global_seqno")) { > > @@ -175,6 +178,23 @@ tracepoint_id(int tp_id) > > tracepoints[tp_id].fields[ \ > > tracepoints[tp_id].field_name##_field].offset)) > > > > +#define READ_TP_FIELD_U16(sample, tp_id, field_name) \ > > + (*(const uint16_t *)((sample)->tracepoint_data + \ > > + tracepoints[tp_id].fields[ \ > > + tracepoints[tp_id].field_name##_field].offset)) > > + > > +#define GET_RING_ID(sample, tp_id) \ > > +({ \ > > + unsigned char class, instance, ring; \ > > +\ > > + class = READ_TP_FIELD_U16(sample, tp_id, class); \ > > + instance = READ_TP_FIELD_U16(sample, tp_id, instance); \ > > +\ > > + ring = class * 2 + instance; \ > > Do you want to make it clear that we cannot have more than 2 instances > per class? Or make it easier to spot and expand in future. -Chris _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-06-05 19:40 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-05 16:50 [PATCH i-g-t 1/2] scripts/trace.pl: Support class:instance engine tracepoints Tvrtko Ursulin 2018-06-05 16:50 ` [Intel-gfx] " Tvrtko Ursulin 2018-06-05 16:50 ` [PATCH i-g-t 2/2] intel_gpu_overlay: Update for " Tvrtko Ursulin 2018-06-05 16:50 ` [Intel-gfx] " Tvrtko Ursulin 2018-06-05 17:14 ` Lionel Landwerlin 2018-06-05 17:14 ` [igt-dev] " Lionel Landwerlin 2018-06-05 19:40 ` Chris Wilson [this message] 2018-06-05 19:40 ` Chris Wilson 2018-06-06 9:02 ` [PATCH i-g-t v2 " Tvrtko Ursulin 2018-06-06 9:02 ` [Intel-gfx] " Tvrtko Ursulin 2018-06-06 10:29 ` Lionel Landwerlin 2018-06-06 10:29 ` [igt-dev] " Lionel Landwerlin 2018-06-06 11:01 ` Tvrtko Ursulin 2018-06-06 11:01 ` [igt-dev] [Intel-gfx] " Tvrtko Ursulin 2018-06-05 17:15 ` [igt-dev] [PATCH i-g-t 1/2] scripts/trace.pl: Support " Lionel Landwerlin 2018-06-05 17:15 ` Lionel Landwerlin 2018-06-05 19:25 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] " Patchwork 2018-06-06 5:17 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork 2018-06-06 9:37 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] scripts/trace.pl: Support class:instance engine tracepoints (rev2) Patchwork 2018-06-06 10:30 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=152822764202.9058.18039377220321146761@mail.alporthouse.com \ --to=chris@chris-wilson.co.uk \ --cc=igt-dev@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ --cc=lionel.g.landwerlin@intel.com \ --cc=tursulin@ursulin.net \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.