From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] tools/intel_gpu_top: Fixup imc event parsing
Date: Thu, 26 Nov 2020 16:05:04 +0000 [thread overview]
Message-ID: <e260b30d-2fc7-aede-3fbd-2382fbe4d51e@linux.intel.com> (raw)
In-Reply-To: <20201126154856.738141-1-chris@chris-wilson.co.uk>
On 26/11/2020 15:48, Chris Wilson wrote:
> After combining rapl_parse and imc_parse into a single pmu_parse, I left
> the "energy-" prefixes used by rapl (but not imc) in place. Lift the
> prefix to rapl_open() so that pmu_parse() does work for both rapl and
> imc!
>
> Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Fixes: d0b71b967ccd ("tools/intel_gpu_top: Consolidate imc to use pmu_counter")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> ---
> tools/intel_gpu_top.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index 5d42a2fad..3ff9236ed 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -151,13 +151,13 @@ static int pmu_parse(struct pmu_counter *pmu, const char *path, const char *str)
>
> result &= igt_sysfs_scanf(dir, "type", "%"PRIu64, &pmu->type) == 1;
>
> - snprintf(buf, sizeof(buf) - 1, "events/energy-%s", str);
> + snprintf(buf, sizeof(buf) - 1, "events/%s", str);
> result &= igt_sysfs_scanf(dir, buf, "event=%"PRIx64, &pmu->config) == 1;
>
> - snprintf(buf, sizeof(buf) - 1, "events/energy-%s.scale", str);
> + snprintf(buf, sizeof(buf) - 1, "events/%s.scale", str);
> result &= igt_sysfs_scanf(dir, buf, "%lf", &pmu->scale) == 1;
>
> - snprintf(buf, sizeof(buf) - 1, "events/energy-%s.unit", str);
> + snprintf(buf, sizeof(buf) - 1, "events/%s.unit", str);
> result &= igt_sysfs_scanf(dir, buf, "%127s", buf) == 1;
> pmu->units = strdup(buf);
>
> @@ -217,13 +217,13 @@ rapl_open(struct pmu_counter *pmu,
> static void gpu_power_open(struct pmu_counter *pmu,
> struct engines *engines)
> {
> - rapl_open(pmu, "gpu", engines);
> + rapl_open(pmu, "energy-gpu", engines);
> }
>
> static void pkg_power_open(struct pmu_counter *pmu,
> struct engines *engines)
> {
> - rapl_open(pmu, "pkg", engines);
> + rapl_open(pmu, "energy-pkg", engines);
> }
>
> static uint64_t
>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
prev parent reply other threads:[~2020-11-26 16:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 15:48 [Intel-gfx] [PATCH i-g-t] tools/intel_gpu_top: Fixup imc event parsing Chris Wilson
2020-11-26 16:05 ` Tvrtko Ursulin [this message]
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=e260b30d-2fc7-aede-3fbd-2382fbe4d51e@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=igt-dev@lists.freedesktop.org \
--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