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 2EAEB1FC0FE; Wed, 4 Jun 2025 21:40:37 +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=1749073238; cv=none; b=e4l09WIJ48uE52o0POpSfRlqONzqynqFVwDgwK5IAncQonVsTFKzAoA7x39hGRSbFDxZ244iBHeEj9l2nNESvnbOuqO3gftGjQEyUdRU02l9whYEEENEgRBvGcJnx705uh8UPobsg/4uF1cRIOELmo5deiaW+T0CyTnMzTmrApk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749073238; c=relaxed/simple; bh=aAeuHK5WWn3+SYekWH+tpsFhTjD2tgoSA/hS4ezKTkU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=CjinQD3XkA8PgRcwMMk6lUn+KBowQk+wbJ+LLsdyAVTpRs2deD58Dc2ydycpaD0x1qop19H1AtXf8DfmPZZK9qMx0VUzIp+l5BlXaoXM9Tk04Fn9zplCE60Y3Hg7Uxwb93k4bMK26mcRq+GsdmY+b6HZE8MlA1AqUTxVSnbP9Mg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Ly5nrdNW; 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="Ly5nrdNW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42C29C4CEE4; Wed, 4 Jun 2025 21:40:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1749073237; bh=aAeuHK5WWn3+SYekWH+tpsFhTjD2tgoSA/hS4ezKTkU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Ly5nrdNWs6kVeCnPi710BfN63b45OWCwtbvkKFkWSrNnnZ/ML956ygHdjWdKuHvJz 3apMaLBfA73s2qNF5+6l04aJqKXpccKBYA0y/OYgwP3jEbILwsWHW+cIselWUaRbGM 7mDqdbGc+01hDgdSpEnRkutkibqe2KwZEvKa10l2rdPfht4kREnmKnQkgGgVNyfwMk dl5g9g4I9htbco3lTlRzcFAQZDMhLP5enEgWrXyyBa1HxoyjYPG4pEmOike2Kgl8UJ BHVKQIotuJRelSWbhVQ0xTGxTyllhuy34/3zhksryfxW3AeJLYnk2VsDPjCProtGNk WRJFhk8U/TmEw== Date: Wed, 4 Jun 2025 14:40:34 -0700 From: Namhyung Kim To: Blake Jones , Song Liu , Jiri Olsa Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Eduard Zingerman , Yonghong Song , John Fastabend , KP Singh , Stanislav Fomichev , Hao Luo , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Ian Rogers , Adrian Hunter , Kan Liang , Chun-Tse Shao , Zhongqiu Han , James Clark , Charlie Jenkins , Andi Kleen , Dmitry Vyukov , Leo Yan , Yujie Liu , Graham Woodward , Yicong Yang , Ben Gainey , linux-kernel@vger.kernel.org, bpf@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: Re: [PATCH 2/3] perf: collect BPF metadata from existing BPF programs Message-ID: References: <20250521222725.3895192-1-blakejones@google.com> <20250521222725.3895192-3-blakejones@google.com> Precedence: bulk X-Mailing-List: linux-perf-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, Jun 03, 2025 at 03:29:35PM -0700, Blake Jones wrote: > On Tue, Jun 3, 2025 at 3:10 PM Namhyung Kim wrote: > > > Hmmm. Is that documented and tested anywhere? Offhand it sounds like an > > > implementation detail that I wouldn't feel great about depending on - > > > certainly not without a strong guarantee that it wouldn't change. > > > > Good point. Maybe BPF folks have some idea? > > > > Anyway the current code generates them together in a function. > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/events/core.c?h=v6.15#n9825 > > It certainly does, yeah. But I don't want to have that become another > instance of https://www.hyrumslaw.com/. Thanks for sharing this. I'm curious about the semantics of the KSYMBOL and BPF_EVENT. And I feel like there should be a connection between them. Song and Jiri, what do you think? Thanks, Namhyung > > > > Can you say more about why the duplicated records concern you? > > > > More data means more chance to lost something. I don't expect this is > > gonna be a practical concern but in general we should pursue less data. > > That makes sense. In this case, it will only show up for BPF programs that > define "bpf_metadata_" variables (which is already an opt-in action), and > the number of variables a given program defines is likely to be quite small. > So I think the cost of the marginal increase in data generated is outweighed > by the usability and reliability benefits of being able to match these events > 1:1 with the KSYMBOL events. If this proves to be a problem in practice, > it can be revisited. > > Blake