From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 18 Feb 2021 08:05:57 -0500 Subject: [PATCH 4/5] log: convert pr_*() to logging In-Reply-To: <743a9458-a05c-74c0-97e8-1250b79bf460@gmx.de> References: <20210104070256.260002-1-xypron.glpk@gmx.de> <20210104070256.260002-5-xypron.glpk@gmx.de> <20210117001619.GA31087@bill-the-cat> <6f4d1af3-4bac-3f82-f016-916327141336@gmx.de> <20210118130241.GI9782@bill-the-cat> <20210118153016.GN9782@bill-the-cat> <743a9458-a05c-74c0-97e8-1250b79bf460@gmx.de> Message-ID: <20210218130557.GE10169@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Feb 18, 2021 at 10:16:58AM +0100, Heinrich Schuchardt wrote: > On 18.01.21 16:30, Tom Rini wrote: > > On Mon, Jan 18, 2021 at 08:02:41AM -0500, Tom Rini wrote: > >> On Sun, Jan 17, 2021 at 08:37:15AM +0100, Heinrich Schuchardt wrote: > >>> On 1/17/21 1:16 AM, Tom Rini wrote: > >>>> On Mon, Jan 04, 2021 at 08:02:55AM +0100, Heinrich Schuchardt wrote: > >>>> > >>>>> In drivers we use a family of printing functions including pr_err() and > >>>>> pr_cont(). CONFIG_LOGLEVEL is used to control which of these lead to output > >>>>> via printf(). > >>>>> > >>>>> Our logging functions allow finer grained control of output. So replace > >>>>> printf() by the matching logging functions. The usage of CONFIG_LOGLEVEL > >>>>> remains unchanged. > >>>>> > >>>>> Signed-off-by: Heinrich Schuchardt > >>>>> --- > >>>>> include/linux/bitops.h | 4 ++- > >>>>> include/linux/printk.h | 82 +++++++++++++++++++++++------------------- > >>>>> 2 files changed, 48 insertions(+), 38 deletions(-) > >>>> > >>>> This causes some fairly massive growth in various subsystems such as ubi > >>>> and we might want to look at what, if anything, we can do, before > >>>> growing some platforms by 15KiB (xilinx_zynqmp_virt) due to strings. > >>> > >>> xilinx_zynqmp_virt has CONFIG_LOG enabled. Switching from printf() to > >>> log() incurs size growth. Did you observe a size grows on platforms with > >>> CONFIG_LOG=n? > >> > >> Yes, it has logging enabled, and we're converting a large number of > >> things that were before compile-time discarded to no longer be so. This > >> is, in general, good and what I've asked for. But when seeing very > >> large growth in doing so, I think we need to maybe take a step back and > >> look at the UBI subsystem for example and see if we can't/shouldn't > >> tweak things more. > >> > >> So, I'm going to run a size test with just this patch as the change, so > >> we can have more concrete numbers to look at. > > > > OK, so the build is done and interesting output starts at: > > https://gist.github.com/trini/53e7da62c6c9d18c189e6baffd01ff00#file-2021-01-18-0800-txt-L239 > > > > Most of the time we're well under 1KiB, which is great. UBI has some > > huge growth, but it's a very few platforms, and I've added the > > custodians here so they can object, or not, to such size growth. > > > > Hello Tom, > > How shall we proceed? Michal? Patrice or Patrick? Since this patch causes noticeable growth on your platforms I'm waiting for your input here, to be clear. Thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 659 bytes Desc: not available URL: