Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1352281imu; Fri, 9 Nov 2018 15:14:38 -0800 (PST) X-Google-Smtp-Source: AJdET5eOFaCw5i41YKjUSTcaQua2Bx1Ih9Yiwe4qe/HIQmiZWHigEhWuh79yp808p3BR6Xax1Zh8 X-Received: by 2002:a63:ce50:: with SMTP id r16mr4941259pgi.217.1541805278890; Fri, 09 Nov 2018 15:14:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541805278; cv=none; d=google.com; s=arc-20160816; b=GH/TL3DgxXDl9E2jJfnzGV0HGpjsyBc1aQW4WFpbsz7NizYPyEMlAXV4+c5Da/60AO miDA2Jw0dX7GXJ1PQGHqoizMkf8w+TtMmwBpzXWER7xof+wCFpiXgjDcjZx668xChrHo TXbh8vam0rgO2lZGhyf/U8yS3UMO8RfQeNZRRq/GHz1pUqYPcqVejnmoT7QBh1A7On+l 5nr1yGmPrv+xNuD5QlzYjgISpsq3IVxOpqzlXxgH6x8Lq+pmxbZLmmQXjx8daLz78L8w ZD5/PnfPc3lSbqj346s9nwsioSA+6LAEVrcyQF55I7uVqTgu2cdxNr6wbKmN+AXJHIYY nuxQ== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=qPjpH8BD5tXsbeLiw4RR8hTDV7K4mxZhnb1hV0+Vj+U=; b=pgKPgDIcieySaFghLeBuHLBMJeQXdhfiBUjujjqY55G/OVF6srVRiRB37uAAyb9enX wJkrjJQiaJWrRUvnDyPlfDTbYMfjIBtrQEGx6Bhc3Vjrv7LUnn9tbTMS7tVYYMeIBDNR AmEuIA4e5/cpi+CaOOBzhsZ7qfUaAFYMAJmKII9eU74lUaTuA06NeDR68YyT3gDu/ncP 9UeJwK5WfdTF246xMGoMqHjYoMpvT1DQg4U+JXQke1l3U0R1Ka9iJqKM3dm13o2kjVy9 o/UxLOIc9owBt12uwF6m5qPIPxkdf4wmjw1F2SIDDvFAPx1h2PgcoJxk2/3NtJ5ZCtOM 46ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=Cdtx45r3; 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 f91-v6si9658650plf.324.2018.11.09.15.14.23; Fri, 09 Nov 2018 15:14:38 -0800 (PST) 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; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=Cdtx45r3; 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 S1728384AbeKJIxp (ORCPT + 99 others); Sat, 10 Nov 2018 03:53:45 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41746 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727961AbeKJIxp (ORCPT ); Sat, 10 Nov 2018 03:53:45 -0500 Received: by mail-lj1-f196.google.com with SMTP id z80-v6so2964192ljb.8 for ; Fri, 09 Nov 2018 15:11:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qPjpH8BD5tXsbeLiw4RR8hTDV7K4mxZhnb1hV0+Vj+U=; b=Cdtx45r3oFh/0Ysqb1UG2keFz4msRljIPU/DXGXsrjJZCxJlmitYmFYJrxXE4CLjvr 8MdM2KyQzjAqXaBr73JPcmFr/7+4XwdZlo9Rjt3r00pllys2K30z4sIcQW3y+LUQd1qi fAn1NFXvvYIsJTKyrzMOqr41PnZwuCkQF1e4g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qPjpH8BD5tXsbeLiw4RR8hTDV7K4mxZhnb1hV0+Vj+U=; b=FXoZvMbYZnjDuokoX9IQUn1Cr/0EH5TGdnOeOo1raoW75wQacM2Z1oMldeiiThvipR GJxmKRbvj+OF70mxVlIVgPBXrnKP299Bh70Re5Ejd6iZcNZhKO5J1A2uAlEaJnYmotPM u6tVle7u3PkolfgChjMxXpI7QcGR4xhPskxOdkGyxFA0Ep8lIwlsl5taQMeCF4qUkShT pdzqlaoG72bNp6qi6S6zKp2NFfAt1v+ZvSTrz0y/SGfZNnh3tXkmMxncwRXnV4xQ5HLT 61RJOhx+1xhTcr/FJlOz4ndTdFhVPFCmCoicg97ITvYWcWsrO+BSjAolCRKPK+hjcdI0 xBjA== X-Gm-Message-State: AGRZ1gKU2hMKnsYtY9DBpZ47EOnMc6zqlzWpBY00UMVmLFDrq2iglMMY UrdWI42XqFIUS07TZDoNvylQCQ== X-Received: by 2002:a2e:8347:: with SMTP id l7-v6mr1863975ljh.140.1541805059753; Fri, 09 Nov 2018 15:10:59 -0800 (PST) Received: from prevas-ravi.prevas.se (dhcp-5-186-114-252.cgn.ip.fibianet.dk. [5.186.114.252]) by smtp.gmail.com with ESMTPSA id x16sm1584012lff.26.2018.11.09.15.10.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Nov 2018 15:10:59 -0800 (PST) From: Rasmus Villemoes To: Andrew Morton , Jason Baron Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , David Sterba , Petr Mladek , "Rafael J . Wysocki" , linux-acpi@vger.kernel.org, linux-btrfs@vger.kernel.org, netdev@vger.kernel.org, Steven Rostedt , x86@kernel.org, Greg Kroah-Hartman , Ingo Molnar Subject: [PATCH v3 00/23] various dynamic_debug patches Date: Sat, 10 Nov 2018 00:09:58 +0100 Message-Id: <20181109231021.11658-1-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.19.1.6.gbde171bbf5 In-Reply-To: <20181009112013.14238-1-linux@rasmusvillemoes.dk> References: <20181009112013.14238-1-linux@rasmusvillemoes.dk> 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 This started as an experiment to see how hard it would be to change the four pointers in struct _ddebug into relative offsets, a la CONFIG_GENERIC_BUG_RELATIVE_POINTERS, thus saving 16 bytes per pr_debug site (and thus exactly making up for the extra space used by the introduction of jump labels in 9049fc74). I stumbled on a few things that are probably worth fixing regardless of whether that goal is deemed worthwhile. v2: Added various acks/reviews. v3: Rebased on top of v4.20-rc1, and (consequently) reimplemented the x86 part using Nadav's asm macro infrastructure. I've taken the liberty of preserving acks/reviews for the first 20, since the rebase was completely clean. OTOH, I've removed any acks/reviews from the last three patches, since they are essentially completely new in this version. Since there are some interdependencies, it's simplest if these go through the same tree. Andrew, can I get you to pick up patches 1 through 17? They should be ready for some time in -next. If and when the last three (new) patches get ack'ed, I'll ask you to pick up the last 6 (Jason has ack'ed 18-20, but they don't make much sense without at least one arch opting in to use DYNAMIC_DEBUG_RELATIVE_POINTERS). Rasmus Villemoes (23): linux/device.h: use DYNAMIC_DEBUG_BRANCH in dev_dbg_ratelimited linux/device.h: use unique identifier for each struct _ddebug linux/net.h: use DYNAMIC_DEBUG_BRANCH in net_dbg_ratelimited linux/net.h: use unique identifier for each struct _ddebug linux/printk.h: use DYNAMIC_DEBUG_BRANCH in pr_debug_ratelimited linux/printk.h: use unique identifier for each struct _ddebug dynamic_debug: consolidate DEFINE_DYNAMIC_DEBUG_METADATA definitions dynamic_debug: don't duplicate modname in ddebug_add_module dynamic_debug: use pointer comparison in ddebug_remove_module dynamic_debug: remove unused EXPORT_SYMBOLs dynamic_debug: move pr_err from module.c to ddebug_add_module dynamic_debug: add static inline stub for ddebug_add_module dynamic_debug: refactor dynamic_pr_debug and friends btrfs: implement btrfs_debug* in terms of helper macro ACPI: use proper DYNAMIC_DEBUG_BRANCH macro ACPI: remove unused __acpi_handle_debug macro ACPI: implement acpi_handle_debug in terms of _dynamic_func_call dynamic_debug: introduce accessors for string members of struct _ddebug dynamic_debug: drop use of bitfields in struct _ddebug dynamic_debug: introduce CONFIG_DYNAMIC_DEBUG_RELATIVE_POINTERS jump_label: move JUMP_TYPE_* constants to new asm-generic file x86: jump_label: introduce asm macros STATIC_KEY_INIT{,_TRUE,_FALSE} x86_64: use relative pointers with dynamic debug arch/x86/Kconfig | 1 + arch/x86/include/asm/dynamic_debug.h | 58 ++++++++++++ arch/x86/include/asm/jump_label.h | 17 ++++ arch/x86/kernel/macros.S | 1 + fs/btrfs/ctree.h | 34 ++----- include/asm-generic/jump_label.h | 11 +++ include/linux/acpi.h | 11 +-- include/linux/device.h | 6 +- include/linux/dynamic_debug.h | 126 +++++++++++++++---------- include/linux/jump_label.h | 6 +- include/linux/net.h | 6 +- include/linux/printk.h | 6 +- kernel/module.c | 6 +- lib/Kconfig.debug | 3 + lib/dynamic_debug.c | 133 ++++++++++++++++++--------- 15 files changed, 284 insertions(+), 141 deletions(-) create mode 100644 arch/x86/include/asm/dynamic_debug.h create mode 100644 include/asm-generic/jump_label.h -- 2.19.1.6.gbde171bbf5