Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2115195yba; Fri, 19 Apr 2019 12:25:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzv4aX8Z7ndhdU0p9axmdACoan9BdKIUD0lI78H32rAf738w/emw0/TTGUEfyHA8BcCpG8U X-Received: by 2002:a17:902:b181:: with SMTP id s1mr5665692plr.9.1555701908243; Fri, 19 Apr 2019 12:25:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555701908; cv=none; d=google.com; s=arc-20160816; b=AjZoKo5bX0tMWEcx8SxeTEAeCJO5UtIO1Od0q9GQb6nX/kmNArq4FMjfkqV45nqhWn n2rDAiuL4Fat7RyuCZRQM5txLrGTdz45uQmp+GLemxwNGbDYmnj1ufnAFwZG1LVdU2X1 Z5M7jEZiVitXhG61BcRAEk6NEJleGDZEuSfTeQw2tOSr4fMzG+JNd3mnWKnjh6Q+5eUf 15oexlixKHMz3k1ONzbxUnyz5vR3xZH/KCf88up12Z3MDjcfnGe0oWR/Oxjl60ZX1pKF 9h9kFScbFGzK9GR/OsWqsreWoJh9WnbpiFM9uJwSuNYh4cKkimKmSe76aWTODHdw4DjH 4lFA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wxEtTHZMM4IDtmnwkvqGIEgbKZ1xuag9ZlVhelA0H0w=; b=sMpn/6USJ9KcT2bMwgt/Am+xZ1/grwBZB0GTgB7+j9Cc9XCPweoRsTj3tGftxWgjSR MNwEtZ3ht8bUHbdkbsJKQyZ5D25SyLAgBznbgRo8eM+R0nI6XVvgUq9MyxsflQS4lDHJ gqEPCoemw42hHX/yGY1Ack/P6G3UpGbsV1t8YrHD8Tc5VhV699nA+wAq7xMRkcbBlvq5 7e0AEQmpp+4DJNNZK9Av7UcA956sX6xCe+3yxAFh+ysOT2KauSuDh96S+zsjCpCZmToi jVDu0uywDqlfV3B9J0onzkt0rDvUM/nTrNvqfKnG75ZIcq/svePFMtEFbMjw7VuInHgP Wmeg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9si5672273pgr.443.2019.04.19.12.24.53; Fri, 19 Apr 2019 12:25:08 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727394AbfDSTXp (ORCPT + 99 others); Fri, 19 Apr 2019 15:23:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34530 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726423AbfDSTXo (ORCPT ); Fri, 19 Apr 2019 15:23:44 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 63BE37DCC2; Fri, 19 Apr 2019 15:45:39 +0000 (UTC) Received: from treble (ovpn-124-190.rdu2.redhat.com [10.10.124.190]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4617F600C7; Fri, 19 Apr 2019 15:45:38 +0000 (UTC) Date: Fri, 19 Apr 2019 10:45:36 -0500 From: Josh Poimboeuf To: Kairui Song Cc: Peter Zijlstra , Linux Kernel Mailing List , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Alexei Starovoitov , Namhyung Kim , Thomas Gleixner , Borislav Petkov Subject: Re: [RFC PATCH v3] perf/x86: make perf callchain work without CONFIG_FRAME_POINTER Message-ID: <20190419154536.7n3pernnimblvtfe@treble> References: <20190418160730.11901-1-kasong@redhat.com> <20190419005821.ttlpav7gviaed7am@treble> <20190419094313.GO7905@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 19 Apr 2019 15:45:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 19, 2019 at 07:47:18PM +0800, Kairui Song wrote: > On Fri, Apr 19, 2019 at 5:43 PM Peter Zijlstra wrote: > > > > On Fri, Apr 19, 2019 at 10:17:49AM +0800, Kairui Song wrote: > > > On Fri, Apr 19, 2019 at 8:58 AM Josh Poimboeuf wrote: > > > > > > > > I still don't like using regs->bp because it results in different code > > > > paths for FP and ORC. In the FP case, the regs are treated like real > > > > regs even though they're fake. > > > > > > > > Something like the below would be much simpler. Would this work? I don't > > > > know if any other code relies on the fake regs->bp or regs->sp. > > > > > > Works perfectly. My only concern is that FP path used to work very > > > well, not sure it's a good idea to change it, and this may bring some > > > extra overhead for FP path. > > > > Given Josh wrote all that code, I'm fairly sure it is still OK :-) > > > > But also looking at the code in unwind_frame.c, __unwind_start() seems > > to pretty much do what the removed caller_frame_pointer() did (when > > .regs=NULL) but better. > > > > OK, with FP we will also need to do a few more extra unwinding, > previously it start directly from the frame of the trace point, now > have to trace back to the trace point first. > If that's fine I could post another update (that will be pretty much > just copy&paste from the Josh's code he posted :P , is this OK?) You're right that FP will need to unwind a few extra frames, but I doubt that will make much of a difference performance-wise. I prefer the simpler approach. If you use that patch for the next version then you can add Co-developed-by: Josh Poimboeuf Thanks. -- Josh