Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp533761rdg; Thu, 12 Oct 2023 12:48:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnuKDQi9IbYvVusd8dFJV6Dm8rJFb0Yo5fwEtAxwEkh6XMVNotg8YQrlw3Y3SaugkTiRNK X-Received: by 2002:a05:6a00:168b:b0:692:6d3f:485b with SMTP id k11-20020a056a00168b00b006926d3f485bmr27187410pfc.3.1697140082163; Thu, 12 Oct 2023 12:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697140082; cv=none; d=google.com; s=arc-20160816; b=j9XG3xL0qMidCj0elXudBJks36SNXFyoPHzmio2JoQXOACrrZLhHvm7Xd6/W8B1Xf8 dX6+vRrOiP4a+FmRokrrWNYidTfZmP37iLsjMxM5uatrfg+cvMlyTBUwrZ3Sdke9GUre HIxNF9ZjpesrwiPiwBi1OFINhbHw7ER5cRRphFS+kkNAvZMscQlGjKdXcd9rqlefcu27 bANeh2yw8cEzQ90L4kH0Pzx3JbCy3XDlfhsPJRQN3TN7pXnYudlGUod1J/DudVXEe+un 3dVx33i+n7s56W1hJZ5SrFMbdu4ePXS3Fybsej1eV1H1dN/ZvmgHk+ofN/hBeWNsmweb gJHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Iuwbt1McOcGdkIO7L8zjw1pQxOK6ynndpanb3dr/E5o=; fh=7ljCN0LusJ7JrIo0b2q68gdLb7KZwh2dqCYB6NR0RGQ=; b=IaQOIyC4AOwqB/4w+pgNAhVfEkpQDbZTUovH7zHYl1a3eXlzuoIwbOkpQ2vgIl6Osc aaiXyxP5wShqRrL39ULS1g1+L4o/Jc2S7NizoGGWDB/0D0tC6yO8hej1uCOj19NsEtGY mvg/0dDob3KBF1QTPpLZxopT6r8zEn/PZYbg2FdDTnqOiArJBy2QDElrsJq/ZRZ41wbE p4DsMhpFB6HFFy3vcYm9MvUzmJM4/7Q25DvoGztLTERnaDaAiaFkpSB1+cMPjSR3totI HAo9MlpG7gl+SchMvQoUgkFuzGj/XF5PEq7uuLY7zIlBpirhJNm2GT8gmU5gji50Lfb0 92tw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MjsHGH0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u6-20020a634706000000b00578a084850dsi2882343pga.720.2023.10.12.12.48.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 12:48:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MjsHGH0K; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4208582AB47A; Thu, 12 Oct 2023 12:48:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442730AbjJLTr5 (ORCPT + 99 others); Thu, 12 Oct 2023 15:47:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442560AbjJLTrd (ORCPT ); Thu, 12 Oct 2023 15:47:33 -0400 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A338CF0 for ; Thu, 12 Oct 2023 12:47:30 -0700 (PDT) Received: by mail-io1-xd29.google.com with SMTP id ca18e2360f4ac-79fb78e297bso55716139f.0 for ; Thu, 12 Oct 2023 12:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697140049; x=1697744849; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Iuwbt1McOcGdkIO7L8zjw1pQxOK6ynndpanb3dr/E5o=; b=MjsHGH0KcyHM9yh2BwpUgxQi3Vfa9WG/ty5Ea8lSq9yzqZNw5xDk/9ki9K87No8ZUG qG5MeKsDVy8jr2bZhF+76xcP9ksw7qg+qlgoChDneDxrJsUpE3XMwDwzBcHLEc1aVblp CvWFXpS8sowf7TYLE9jisRDmyNh1r4suBfBif4cro/xrrM24BxdcRFAIi5eXiKoffSDD fuY9xeV9X7nOFbkqCKiOsdds6PpP9pkQfnc2y3aREwa5w9RgR0085iRjkrG39bb0PbTs 9GK2F2HVSy1eUP6TfGKPg7kG2BbSQgQ10gxqjj5HwogNZOxB8jg+Bv9viI60tkpMTxbT hq+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697140049; x=1697744849; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Iuwbt1McOcGdkIO7L8zjw1pQxOK6ynndpanb3dr/E5o=; b=cNtCen140xha191ucEXIkKhzIs6t02fb8JiBwWLcG/si3tpY9EW+k2aO4ooIrAGbD5 ZfOoHFm3JW7GPK9x30mTqdKiwKLamtNBUzbqLLzdVwQaKbMiQ2NcURS/rrRIfH0xm1MS HrxsmXUVPu/e+xfye6QqtgJSmcTyx0e64V2RQ3T89DHfWK2trc1ngtrdgjyW402EjMqa CRmf6JfIVY3KWtmFuHHF/HEpcsGOOGJVRTGZ/dzFq52R1Q58B3gmAxQCDlpmhl97EUyj NYpQldUS7jfV+q/HkTE+c/rsXExzTxCsSv8Mi7pbQSFfkgcyFSjS88YuQE4sH78YgtZA Wlqg== X-Gm-Message-State: AOJu0YzmLm0mmlnuet2asyoBbW1cmVbWBNBd7LbryFq9c3BgzF1xZVm7 pRaw566PjZJKnDvvwIAo68tT//RlsOW8Vw== X-Received: by 2002:a6b:ea15:0:b0:790:a010:4c42 with SMTP id m21-20020a6bea15000000b00790a0104c42mr28325512ioc.13.1697140049529; Thu, 12 Oct 2023 12:47:29 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id z7-20020a5ec907000000b0079fbb834232sm4351002iol.19.2023.10.12.12.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 12:47:28 -0700 (PDT) From: Jim Cromie To: linux-kernel@vger.kernel.org Cc: david@redhat.com, Liam.Howlett@Oracle.com, linux-mm@kvack.org, Jim Cromie Subject: [RFC PATCH 08/10] dyndbg: drop _ddebug.site member Date: Thu, 12 Oct 2023 13:47:09 -0600 Message-ID: <20231012194711.3288031-9-jim.cromie@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231012194711.3288031-1-jim.cromie@gmail.com> References: <20231012194711.3288031-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 12 Oct 2023 12:48:01 -0700 (PDT) drop site ptr, and rely upon the maple-tree intervals loaded by ddebug_condense_sites(). In DEFINE_DYNAMIC_DEBUG_METADATA_CLS(), which creates a pair of _ddebug & _ddebug_site structs, add '__used' to the latter, because it is no longer linked from the former, and then also to the former, so they both have the same number of entries. Replace the BUG_ON with a pr_warn that shows the size of the mismatch. TODO: sort out where the extra records are coming from. Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index 5206a2cfdb37..406b30d8eb98 100644 --- a/include/linux/dynamic_debug.h +++ b/include/linux/dynamic_debug.h @@ -27,7 +27,6 @@ struct _ddebug_site { }; struct _ddebug { - struct _ddebug_site *site; const char *format; unsigned int lineno:18; #define CLS_BITS 6 @@ -228,13 +227,12 @@ void __dynamic_ibdev_dbg(struct _ddebug *descriptor, ._filename = __FILE__ #define DEFINE_DYNAMIC_DEBUG_METADATA_CLS(name, cls, fmt) \ - static struct _ddebug_site __aligned(8) \ + static struct _ddebug_site __used __aligned(8) \ __section("__dyndbg_sites") name ##_site = { \ DYNAMIC_DEBUG_SITE_INIT(), \ }; \ - static struct _ddebug __aligned(8) \ + static struct _ddebug __used __aligned(8) \ __section("__dyndbg") name = { \ - .site = &(name ##_site), \ .format = (fmt), \ .lineno = __LINE__, \ .flags = _DPRINTK_FLAGS_DEFAULT, \ -- 2.41.0