From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CB8701624DF for ; Tue, 3 Mar 2026 12:47:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772542055; cv=none; b=dd2LEonBEf7qpN7WrxsdGNBXoYpRljqe4poSo2H7bVpJX0Lj4CDFUGfuD2AlPdraPlr7WgwSgPg34gVfOK7j/Vxf7AeJDAc+xgsRs490x9tbmWoQ0F0mat5mRJZQRka9Smi3mhwHxfghT3XLVFCsyRx86Msu79SUKTLkzng9+F8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772542055; c=relaxed/simple; bh=MrBbeD1oOMSsm2ilIP0hvPCGu3TfYa13HwpZ91iTEao=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dSOW/I4fORmyR6hwaTEoCQ3ElsQRpbyIQOjkswMyl3BCeFbiPctG7YJHCnaYGf1hSjgIde7q2HjVSROlYGd89vmN/Dlo4cRC9vktjLBEjvHexGYM2QCmnR/a2rVytk10FPOBY+3zil7FuyNukvtV7VK19lLYa0QuElz3QNjCk+I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ITi4VQEZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ITi4VQEZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23AA6C116C6; Tue, 3 Mar 2026 12:47:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772542055; bh=MrBbeD1oOMSsm2ilIP0hvPCGu3TfYa13HwpZ91iTEao=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ITi4VQEZlcM0IAZl1fBeFBF06KSimiAf+AtN0p3vtahqYc+iAhdhQ2CdQlzPOUQZs MmNXfdgB8rVAt8el5HBp3b2e5+Vg+DBDjFW8NJhHKbvMffNFLpcJT8j+4dVmrdJl1v oY5G3EVTUSy8eJYSzemrSKZa5MkuSbQepvKkX4jHJ/1Hee+IY/g6h97jhFIsl8XO48 3sa6XsvCjAlBVXm8kNyDma60UgRa4uIrBPC+ofmCKzYoZCZNWz4oXXCaAs3z4H3yq8 ByaU9dTH/JStQXXXG4cj56EfMzk3WVKg4ufdIU7V1gs8Nhabo4iLjnkLVxMn+PcZ9H oLGgT3O1p8aMQ== Date: Tue, 3 Mar 2026 07:47:33 -0500 From: Sasha Levin To: Jiri Slaby Cc: Geert Uytterhoeven , Richard Weinberger , Linus Torvalds , Andrew Morton , Konstantin Ryabitsev , ksummit , laurent pinchart , Thorsten Leemhuis , Steven Rostedt , users Subject: Re: [RFC] kallsyms: embed source file:line info in kernel stack traces Message-ID: References: <20260302202828.2722037-1-sashal@kernel.org> <91334269.1714.1772519173246.JavaMail.zimbra@nod.at> <10bef54e-eb0c-4ed3-84ca-4e393449e974@kernel.org> Precedence: bulk X-Mailing-List: ksummit@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <10bef54e-eb0c-4ed3-84ca-4e393449e974@kernel.org> On Tue, Mar 03, 2026 at 10:31:46AM +0100, Jiri Slaby wrote: >On 03. 03. 26, 9:11, Geert Uytterhoeven wrote: >>On Tue, 3 Mar 2026 at 07:26, Richard Weinberger wrote: >>>>Von: "Sasha Levin" >>>>Add CONFIG_KALLSYMS_LINEINFO, which embeds a compact address-to-line >>>>lookup table in the kernel image so stack traces directly print source >>>>file and line number information: >> >>>>Memory footprint measured with a simple KVM guest x86_64 config: >>>> >>>> Table: 4,597,583 entries from 4,841 source files >>>> lineinfo_addrs[] 4,597,583 x u32 = 17.5 MiB >>>> lineinfo_file_ids[] 4,597,583 x u16 = 8.8 MiB >>>> lineinfo_lines[] 4,597,583 x u32 = 17.5 MiB >>>> file_offsets + filenames ~ 0.1 MiB >>>> Total .rodata increase: ~ 44.0 MiB >>>> >>>> vmlinux (stripped): 529 MiB -> 573 MiB (+44 MiB / +8.3%) >>> >>>Hm, that's a significant increase. >> >>Other random idea: this data is only needed in case of a crash. >>Perhaps it can be stored compressed, and only be decompressed >>when needed, or even during look-up? > >But obviously not when dumping OOM stack traces :P. Right - I really wanted to avoid memory allocations or disk I/O here. I'm sure we can come up with more efficient ways to store this information - I wanted to keep the initial version simple and easy for review. -- Thanks, Sasha