From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753938AbdIYM2W (ORCPT ); Mon, 25 Sep 2017 08:28:22 -0400 Received: from smtprelay0033.hostedemail.com ([216.40.44.33]:39552 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752133AbdIYM2V (ORCPT ); Mon, 25 Sep 2017 08:28:21 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:541:599:800:960:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3873:3874:4321:5007:7903:8603:8660:10004:10400:10848:11026:11232:11473:11658:11914:12048:12114:12296:12438:12740:12760:12895:13069:13148:13161:13229:13230:13311:13357:13439:14096:14097:14181:14659:14721:21080:21627:30003:30029:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: goose19_48a588cf1c249 X-Filterd-Recvd-Size: 1920 Message-ID: <1506342497.29089.1.camel@perches.com> Subject: Re: [PATCH] drm: Reduce object size of drm_dev_printk/DRM_DEV_ uses From: Joe Perches To: Jani Nikula , Daniel Vetter , Sean Paul , David Airlie Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Mon, 25 Sep 2017 05:28:17 -0700 In-Reply-To: <87mv5j3reg.fsf@nikula.org> References: <693db79230a414560005936cedf4080d20235c03.1506340959.git.joe@perches.com> <87mv5j3reg.fsf@nikula.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-09-25 at 15:16 +0300, Jani Nikula wrote: > On Mon, 25 Sep 2017, Joe Perches 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.