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 9E16F29D0E; Sat, 10 May 2025 13:46:23 +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=1746884783; cv=none; b=tb5XpS/8zDyQgvauZJ4uw+0yXxQt6W7DbCmUJfykSimZFSuprwJscdRly3iVOzOywl5xeR+74T7Bhg3WYvmzrq2iZdmUs3c+Cwe5UyOy6oiWcWi37t4ISAIu3Zb6Ap5kRkbbxwMwGUxQ0bqfj0Sn++21wYtAilCc83fNzql3Qng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746884783; c=relaxed/simple; bh=fjpKoWqdc3vCm/9VC/lrOl0V74WomSTGSztx/tIggqw=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qkC9/hERXcWZkMQ+NlgJvD233FhvhKIQWSp8wrINgAiCZoED9N8VEjA5tRJMXP1SYSEI3lHD7LpQD/X5ZwoZmfQ44wPxORpcH6hqfGb6DJKzF9oMseRlDm1YHbnc2MT3tpE/yhP+WpDgVCu4yvSZYKOovJxYGTtN+oCNe7QrFMY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5762C4CEE2; Sat, 10 May 2025 13:46:21 +0000 (UTC) Date: Sat, 10 May 2025 09:46:38 -0400 From: Steven Rostedt To: Andrii Nakryiko Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, bpf@vger.kernel.org, x86@kernel.org, Masami Hiramatsu , Mathieu Desnoyers , Josh Poimboeuf , Peter Zijlstra , Ingo Molnar , Jiri Olsa , Namhyung Kim Subject: Re: [PATCH v8 15/18] perf: Have get_perf_callchain() return NULL if crosstask and user are set Message-ID: <20250510094638.27aa5f8b@gandalf.local.home> In-Reply-To: References: <20250509164524.448387100@goodmis.org> <20250509165156.135430576@goodmis.org> X-Mailer: Claws Mail 3.20.0git84 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-trace-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 9 May 2025 14:53:38 -0700 Andrii Nakryiko wrote: > > @@ -224,6 +224,10 @@ get_perf_callchain(struct pt_regs *regs, bool kernel, bool user, > > struct perf_callchain_entry_ctx ctx; > > int rctx, start_entry_idx; > > > > + /* crosstask is not supported for user stacks */ > > + if (crosstask && user) > > + return NULL; > > I think get_perf_callchain() supports requesting both user and kernel > stack traces, and if it's crosstask, you can still get kernel (but not > user) stack, if I'm reading the code correctly. > > So by just returning NULL early you will change this behavior, no? Basically you are saying that one could ask for a kernel/user stack trace with crosstask enabled and still just get the kernel trace? If this is the case, then I think it may be best to remove patches 15-18 from this series and work on them in the "perf specific" series, as this doesn't have anything to do with the unwind infrastructure itself. Actually, patch 14 doesn't either, so I may move that one too (and keep the acks to it). Thanks, -- Steve > > > + > > entry = get_callchain_entry(&rctx); > > if (!entry) > > return NULL;