Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp28606ybx; Tue, 29 Oct 2019 13:48:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIWz9T9FzCBJne2VnklLHLwX543wWLdirrFKEln6ITtUW6EHlkys6mVY7lL5BOMTo6l9x7 X-Received: by 2002:a17:906:7e48:: with SMTP id z8mr5369258ejr.116.1572382135174; Tue, 29 Oct 2019 13:48:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572382135; cv=none; d=google.com; s=arc-20160816; b=jtnnjiXM/wGpD8Y7f3n0IIV5zvkVxvYL2aeWMvzDdikOrUOk2K1xMetLwVrfB4T/UF 3FqFQP9OUkpiELoI46JU+riTG9p6uTlSMF0doEW1UCVsNIxwDL4rAsT9YysjwwEsCNK6 Sjxovn4TyMkMpwvZ2bHyfnT2cexKgVRlPHQ/U+GmkbTh3a1/Eb74rIhoQY4BlLfnIGW/ C1SQKbuiOILs24m6BsgGF8hifuyVvFl64wh/xZ3knxREKeo0nQTHvUvxuDR61nXAHS2r WanVrHKZn/8TcUHY+4cFe7SMiPv7Zc0i8K8sPy/+xRDU2NPpQvBijl4fTQN6Q/kRrB8v okKQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=sdQEilUBsv4W84bOTkCZzeL8QzQSuMZXqv2RU9TZjao=; b=j7OGGfJvV9SLH7tgkKJk/8y3rYlyF5Ib98Jm365J+fpHkOAa9HSrT3W7/57nnmjf4G B6HFYJLAkNf2J39F2rWapKl87y3QyzJqJWjRqQW0F/a+th4ECNIbf9DmNbf/MsyT8JkK EHSPJyA2zYEWUWRRxxpottgShdvyuwWVD3sdsswNK/d1topgtEeBxAG614FebF2JBukS Md5tAhBp1xYzlT3x2Y4Q7tOmkUFLIOLI4DOnk/QpCTk1JimMBkfAwzOTQZ4x99quZpuv n3PRAR/kOydJhS168ehllvJ+zifoWZavQeOYiSsVfMcwAvjkWNlJyXq6sWxw2olqUlJQ fW5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rasmusvillemoes.dk header.s=google header.b=HO3FtE89; 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 w2si2815430ejv.227.2019.10.29.13.48.30; Tue, 29 Oct 2019 13:48:55 -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=@rasmusvillemoes.dk header.s=google header.b=HO3FtE89; 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 S1726861AbfJ2Uro (ORCPT + 99 others); Tue, 29 Oct 2019 16:47:44 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39598 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726243AbfJ2Urn (ORCPT ); Tue, 29 Oct 2019 16:47:43 -0400 Received: by mail-wm1-f68.google.com with SMTP id g19so415509wmh.4 for ; Tue, 29 Oct 2019 13:47:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sdQEilUBsv4W84bOTkCZzeL8QzQSuMZXqv2RU9TZjao=; b=HO3FtE89X2nnUjWxLnkh9det58Apja3ZBC39B7Cii3JBMyAng0kg20NrrVjd02dzGt 6FXp3spxqAHOpw66+tykZJjtOYoMeR9ZimYtj2HXrBDYbCP6IzFE822m0bJ53ci1ueYp IsxMg4gtjhfXTMFve9pVN7O3Dyhe6mjk5lKX8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sdQEilUBsv4W84bOTkCZzeL8QzQSuMZXqv2RU9TZjao=; b=fXCJ5b+C3PgJghbcKm3VOelhZM5Ct9P8aOiDNfd8CgQfh/adLzgeEtOrnN9F9mUSi0 Ynv6O4Wumtz1bTCk+u0VmpYCSX37yDurHZiZBS3Y8Pyt//ZmPdUMF8v45YiJgNOAKV0u rKR9fgMgEgTXBXJhpF8nGSTfvvnEmXQiS5g5tRPc/LgHxZP4DPGHY1T5VMlXiE6284K6 ol5inQ4WgDQINgqTw1SjkVGgnOFaXbBfUdtcJL59ruoCijWbzYjeLnUp+aR65l5k+JQY EFMYPDSnicUybr+PfdgcwIFm0Znxs0sc4BYzGH8iZPqDCzVlFLCFmRopy4vnsUi6mRM3 FpJw== X-Gm-Message-State: APjAAAU6WbXyXei89Z47H0s12HTBMwyqsIILs/8Wt/o5gbwasNN4i+Lk WuRluaqVFsLzMVgM/bo8LvtNUoRTwSFcukCu X-Received: by 2002:a05:600c:303:: with SMTP id q3mr914166wmd.139.1572382061642; Tue, 29 Oct 2019 13:47:41 -0700 (PDT) Received: from [192.168.1.149] (ip-5-186-115-54.cgn.fibianet.dk. [5.186.115.54]) by smtp.gmail.com with ESMTPSA id t16sm203045wrq.52.2019.10.29.13.47.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2019 13:47:41 -0700 (PDT) Subject: Re: [PATCH 06/16] dyndbg: fix overcounting of ram used by dyndbg To: Jim Cromie , jbaron@akamai.com, linux-kernel@vger.kernel.org Cc: greg@kroah.com References: <20191029200035.9889-1-jim.cromie@gmail.com> From: Rasmus Villemoes Message-ID: Date: Tue, 29 Oct 2019 21:47:40 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191029200035.9889-1-jim.cromie@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/10/2019 21.00, Jim Cromie wrote: > 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) Hm. I agree we're probably overcounting, but the strings themselves do not live in __dyndbg, but in .rodata. It's true that __FILE__ (and maybe in a few cases ->format) get's deduplicated and by the nature of __func__, ->function points at a unique-per-function string. So I think the commit log is a bit misleading. However, I think the patch is a good idea anyway: avoiding 4N strlen() calls during boot is a good thing. And if anybody wants to know how much memory is used by the pointed-to-strings, well, "wc dynamic_debug/control" should give an idea. Rasmus