Message ID | 20240306182440.2003814-5-surenb@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0FE8C54E41 for <linux-mm@archiver.kernel.org>; Wed, 6 Mar 2024 18:24:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0EDDD6B0089; Wed, 6 Mar 2024 13:24:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 09C356B008C; Wed, 6 Mar 2024 13:24:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E7E8A6B008A; Wed, 6 Mar 2024 13:24:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id B98BC6B0088 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 13:24:56 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 783A8A0F35 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 18:24:56 +0000 (UTC) X-FDA: 81867440592.26.110E182 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf24.hostedemail.com (Postfix) with ESMTP id 9E74A180028 for <linux-mm@kvack.org>; Wed, 6 Mar 2024 18:24:54 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=EIQIpxhQ; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf24.hostedemail.com: domain of 39bToZQYKCDgmolYhVaiiafY.Wigfchor-ggepUWe.ila@flex--surenb.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=39bToZQYKCDgmolYhVaiiafY.Wigfchor-ggepUWe.ila@flex--surenb.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709749494; a=rsa-sha256; cv=none; b=emccuJk29vyAeEtkMB2p0G0Shj+UWD4QYd0NxGwH7oKJWSAsjrT3COCSjVgq7It6J4WuPm 5/yxPWYStdEL3e/N2FN4do6NlRyMu5M6Zk2LkjJYpFqCi2Pz4u0Li1T4tsNNg0GI5DcLZQ GclEy1c7/kjKo2pkYcxBD5ljkYnrAxM= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=EIQIpxhQ; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf24.hostedemail.com: domain of 39bToZQYKCDgmolYhVaiiafY.Wigfchor-ggepUWe.ila@flex--surenb.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=39bToZQYKCDgmolYhVaiiafY.Wigfchor-ggepUWe.ila@flex--surenb.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709749494; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5nTBv3DNXNZIxIc1ZBoC1bDpLfB6IB4LOR7eT5PZErs=; b=vd03I5ZlOsetMFYm5vrhANkFg4cU9eyQCoEobgLP2bgJyA3zbNP2r9MVfRFt+iaw8rjmIq R54xEygsErdMzx1uu4IvdmK1+C9DFU4QXO+BnY8Gp35D6tQLGwtYXP3E9M+UL5pe3wb4ZR 6O7MsKdohF3ivTtpzsDcR/TPJC56Y+E= Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-60987370f06so415947b3.1 for <linux-mm@kvack.org>; Wed, 06 Mar 2024 10:24:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709749494; x=1710354294; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=5nTBv3DNXNZIxIc1ZBoC1bDpLfB6IB4LOR7eT5PZErs=; b=EIQIpxhQhdxUT8Gzf7BDTg/AeJlMrpL+Sd89mzrsd6UcTquwP0K8yvTzNxjRY90OhF 9MKWVBWb9Iay+tVtDP3YCobPPRVMSMZcMO6LvLu0q/HkymnoVRNhxfCaTR35gIbX3KpZ O/IYS/oOhIaueIRWe9KnYSO98Ix153dBZ7upUgkHjwSr+prcF3R0ZIgm0WYnKcMterWJ S09ptPOZspBppILiqthktwq1Ml/9JF21S8zGIT1tzF2qm/SDhGZqKZzQZtnQahdLA/EE 99jTMGcY3aQewg38BdeH7MWAyGr2g2lRlKl9vjug49lQK+cNLG939xRyAbYA2hlRWwmZ V10w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709749494; x=1710354294; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=5nTBv3DNXNZIxIc1ZBoC1bDpLfB6IB4LOR7eT5PZErs=; b=iOEayNBia2tH8ZEk6x0RP0i42gYJSmntVmTB2paeo60znOND9XBOUyJF42GSWnsjeK BepZ4XklSeXODSX1+jFaoaqZcLiFxerC/KWXguduRq4UMoAKwQSGaECqq30M4Ft/OH6k VhtXWzH5+1LQYU821faoNGbMLG0V/HziRCjkwuXK/mhBqb2NVbcPskSuC2nXQmD/dk80 QcOrmUA1IZ5MuRkxMEzZ+H/0smAQCQe1Sr6ewxOvF7jVJSu/VrEJjiYGiISgvjSezFNF FOaJ1cyd/l0zTsvcZp1nOAOR9G0LA+U6Doiyi0q2Cm+Amu/OiI2OjMFpdQOmLzwrX0gj 6uBw== X-Forwarded-Encrypted: i=1; AJvYcCXHW6cIHo0x3UHQItcEohz3d2vqBwDO8xa4xnTmHi78lUK9fC0ghnzg0Ud3Esv1/is0ss3dVMO83fL8ExVSOLmYVQE= X-Gm-Message-State: AOJu0YwQ5jOj+luj0Xr4/vgIeIoXWEP9zenXrQ6ZdWdoCfGbAi0hXQCk HnCcBRGJjhvrRiLOif82NJLb3eoPG/2mMoNv7HJc4PadcDXlMXFM6rW6S/KkudEhWqdhxR/fK1s H0A== X-Google-Smtp-Source: AGHT+IG5gxx5etlJS8XEklM9jb6RXbjr2MBzNYyK3K6zvzjzbtTe9XCBybhsxXG5rBRlQj+HJ+M1RmTOlz4= X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:85f0:e3db:db05:85e2]) (user=surenb job=sendgmr) by 2002:a05:6902:1009:b0:dbe:387d:a8ef with SMTP id w9-20020a056902100900b00dbe387da8efmr534074ybt.1.1709749493516; Wed, 06 Mar 2024 10:24:53 -0800 (PST) Date: Wed, 6 Mar 2024 10:24:02 -0800 In-Reply-To: <20240306182440.2003814-1-surenb@google.com> Mime-Version: 1.0 References: <20240306182440.2003814-1-surenb@google.com> X-Mailer: git-send-email 2.44.0.278.ge034bb2e1d-goog Message-ID: <20240306182440.2003814-5-surenb@google.com> Subject: [PATCH v5 04/37] scripts/kallysms: Always include __start and __stop symbols From: Suren Baghdasaryan <surenb@google.com> To: akpm@linux-foundation.org Cc: kent.overstreet@linux.dev, mhocko@suse.com, vbabka@suse.cz, hannes@cmpxchg.org, roman.gushchin@linux.dev, mgorman@suse.de, dave@stgolabs.net, willy@infradead.org, liam.howlett@oracle.com, penguin-kernel@i-love.sakura.ne.jp, corbet@lwn.net, void@manifault.com, peterz@infradead.org, juri.lelli@redhat.com, catalin.marinas@arm.com, will@kernel.org, arnd@arndb.de, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, x86@kernel.org, peterx@redhat.com, david@redhat.com, axboe@kernel.dk, mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, dennis@kernel.org, jhubbard@nvidia.com, tj@kernel.org, muchun.song@linux.dev, rppt@kernel.org, paulmck@kernel.org, pasha.tatashin@soleen.com, yosryahmed@google.com, yuzhao@google.com, dhowells@redhat.com, hughd@google.com, andreyknvl@gmail.com, keescook@chromium.org, ndesaulniers@google.com, vvvvvv@google.com, gregkh@linuxfoundation.org, ebiggers@google.com, ytcoode@gmail.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, bristot@redhat.com, vschneid@redhat.com, cl@linux.com, penberg@kernel.org, iamjoonsoo.kim@lge.com, 42.hyeyoo@gmail.com, glider@google.com, elver@google.com, dvyukov@google.com, shakeelb@google.com, songmuchun@bytedance.com, jbaron@akamai.com, aliceryhl@google.com, rientjes@google.com, minchan@google.com, kaleshsingh@google.com, surenb@google.com, kernel-team@android.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arch@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-modules@vger.kernel.org, kasan-dev@googlegroups.com, cgroups@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 9E74A180028 X-Stat-Signature: wym78od3mm5k1z5don18y7ht68dtwhm4 X-HE-Tag: 1709749494-482506 X-HE-Meta: U2FsdGVkX19xiflTWr0RJi9E6bCwx2jYCTSJ2mhsBrjmlNZzA7hYbTnnzkfBe/XoPmwFKKyrd9NHFmbwhz80pOhoDUjM4ycYHJJ19mORAcq8lIawzk7IQmYM3Vex0t59Pa/WrpF+/CqlFiYS3xMqemiAlwIYvnOOmbPlbc2kmbD2X8cHc5Q1oqMDmfNKxWGtJxYJwDuxFTifxV+fwUwMuDm8OTmAnBAxWhLHDdbVS6OMb4QxOKJJgeXvpvfq7DekQIbziVl4gfJ3kvr6BTlR2qtIaeiOAzSmAaSXTzT3XrKYRSEwriG8UoGIjIr3DbV6TJvo+6cALvTSAloAukM8aNKFLzQC9aPrl2/1ABmlN5zNp2Zh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V+c8LeXcZrY7ZZWC9VjFUU39HU3Fk+P4AgYzmO7hq8JdxFsiFnFb+BWA9tpuHZARbi4BeUWj/6wxXsOYFBefUF84kPO5UHQBlB9HywTJKrvEvJTmkxFGGmKW1mWZoNXmXuLIpyrrVAPwsfhRAIzz1Fr4qH0upUj5zEi3Ah+HtaKByvohGGjU6taviIDfIh5vkxlRZZATQkvp9PL4MV4O1M5a1388NJXq+Z2ngMJaqnND7XRgsqOXSzNuXkp3h7zXxZO+PDvjNoovBOnmmEJ1Xj7PL5NebKIpirHPXSAwfI5SED3M7x7hyy/c/Yiga8TXzRCjDqxuel8VCgq0DrJbQ/Fr7PEQn9Q3/X8WJtEBDO6giCy5SLs7vnzAagMmPs= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000033, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
Memory allocation profiling
|
expand
|
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c index 653b92f6d4c8..47978efe4797 100644 --- a/scripts/kallsyms.c +++ b/scripts/kallsyms.c @@ -204,6 +204,11 @@ static int symbol_in_range(const struct sym_entry *s, return 0; } +static bool string_starts_with(const char *s, const char *prefix) +{ + return strncmp(s, prefix, strlen(prefix)) == 0; +} + static int symbol_valid(const struct sym_entry *s) { const char *name = sym_name(s); @@ -211,6 +216,14 @@ static int symbol_valid(const struct sym_entry *s) /* if --all-symbols is not specified, then symbols outside the text * and inittext sections are discarded */ if (!all_symbols) { + /* + * Symbols starting with __start and __stop are used to denote + * section boundaries, and should always be included: + */ + if (string_starts_with(name, "__start_") || + string_starts_with(name, "__stop_")) + return 1; + if (symbol_in_range(s, text_ranges, ARRAY_SIZE(text_ranges)) == 0) return 0;