Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4840656ybg; Tue, 29 Oct 2019 13:13:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqypT4AAqtJ98MWKocjY5rAEc5hCk1jPmixiK2/l4bvu+ui7Wxu3wdN9TYZpvVIuYhnYJZlL X-Received: by 2002:a50:ff12:: with SMTP id a18mr9672250edu.200.1572380003625; Tue, 29 Oct 2019 13:13:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572380003; cv=none; d=google.com; s=arc-20160816; b=Njqja24Vi/r/7FpbohRxvHe/tGabAuRTaSXs6pcR7JDUhRq7kocHK3rPzFOlNjzhxZ ZE9hknNaqRBKm3x7ZTVo7JVmZyhMuwjTViyozVTIWFmfxxFesCNAILm4J2hu59PoaMHo +PaUgT+JZmFLpQ7yVSZa5zUkS+3fAC4ECE8puyGLOQs1Oai4bh1eN/UZfRY9e3Z9G7dK vQdl5vANjLkNfS6yNUJeajDO8tlf3SfEV7em8i4ay5hfx0ydnAbEqyy/jiIiaPb2Jsyb eDSMjsJE7ze5F5+S/8MikYIvQSW5EGkJHIJ6b8bLifJk36oBUuzLnDk7cY5rNDeBmZxc xUUw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=hTUFFn9ZOO6M4M/vQcEM8xkeQp+LXLxVeDhMCnKVDnk=; b=Y1gVUPtXxzzHM7LXS2cVddwJbk5ZzFK2Qe7prgztQmE8nxPOJfiLRMWyc2ILavwSFy rbSEXhohFWGnk4OvW/MXetXHxOAy9rD7NEv60pVn6RMYYsGF7hUZco7Ce6QwcySL3Ba7 wKFGQgaE9cKhFRldQ7jFw0bkA1VIFIJ+haJWE6p63Hfs8h3/6qbDoEcCDUe3xfoOGtBw 1eTyDI7NQHaQEV8QiQakLt8GPGdURXvMouv84kO9hpzHHVPmqXR+WNEVL7tiTx7RuAbV L/c7qtf8ytpRDOQA2l2BgMT80qEtY4bAveQxtJU7/9gmSivQVSUW8Qk1IMTYlEyIctfN qXjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="hVYc/M5e"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z35si10831813edz.260.2019.10.29.13.13.00; Tue, 29 Oct 2019 13:13:23 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b="hVYc/M5e"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728191AbfJ2UAl (ORCPT + 99 others); Tue, 29 Oct 2019 16:00:41 -0400 Received: from mail-il1-f195.google.com ([209.85.166.195]:35940 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727518AbfJ2UAj (ORCPT ); Tue, 29 Oct 2019 16:00:39 -0400 Received: by mail-il1-f195.google.com with SMTP id s75so31399ilc.3 for ; Tue, 29 Oct 2019 13:00:39 -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:mime-version :content-transfer-encoding; bh=hTUFFn9ZOO6M4M/vQcEM8xkeQp+LXLxVeDhMCnKVDnk=; b=hVYc/M5etxseb0mXAnVmSFr/wOwxEOHMX8oLMxTHcfXScjVlzjbJ26WrcUiVtmuPOj 1Yb4TA0hhWmmGrlUR2QlIAhBB3rvC/3WTNQBVgvgXC75ei8MdMZZKIqw7AN41GKQXYPl B/zccT4/7Nt7sY+Lpg3qIpWVLWHOH4by3Wve5t1/DIb9LBYrsnyPt7PUSkehDLuqgPPa S6r8dz2QdtuJojuzCStySSL4J/JizgnUrMtv32E+O62lR8rdu0kJEzTJ7TT4Cwjv0hnE IlUL9gYWnxWIk7s59aSnv2+muEKx2FcVWuI5VRO12dyBz1xwNc29K53YpxHJjAIUmcP+ LARA== 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:mime-version :content-transfer-encoding; bh=hTUFFn9ZOO6M4M/vQcEM8xkeQp+LXLxVeDhMCnKVDnk=; b=pfePV0cWDE5c4mNoFY2xQus5+bapwjbSxtIl/ZiTdprSJtvrxth/GAh0KFQ51FaiJI fDVqeks1UrLoAkZfAZ/K48v6EmbAgMOWNperUH5Xrd6VFM8dKFOxtSj+lMJVk7+2O3f9 Om+X8T3XXJbtv/G1XKVMwMKe46coX2o868SGR8PL6kHcNoaiegGpIP5k9Kq0t96nnmTl OnMKX5y11lDz8I2s+W4bkNrgOcc7yKEtZ3ePfOLlw86ZLdRWSnC8ten11xpOddlNsHGQ t41RDiPOw+iWNUB6uj30ArgO9MS9TzQoRbata/vs2zswMiOu1Lyv27235jdi9x4Gzhne td5g== X-Gm-Message-State: APjAAAV07f648Pf7GabX2xd6zUJ3DQEhwt0LukykFw0WihKtfaGud/zX znQqjU5wESLV1m7O1KXWXas= X-Received: by 2002:a92:c9c5:: with SMTP id k5mr30142061ilq.112.1572379238813; Tue, 29 Oct 2019 13:00:38 -0700 (PDT) Received: from localhost.localdomain (c-24-9-77-57.hsd1.co.comcast.net. [24.9.77.57]) by smtp.googlemail.com with ESMTPSA id n2sm2262ion.25.2019.10.29.13.00.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Oct 2019 13:00:38 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, linux-kernel@vger.kernel.org Cc: linux@rasmusvillemoes.dk, greg@kroah.com, Jim Cromie Subject: [PATCH 06/16] dyndbg: fix overcounting of ram used by dyndbg Date: Tue, 29 Oct 2019 14:00:35 -0600 Message-Id: <20191029200035.9889-1-jim.cromie@gmail.com> X-Mailer: git-send-email 2.21.0 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 during dyndbg init, verbose logging prints its ram overhead. But it counted strlens of all ddebug callsite entries, which are full of pointers into shared __dyndbg memory, and shouldnt be counted at all (since theyre already in the __dyndbg section) Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index 540ca0861cf0..4ce0c53cdcfd 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_debug.c @@ -992,7 +992,6 @@ static int __init dynamic_debug_init(void) char *cmdline; int ret = 0; int n = 0, entries = 0, modct = 0; - int verbose_bytes = 0; if (__start___dyndbg == __stop___dyndbg) { pr_warn("_ddebug table is empty in a CONFIG_DYNAMIC_DEBUG build\n"); @@ -1003,9 +1002,6 @@ static int __init dynamic_debug_init(void) iter_start = iter; for (; iter < __stop___dyndbg; iter++) { entries++; - verbose_bytes += strlen(iter->modname) + strlen(iter->function) - + strlen(iter->filename) + strlen(iter->format); - if (strcmp(modname, iter->modname)) { modct++; ret = ddebug_add_module(iter_start, n, modname); @@ -1022,9 +1018,9 @@ static int __init dynamic_debug_init(void) goto out_err; ddebug_init_success = 1; - vpr_info("%d modules, %d entries and %d bytes in ddebug tables, %d bytes in (readonly) verbose section\n", + vpr_info("%d modules, %d entries and %d bytes in ddebug tables, %d bytes in (readonly) __dyndbg section\n", modct, entries, (int)(modct * sizeof(struct ddebug_table)), - verbose_bytes + (int)(__stop___dyndbg - __start___dyndbg)); + (int)(__stop___dyndbg - __start___dyndbg)); /* apply ddebug_query boot param, dont unload tables on err */ if (ddebug_setup_string[0] != '\0') { -- 2.21.0