All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Maíra Canal" <mcanal@igalia.com>,
	"Melissa Wen" <mwen@igalia.com>, "Iago Toral" <itoral@igalia.com>,
	"Jose Maria Casanova Crespo" <jmcasanova@igalia.com>,
	"Juan A . Suárez" <jasuarez@igalia.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Daniel Vetter" <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, kernel-dev@igalia.com
Subject: Re: [PATCH v2 0/6] drm/v3d: Improve Performance Counters handling
Date: Wed, 29 May 2024 10:30:24 +0300	[thread overview]
Message-ID: <87ed9lkrcf.fsf@intel.com> (raw)
In-Reply-To: <8a86f1a3-f59e-41f9-a6ea-17526944e0ac@igalia.com>

On Tue, 21 May 2024, Maíra Canal <mcanal@igalia.com> wrote:
> Hi Jani,
>
> On 5/21/24 08:07, Jani Nikula wrote:
>> On Mon, 20 May 2024, Maíra Canal <mcanal@igalia.com> wrote:
>>> On 5/12/24 19:23, Maíra Canal wrote:>
>>>> Maíra Canal (6):
>>>>     drm/v3d: Add Performance Counters descriptions for V3D 4.2 and 7.1
>>>>     drm/v3d: Different V3D versions can have different number of perfcnt
>>>>     drm/v3d: Create a new V3D parameter for the maximum number of perfcnt
>>>>     drm/v3d: Create new IOCTL to expose performance counters information
>>>>     drm/v3d: Use V3D_MAX_COUNTERS instead of V3D_PERFCNT_NUM
>>>>     drm/v3d: Deprecate the use of the Performance Counters enum >
>>>>    drivers/gpu/drm/v3d/v3d_drv.c                 |  11 +
>>>>    drivers/gpu/drm/v3d/v3d_drv.h                 |  14 +-
>>>>    drivers/gpu/drm/v3d/v3d_perfmon.c             |  36 ++-
>>>>    .../gpu/drm/v3d/v3d_performance_counters.h    | 208 ++++++++++++++++++
>>>>    drivers/gpu/drm/v3d/v3d_sched.c               |   2 +-
>>>>    include/uapi/drm/v3d_drm.h                    |  48 ++++
>>>>    6 files changed, 316 insertions(+), 3 deletions(-)
>>>>    create mode 100644 drivers/gpu/drm/v3d/v3d_performance_counters.h
>>>>
>>>
>>> Applied to drm-misc/drm-misc-next!
>> 
>> What compiler do you use? I'm hitting the same as kernel test robot [1]
>> with arm-linux-gnueabihf-gcc 12.2.0.
>
> I use clang version 17.0.6.
>
>> 
>> In general, I don't think it's a great idea to put arrays in headers,
>> and then include it everywhere via v3d_drv.h. You're not just relying on
>> the compiler to optimize it away in compilation units where its not
>> referenced (likely to happen), but also for the linker to deduplicate
>> rodata (possible, but I'm not sure that it will happen).
>> 
>> I think you need to move the arrays to a .c file, and then either a) add
>> interfaces to access the arrays, or b) declare the arrays and make them
>> global. For the latter you also need to figure out how to expose the
>> size.
>
> I'll write a patch to fix it. Sorry for the disturbance, I didn't notice
> it with clang.

Another report [1].


BR,
Jani.

[1] https://lore.kernel.org/all/20240529122955.4cc16889@canb.auug.org.au



-- 
Jani Nikula, Intel

      reply	other threads:[~2024-05-29  7:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-12 22:23 [PATCH v2 0/6] drm/v3d: Improve Performance Counters handling Maíra Canal
2024-05-12 22:23 ` [PATCH v2 1/6] drm/v3d: Add Performance Counters descriptions for V3D 4.2 and 7.1 Maíra Canal
2024-05-12 22:23 ` [PATCH v2 2/6] drm/v3d: Different V3D versions can have different number of perfcnt Maíra Canal
2024-05-12 22:23 ` [PATCH v2 3/6] drm/v3d: Create a new V3D parameter for the maximum " Maíra Canal
2024-05-12 22:23 ` [PATCH v2 4/6] drm/v3d: Create new IOCTL to expose performance counters information Maíra Canal
2024-05-12 22:23 ` [PATCH v2 5/6] drm/v3d: Use V3D_MAX_COUNTERS instead of V3D_PERFCNT_NUM Maíra Canal
2024-05-12 22:23 ` [PATCH v2 6/6] drm/v3d: Deprecate the use of the Performance Counters enum Maíra Canal
2024-05-20 20:29 ` [PATCH v2 0/6] drm/v3d: Improve Performance Counters handling Maíra Canal
2024-05-21 11:07   ` Jani Nikula
2024-05-21 11:45     ` Maíra Canal
2024-05-29  7:30       ` Jani Nikula [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=87ed9lkrcf.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=itoral@igalia.com \
    --cc=jasuarez@igalia.com \
    --cc=jmcasanova@igalia.com \
    --cc=kernel-dev@igalia.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mcanal@igalia.com \
    --cc=mripard@kernel.org \
    --cc=mwen@igalia.com \
    --cc=tzimmermann@suse.de \
    /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 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.