Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1738985

Re: [PATCH] drm: Reduce object size of drm_dev_printk/DRM_DEV_<LEVEL> uses

From Joe Perches <joe@perches.com>
Newsgroups linux.kernel
Subject Re: [PATCH] drm: Reduce object size of drm_dev_printk/DRM_DEV_<LEVEL> uses
Date 2017-09-25 14:30 +0200
Message-ID <utAGl-6ix-5@gated-at.bofh.it> (permalink)
References <utAmZ-6aZ-3@gated-at.bofh.it> <utAwH-6f6-31@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] drm: Reduce object size of drm_dev_printk/DRM_DEV_<LEVEL> uses Joe Perches <joe@perches.com> - 2017-09-25 14:10 +0200
  Re: [PATCH] drm: Reduce object size of drm_dev_printk/DRM_DEV_<LEVEL> uses Jani Nikula <jani.nikula@linux.intel.com> - 2017-09-25 14:20 +0200
    Re: [PATCH] drm: Reduce object size of  drm_dev_printk/DRM_DEV_<LEVEL> uses Joe Perches <joe@perches.com> - 2017-09-25 14:30 +0200

csiph-web