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: Show the active device
Date: Mon, 16 Nov 2020 11:12:55 +0000 [thread overview]
Message-ID: <28e4553d-1ae0-94a8-dc43-a0b4bb19d156@linux.intel.com> (raw)
In-Reply-To: <20201113135618.1235497-1-chris@chris-wilson.co.uk>
On 13/11/2020 13:56, Chris Wilson wrote:
> Include the active device name on the update screen.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
> tools/intel_gpu_top.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/tools/intel_gpu_top.c b/tools/intel_gpu_top.c
> index 298defa4e..c16e80502 100644
> --- a/tools/intel_gpu_top.c
> +++ b/tools/intel_gpu_top.c
> @@ -1027,7 +1027,8 @@ static bool print_groups(struct cnt_group **groups)
> }
>
> static int
> -print_header(struct engines *engines, double t,
> +print_header(const struct igt_device_card *card,
> + struct engines *engines, double t,
> int lines, int con_w, int con_h, bool *consumed)
> {
> struct pmu_counter fake_pmu = {
> @@ -1106,14 +1107,15 @@ print_header(struct engines *engines, double t,
> printf("\033[H\033[J");
>
> if (lines++ < con_h) {
> + printf("intel-gpu-top: %s - ", card->card);
> if (!engines->discrete)
> - printf("intel-gpu-top - %s/%s MHz; %s%% RC6; %s %s; %s irqs/s\n",
> + printf("%s/%s MHz; %s%% RC6; %s %s; %s irqs/s\n",
> freq_items[1].buf, freq_items[0].buf,
> rc6_items[0].buf, power_items[0].buf,
> engines->rapl_unit,
> irq_items[0].buf);
> else
> - printf("intel-gpu-top - %s/%s MHz; %s%% RC6; %s irqs/s\n",
> + printf("%s/%s MHz; %s%% RC6; %s irqs/s\n",
> freq_items[1].buf, freq_items[0].buf,
> rc6_items[0].buf, irq_items[0].buf);
> }
> @@ -1457,7 +1459,8 @@ int main(int argc, char **argv)
> break;
>
> while (!consumed) {
> - lines = print_header(engines, t, lines, con_w, con_h,
> + lines = print_header(&card, engines,
> + t, lines, con_w, con_h,
> &consumed);
>
> if (engines->imc_fd)
>
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-16 11:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 13:56 [Intel-gfx] [PATCH i-g-t] tools/intel_gpu_top: Show the active device Chris Wilson
2020-11-16 11:12 ` 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=28e4553d-1ae0-94a8-dc43-a0b4bb19d156@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