public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@kernel.org>
To: Jiri Olsa <olsajiri@gmail.com>
Cc: masahiroy@kernel.org, linux-kernel@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Nicolas Schier <nicolas@fjasle.eu>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Eduard Zingerman <eddyz87@gmail.com>, Song Liu <song@kernel.org>,
	Yonghong Song <yonghong.song@linux.dev>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@fomichev.me>, Hao Luo <haoluo@google.com>,
	linux-kbuild@vger.kernel.org, bpf@vger.kernel.org,
	shung-hsi.yu@suse.com, msuchanek@suse.com
Subject: Re: [RFC] kbuild: bpf: Do not run pahole with -j on 32bit userspace
Date: Wed, 21 Aug 2024 09:29:57 +0200	[thread overview]
Message-ID: <7ebee21d-058f-4f83-8959-bd7aaa4e7719@kernel.org> (raw)
In-Reply-To: <c2086083-4378-4503-b3e2-08fb14f8ff37@kernel.org>

On 21. 08. 24, 8:40, Jiri Slaby wrote:
>  From https://bugzilla.suse.com/show_bug.cgi?id=1229450#c20:
> Run on 64bit:
> pahole -j32 -> 4.102 GB
> pahole -j16 -> 3.895 GB
> pahole -j1 -> 3.706 GB
> 
> On 32bit (the same vmlinux):
> pahole -j32 -> 2.870 GB (crash)
> pahole -j16 -> 2.810 GB
> pahole -j1 -> 2.444 GB
> 
> Look there for full massif report.

 From https://bugzilla.suse.com/show_bug.cgi?id=1229450#c21:
(In reply to Jiri Slaby from comment #20)
 > | |   |   ->24.01% (954,816,480B) 0x489B4AB: UnknownInlinedFun 
(dwarf_loader.c:959)

So given this struct class_member is the largest consumer, running 
pahole on pahole. The below results in 4.102 GB -> 3.585 GB savings.

--- a/dwarves.h
+++ b/dwarves.h
@@ -487,14 +487,14 @@ int cu__for_all_tags(struct cu *cu,
   */
  struct tag {
         struct list_head node;
+       const char       *attribute;
+       void             *priv;
         type_id_t        type;
         uint16_t         tag;
+       uint16_t         recursivity_level;
         bool             visited;
         bool             top_level;
         bool             has_btf_type_tag;
-       uint16_t         recursivity_level;
-       const char       *attribute;
-       void             *priv;
  };

  // To use with things like type->type_enum == 
perf_event_type+perf_user_event_type
@@ -1086,17 +1086,17 @@ static inline int function__inlined(const struct 
function *func)
  struct class_member {
         struct tag       tag;
         const char       *name;
+       uint64_t         const_value;
         uint32_t         bit_offset;
         uint32_t         bit_size;
         uint32_t         byte_offset;
         int              hole;
         size_t           byte_size;
+       uint32_t         alignment;
         int8_t           bitfield_offset;
         uint8_t          bitfield_size;
         uint8_t          bit_hole;
         uint8_t          bitfield_end:1;
-       uint64_t         const_value;
-       uint32_t         alignment;
         uint8_t          visited:1;
         uint8_t          is_static:1;
         uint8_t          has_bit_offset:1;

-- 
js
suse labs


  reply	other threads:[~2024-08-21  7:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  8:59 [RFC] kbuild: bpf: Do not run pahole with -j on 32bit userspace Jiri Slaby (SUSE)
2024-08-20  9:08 ` Jiri Slaby
2024-08-20 14:33 ` Jiri Olsa
2024-08-21  5:32   ` Jiri Slaby
2024-08-21  6:40     ` Jiri Slaby
2024-08-21  7:29       ` Jiri Slaby [this message]
2024-08-22  3:55         ` Shung-Hsi Yu
2024-08-22 15:24           ` Arnaldo Carvalho de Melo
2024-08-26  8:57             ` Jiri Slaby
2024-08-26 17:03               ` Arnaldo Carvalho de Melo
2024-08-26 18:42                 ` Sedat Dilek
2024-08-26 18:48                   ` Phil Auld
2024-08-26 20:04                     ` Arnaldo Carvalho de Melo
2024-08-26 22:07                       ` Andrii Nakryiko
2024-08-27  8:37                 ` Jiri Slaby
2024-09-04  6:06                   ` Jiri Slaby
2024-08-26 20:02               ` Arnaldo Carvalho de Melo
2024-08-26 10:18             ` Sedat Dilek
2024-09-25  8:17               ` Sedat Dilek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7ebee21d-058f-4f83-8959-bd7aaa4e7719@kernel.org \
    --to=jirislaby@kernel.org \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kpsingh@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=masahiroy@kernel.org \
    --cc=msuchanek@suse.com \
    --cc=nathan@kernel.org \
    --cc=nicolas@fjasle.eu \
    --cc=olsajiri@gmail.com \
    --cc=sdf@fomichev.me \
    --cc=shung-hsi.yu@suse.com \
    --cc=song@kernel.org \
    --cc=yonghong.song@linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox