mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: Dave Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm: drm_err: Remove unnecessary __func__ argument
Date: Mon, 13 Oct 2014 08:54:52 -0700	[thread overview]
Message-ID: <1413215692.1287.11.camel@joe-AO725> (raw)
In-Reply-To: <CANq1E4Rz9REGPj=Wga61h13yMfgUdB4K3UTmLFYWnRpYf+iTSA@mail.gmail.com>

On Mon, 2014-10-13 at 17:46 +0200, David Herrmann wrote:
> Hi
> 
> On Sun, Oct 12, 2014 at 7:08 AM, Joe Perches <joe@perches.com> wrote:
> > Removing the unnecessary drm_err __func__ argument by using
> > the equivalent %pf and __builtin_return_address(0) makes the
> > code smaller for every use of the DRM_ERROR macro.
> >
> > For instance: (allmodconfig)
> >
> > $ size drivers/gpu/drm/i915/i915.o*
> >    text    data     bss     dec     hex filename
> >  922447  193257  296736 1412440  158d58 drivers/gpu/drm/i915/i915.o.new
> >  928111  193257  296736 1418104  15a378 drivers/gpu/drm/i915/i915.o.old
> 
> You might want to mention that this requires a binary-search through
> kallsyms on each call.

All these calls are infrequently taken error paths
and the cost of the printk itself is _far_ higher
than a binary search for the symbol.

> I guess that's the reason you didn't use it for
> drm_ut_debug_printk()? I'm fine with doing this on drm_err(). Looks
> good.

No, the reason I didn't do it there is that those calls
should really be consolidated and be able to use dynamic_debug.
It'd be a separate patch.

cheers, Joe


      reply	other threads:[~2014-10-13 15:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22 16:30 [PATCH] drm: change drm_err return type to void Joe Perches
2014-09-23 13:00 ` Jani Nikula
2014-09-23 13:52   ` Daniel Vetter
2014-10-12  5:08     ` [PATCH] drm: drm_err: Remove unnecessary __func__ argument Joe Perches
2014-10-13 15:46       ` David Herrmann
2014-10-13 15:54         ` Joe Perches [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=1413215692.1287.11.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dh.herrmann@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®