mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jani Nikula <jani.nikula@linux.intel.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: Reduce object size of drm_dev_printk/DRM_DEV_<LEVEL> uses
Date: Mon, 25 Sep 2017 05:28:17 -0700	[thread overview]
Message-ID: <1506342497.29089.1.camel@perches.com> (raw)
In-Reply-To: <87mv5j3reg.fsf@nikula.org>

On Mon, 2017-09-25 at 15:16 +0300, Jani Nikula wrote:
> On Mon, 25 Sep 2017, Joe Perches <joe@perches.com> wrote:
> > Remove unnecessary function_name and prefix arguments.
> > Removing these arguments reduces object size.
> > 
> > prefix is used to add an "ERROR" prefix to the format for
> > DRM_DEV_ERROR and is an empty string for all other uses.
> > This string can be added instead by the DRM_DEV_ERROR macro.
> > 
> > function_name is used to emit the calling function.
> > This can be done by using %ps and __builtin_return_address(0).
> 
> Did you diff the dmesgs to see how much that gets skewed from __func__
> by optimizations?

It depends on kallsyms.

$ps shows either an address without kallsyms
or the calling function name with.

In either case, it reduces object size by
removing the argument from the call stack.

As far as I know, there are no functions that
are inlined by this change that would not show
the existing calling function name.

      reply	other threads:[~2017-09-25 12:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-25 12:03 Joe Perches
2017-09-25 12:16 ` Jani Nikula
2017-09-25 12:28   ` 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=1506342497.29089.1.camel@perches.com \
    --to=joe@perches.com \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.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

Powered by JetHome