Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp2005698ima; Mon, 22 Oct 2018 02:30:45 -0700 (PDT) X-Google-Smtp-Source: ACcGV62R13ZJ2qDbAsXpbox2kCSu81L+6/T3Sj9AFRtze7HpzgSuN8UqEb6lqLGxWR9Km61IVmkY X-Received: by 2002:a62:939d:: with SMTP id r29-v6mr45239862pfk.55.1540200645454; Mon, 22 Oct 2018 02:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540200645; cv=none; d=google.com; s=arc-20160816; b=eSQS1lnV1gw8lavnvAOTM4vxRk4an6r/amtUhoNstB2o2mDiHWJEtphzOqRFLKDmP3 v/Zg74IgVkqA/snv4/zy5Art1VEbfOw8soAofRNA2NDaR8EKOMjcHxh5aiQhbFGR/O1N gHSP76oiXKQriHwY91Q4e83DNLizJmJM7RBzNJYSyEOF+4mP3OnPT8ynvBpSj0SsOLkl kXxQTcp6rpwnsw+ysXlDmPafKozz+bSiQYkJZwXn/YUBrEaCouUp0gH3B3gKbeeYkopz 7/zf+2CY2sJw7Do7xGV/sHrpK51svBRAVy+4IZpYFxUE1Qq/h0MwKrZiUebl0bCJCgG/ h1hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dk+/QBzDSdWsLGgbPnMkPmi3THDf+mrJK+Ns2s9JnV8=; b=G2rCN5ab+EtipFKt1cbZt0wAYcC1rMuhLEwHMV/ZpYV9K8nF1gBbmRverZdGpTbDAX R12DyPivqlYBe2wbRMjXE7K96c79la5w65aSeXJNMg2XPhLZIH2XjSPjOP1h8+iVWBVn 3tzVp8eELXOCwtdKH6M3fu+IwfIAssXDTuJA33hZcGdIlHvAJI11VGfqRtQw+OlbrlIx pmNPOWDW9mo/I+Za6GTC4jb9DsrN8ZDmZlH0uXQBa78LI4OD4eW0XAHOl9femX0H3nWP /Zj6GVtQCEHfUslOdamfwgQM6su6k+8nfXVgKTH8g4MIfkI1rDfSi8PTRI7220xQiP6p KhNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UEkLLoYn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a195-v6si29295952pfa.235.2018.10.22.02.30.30; Mon, 22 Oct 2018 02:30:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UEkLLoYn; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728156AbeJVRby (ORCPT + 99 others); Mon, 22 Oct 2018 13:31:54 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:60440 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbeJVRbx (ORCPT ); Mon, 22 Oct 2018 13:31:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=dk+/QBzDSdWsLGgbPnMkPmi3THDf+mrJK+Ns2s9JnV8=; b=UEkLLoYneEav5IUvIm9qJiFQEa NOhw1fxD3f74Oxx7FH1TOyG59sW9+YG2148SH8rtkOAL1feyh+6y8EBTsHZAczrikWPAjSclmwd1s GVrV5JNoHLI/4Dih78EMcUpmOkbvKikVAlUuzG+qEXxSw5dbr3EGieuGcQu04z5bnGTGsYAU8E0Ob BnqwHYx78PfHzTTdHiRW+M97QNr3y0huhv4DbZPFQiZxTb3yG2V59tCGEk3Yl7MSMWgQU0XAjt40C 6J4kHxP154hV3WeZybazOpEKC8vYyZEB1L8V1BKyqfOMkq3X8tQE1Y4TuNam82z1T5oo/hz82hvAn Km36x2UA==; Received: from [167.98.65.38] (helo=worktop) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gEWHj-0006my-Na; Mon, 22 Oct 2018 09:14:03 +0000 Received: by worktop (Postfix, from userid 1000) id 55AD96E0885; Sun, 21 Oct 2018 22:13:58 +0200 (CEST) Date: Sun, 21 Oct 2018 22:13:58 +0200 From: Peter Zijlstra To: Aleksa Sarai Cc: Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Steven Rostedt , Robert Richter , Brendan Gregg , linux-kernel@vger.kernel.org, oprofile-list@lists.sf.net Subject: Re: [RFC] Merging ftrace_stack, perf_callchain, oprofile->backtrace and stack_trace Message-ID: <20181021201358.GF4931@worktop.programming.kicks-ass.net> References: <20181021093106.mhjpb2rnx6kstjki@ryuk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20181021093106.mhjpb2rnx6kstjki@ryuk> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 21, 2018 at 08:31:06PM +1100, Aleksa Sarai wrote: > Hi all, >=20 > I'm currently working on a patchset to make kretprobes produce > reasonable stack traces[1], and it appears this is a generic problem > across the entire kernel -- you can see the same kretprobe_trampoline() > issue when using ftrace just as much as bpf_trace. >=20 > However, in working on this patch, I've noticed that there appear to be > several different implementations of "get the stack trace from this > pt_regs" which all appear quite similar. Namely: >=20 > * struct ftrace_stack; > * struct perf_callchain_entry; [**] > * struct stack_trace; the perf thing also does userspace stack, where the others do not afaik. And for the kernel part it already uses the regular kernel unwinder. I'm not sure what you're proposing.