From nobody Thu Jun 18 22:49:37 2026 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ghGBg2YGFz6gtST for ; Thu, 18 Jun 2026 22:49:47 +0000 (UTC) (envelope-from cracauer@cons.org) Received: from koef.zs64.net (koef.zs64.net [IPv6:2a00:14b0:f001:100::e6]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ghGBf6M7hz4J61 for ; Thu, 18 Jun 2026 22:49:46 +0000 (UTC) (envelope-from cracauer@cons.org) Authentication-Results: mx1.freebsd.org; none Received: from koef.zs64.net (koef.zs64.net [212.12.50.230]) by 0ons.org (8.18.2/8.15.2) with ESMTP id 65IMnc4k005234; Thu, 18 Jun 2026 22:49:38 GMT (envelope-from cracauer@koef.zs64.net) Received: (from cracauer@localhost) by koef.zs64.net (8.18.2/8.15.2/Submit) id 65IMnbXu005232; Thu, 18 Jun 2026 18:49:37 -0400 (EDT) (envelope-from cracauer) Date: Thu, 18 Jun 2026 18:49:37 -0400 From: Martin Cracauer To: Joe Schaefer Cc: Martin Cracauer , freebsd-hackers@freebsd.org Subject: Re: Do we use -fno-omit-frame-pointers by accident? Message-ID: References: List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:13135, ipnet:2a00:14b0::/32, country:DE] X-Rspamd-Queue-Id: 4ghGBf6M7hz4J61 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated Joe Schaefer wrote on Thu, Jun 18, 2026 at 06:46:15PM -0400: > Do you like it when dtrace generates symbolized stack traces? Then you want > this flag. To clarify, I want frame pointers. Martin > On Thu, Jun 18, 2026 at 4:54???PM Martin Cracauer wrote: > > > I was about to propose on BSDCan to turn on -fno-omit-frame-pointer > > for the base system userland and most ports.[*] > > > > So I went benchmarking the performance impact. > > > > I discovered that CFLAGS+=-fno-omit-frame-pointer changes nothing > > about our binaries and shared libraries. CFLAGS+=-fomit-frame-pointer > > makes them a little smaller. So it looks like we default to having > > frame pointers... somehow. I verified in the compiler stdout that the > > flags I set are in fact in effect. > > > > Sizes for 16-current 283959bbe0863917c4fc3200a92d1055a4c89bdc /bin/sh: > > > > text data bss dec hex filename > > - default: > > 164503 3712 5520 173735 2a6a7 > > - -fomit-frame-pointer > > 163831 3712 6192 173735 2a6a7 > > - -fno-omit-frame-pointer > > 164503 3712 5520 173735 2a6a7 > > > > > > [*] The reason why I bring this up now is that Ubuntu is doing the > > work for use of determining which pieces of software have actually too > > high overhead with FPs. Such as the CPython interpreter. Depending > > on further benchmarking the base userland this changes the > > effort/benefit balance. > > > > More words here: > > > > https://docs.google.com/presentation/d/17AGf6a0IxIzqcgd4-5FWdQhLzBV9DfLEhNTm-xL0vyc/edit?usp=sharing > > > > Martin > > -- > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > Martin Cracauer http://www.cons.org/cracauer/ > > > > -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/