Received: by 10.213.65.68 with SMTP id h4csp18953imn; Thu, 15 Mar 2018 08:19:02 -0700 (PDT) X-Google-Smtp-Source: AG47ELsQ5kV2pVkJKaLDNOc1u7MoGLF3y/r/xC/HEzct6tOFPDVnILEIyJJOng9Sjn/STxMx4wYa X-Received: by 2002:a17:902:4083:: with SMTP id c3-v6mr8521076pld.70.1521127142675; Thu, 15 Mar 2018 08:19:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521127142; cv=none; d=google.com; s=arc-20160816; b=hi2DZrBoVKsp8KnpFauVx2j2ZoFkEWUvfW3/C6YbSVAsv+7MmYSSB5B2WhINQADP9Q PhC6hJCrbV6OR27KcMM+1LYqRW+V7oxTA5u1HwmZ2V7RmvzLyi2xD77DWE8/YRUgZif3 cT9mJWrvr+NPNQRZSjjRJ2sq085CyGHcfbUArdVmQysCElcVW4aOMcx774vDCtLyERT0 v0q5o+jLcN9yJ2uZyGc7CjvGHsatqnNJo9mShrkMyKMbBpv/VnoQ7dnI1iceX0lIffF8 bNG030WQM25UhgJM6328sghGIKLED1YzwSkPdXXqxt+HbsCuvPcr/oItWtwK7QYedtE0 mDOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=Kx/qApK4BDoKNWhuyo5kWGGKlKK56lM/Ug6ZrlZSgyY=; b=H9dzVKHsOihLuZRy2gwAyJXdLNjLpN6QmwRGgjaV7CZr143x01DU8EgeG1lns1RHbP vfVcGgCI28a4wuqJPIW8+zMPud8OdMyATpy0ux8HxFdtWb876CKFenR/9IeQqsrneQ0A 0jrd0hZaxSArOAYJEGTNXvQXD4z+q2SidUB/0HCsRSuF4Q7rT2KJU0p6tDnzOdXp3E6Q ml+itIP1NvGFPiSxfJq7dpEjg3VU+XuCY9Is9rRkUKoFIFKNXhoA8ROgdkSMBquo3O2N iNeAYMjVD0AITfJt8vHT2U5YDliSyZ8kE1EUZYZt+34iYsd5MVpJaDo02kaGXzbfMkHw GJ9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t28si3980492pfk.187.2018.03.15.08.18.48; Thu, 15 Mar 2018 08:19:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932222AbeCOPR6 (ORCPT + 99 others); Thu, 15 Mar 2018 11:17:58 -0400 Received: from smtprelay0142.hostedemail.com ([216.40.44.142]:33878 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752375AbeCOPR5 (ORCPT ); Thu, 15 Mar 2018 11:17:57 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay08.hostedemail.com (Postfix) with ESMTP id E3ABC182CF66F; Thu, 15 Mar 2018 15:17:56 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3873:3874:4321:4559:5007:7903:8603:8660:10004:10400:10848:11232:11658:11914:12296:12555:12663:12740:12895:12986:13069:13148:13230:13311:13357:13439:13894:14096:14097:14659:14721:21080:21611:21627:30012:30054:30070:30090:30091,0,RBL:47.151.150.235:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:20,LUA_SUMMARY:none X-HE-Tag: mark03_adf91698085c X-Filterd-Recvd-Size: 2714 Received: from XPS-9350 (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf11.hostedemail.com (Postfix) with ESMTPA; Thu, 15 Mar 2018 15:17:54 +0000 (UTC) Message-ID: <1521127073.22221.13.camel@perches.com> Subject: Re: [PATCH] drm: Reduce object size of DRM_ERROR and DRM_DEBUG uses From: Joe Perches To: Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= , Maarten Lankhorst Cc: Gustavo Padovan , Sean Paul , David Airlie , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Thu, 15 Mar 2018 08:17:53 -0700 In-Reply-To: <20180315150524.GS5453@intel.com> References: <016b5cb84cede20fd0f91ed6965421d99fd5f2ce.1520978414.git.joe@perches.com> <20180315133026.GR5453@intel.com> <1b50f5d8-97a6-2442-34bb-2782c35505fd@linux.intel.com> <20180315150524.GS5453@intel.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-03-15 at 17:05 +0200, Ville Syrj?l? wrote: > On Thu, Mar 15, 2018 at 03:04:52PM +0100, Maarten Lankhorst wrote: > > Op 15-03-18 om 14:30 schreef Ville Syrj?l?: > > > On Tue, Mar 13, 2018 at 03:02:15PM -0700, Joe Perches wrote: > > > > drm_printk is used for both DRM_ERROR and DRM_DEBUG with unnecessary > > > > arguments that can be removed by creating separate functins. > > > > > > > > Create specific functions for these calls to reduce x86/64 defconfig > > > > size by ~20k. > > > > > > > > Modify the existing macros to use the specific calls. > > > > > > > > new: > > > > $ size -t drivers/gpu/drm/built-in.a | tail -1 > > > > 1876562 44542 995 1922099 1d5433 (TOTALS) > > > > > > > > old: > > > > $ size -t drivers/gpu/drm/built-in.a | tail -1 > > > > 1897565 44542 995 1943102 1da63e (TOTALS) > > > > > > > > Miscellanea: > > > > > > > > o intel_display requires a change to use the specific calls. > > > > > > How much would we lose if we move the (drm_debug&FOO) outside the > > > functions again? again? > > > I'm somewhat concerned about all the function call > > > overhead when debugs aren't even enabled. Perhaps better to have compilation elimination of the entire debug output instead. I think you are discussing a different issue and this discussion should not block this patch as this patch has no impact other than code size reduction.