Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3790485pxj; Tue, 11 May 2021 11:55:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdkjnWYR383kHhfNmhBzTenbLfo22z+FPgXPDrEwJB0U24V0PKexW8MtGxzrLUohyus3EZ X-Received: by 2002:a9d:6198:: with SMTP id g24mr19713548otk.365.1620759340973; Tue, 11 May 2021 11:55:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620759340; cv=none; d=google.com; s=arc-20160816; b=pwDjPOQ44MobxYHvAgwRBrT1YD24Ly3qJTQP4Gz9GZXEB/XyufvuQfhqcsRMmq17/g 0lf87mL2WWcB6wZhKTuOofMbPkRVXHhpYtfxCWwUL8J59NaKIHIUh95HXmzo2s6pO/AO yWGtLCPBiYu0nO0RpIQxfjcXEBy0BBwbTAPiIkVEbqLug/jmPY7ygI3hGsgo6x4EOTMd qR/Tc/PtC6pdQz3MouI3tyiS+UfeeE40KMpGDtF1U38W/PzuasQaa6K6/pMZ6gILddS4 aCc7cWZIwDQRL7O5ppj6NIVu5zi13BEjibFKHJUCiwoYoEAB5qydj/Gq+ZBJDjZblSYO 8Ttg== 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=ThM6By1VCxDqq9nGwswf9Jqgl1+dbifqaaknL7P7lpY=; b=ffSaWPzeIwXF9Q6064O5sHnfl1rc1S+QOFsWFgN2cArUs9gDmpF9LtYhmjmdHlsgm5 WIIVHDomJEQkNQEqEvHoUmgoIttDIJgrNIRKW64ZPhfPZxscLdJCCvfKiqJPNp62H4Y8 AREJWTmKiwnLTmln/7LpaHxRV5xGIKmi6unpmYK3ZrrR6d0eCfA/ZzB/6w0RTLNeWylc wGYxfNlo8aV2WVHCep0l15X9P3IiVESqqfEzF1X0XojD4pK5zohpKmB1APDd0gJx70PO E/HOEPO+exjopCepyMqKbGHl4T8oXgM4Fc9uT12eHwGPQORCzP0Cq7noJsiA0iNy0PQF /g+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tmaq8Wa2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e4si24433899oth.114.2021.05.11.11.55.27; Tue, 11 May 2021 11:55:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tmaq8Wa2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232417AbhEKSx3 (ORCPT + 99 others); Tue, 11 May 2021 14:53:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232190AbhEKSw5 (ORCPT ); Tue, 11 May 2021 14:52:57 -0400 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27818C06138D for ; Tue, 11 May 2021 11:51:49 -0700 (PDT) Received: by mail-il1-x135.google.com with SMTP id z1so10202390ils.0 for ; Tue, 11 May 2021 11:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ThM6By1VCxDqq9nGwswf9Jqgl1+dbifqaaknL7P7lpY=; b=tmaq8Wa2JK6IEvHF8XRUM5s61waWyaSvVWZzIdfvo7JSId8OtSFh7Ma1C6qgIwn2oS WwYEhbYuFKlSpjVld89fGZI1Rtg2+gGE8hjJYTAq4DDLyBJHf0PEKrHa+dpkar72I6N0 qdER3KQymMB3se6FRgiR7LCmE2OnmLLORRfsGXmg5CotrKrXAdzRPmBNbr4U0EkzVU/E Zz+D4lv/qj9UG9tqySAfp/iBjgiCtcaglA70HGaj+Rw+hHQ6CFoE619dGRTnzvRNoaPH SAxprK/47ugoZJkXusyIFnYZ7xhjh39kO8OquPLLxgoDAlUcJsS8R8ewIGwkVyIBSz59 0MbA== 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=ThM6By1VCxDqq9nGwswf9Jqgl1+dbifqaaknL7P7lpY=; b=KW+LonM8+ioE8tM1i5r4SDx+OmO5y9wt+1UkuAUofMd5c//lu5Bsgfet0C04NMzsrW 5itY2RL+4S+1sTvfduS9R9myBE/21qbxTA0clp/FpUhUIfuJf4s/3CXUXFD57g9M/c+j YwaXdvTSJ9B/l2XTkAufnYkfw/Hy39BSgFfWcNa723+hZzfTw+oA+4Uywcpl/HVlYVyo 9/K92fz0C3Bt0Ur8oPC/rj5Hr0LUHd1uKZkIGJ3D9Q/wAG69B4IPTc56PDcDusAlSelP yzAfTdOhJ6Q6CpRRi0/sFdJ9bOL5exoHiEMkDyRyh2duPckKt0FocgIZVMIb5clo5j38 VS1Q== X-Gm-Message-State: AOAM533GwbYeNJXwSCiLY5CIefxUOTCQjO+QSNLmauOwrWkQdW3DR4cY guOS5nCu+jzx5l3a32/1jCFUXFIoVQC9NeFP X-Received: by 2002:a05:6e02:ee1:: with SMTP id j1mr14293787ilk.105.1620759108668; Tue, 11 May 2021 11:51:48 -0700 (PDT) Received: from frodo.mearth (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id t10sm405096ils.36.2021.05.11.11.51.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 11:51:48 -0700 (PDT) From: Jim Cromie To: Jason Baron , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Jim Cromie Subject: [RFC PATCH v5 20/28] dyndbg: ddebug_add_module() handle headers. Date: Tue, 11 May 2021 12:50:49 -0600 Message-Id: <20210511185057.3815777-21-jim.cromie@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210511185057.3815777-1-jim.cromie@gmail.com> References: <20210511185057.3815777-1-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that header records are in the __dyndbg* sections, ddebug_add_module() sees them when they're present (when adding loadable modules and the 1st builtin, but not 2nd..Nth). Teach ddebug_add_module() to recognize and account for them. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 9d9cb36f40a6..462d364fc788 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -1036,7 +1036,18 @@ static int __ddebug_add_module(struct _ddebug *tab, struct _ddebug_site *sites, int i; v3pr_info("add-module: %s.%d sites\n", modname, numdbgs); - if (!numdbgs) { + + if (numdbgs && is_dyndbg_header_pair(tab, sites)) { + + v3pr_info(" header: %d %s.%s.%d\n", tab[0]._index, modname, + tab[0].site->function, tab[0].lineno); + WARN_ON(tab[0].site != &sites[0]); + if (numdbgs <= 1) { + v3pr_info(" skip header %s\n", modname); + return 0; + } + + } else if (!numdbgs) { v3pr_info(" skip %s\n", modname); return 0; } -- 2.31.1