Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp158575imu; Thu, 8 Nov 2018 16:55:05 -0800 (PST) X-Google-Smtp-Source: AJdET5cKuB8Syq2BEZqntraULiUGr2BUSU+kR6Z5T5pdwz51jcxhzKbszJvD/Xe3UQFj31v0u3/g X-Received: by 2002:a62:204a:: with SMTP id g71-v6mr6700053pfg.28.1541724905164; Thu, 08 Nov 2018 16:55:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541724905; cv=none; d=google.com; s=arc-20160816; b=Hn8Mtjo05Ds+gM8Ji1ctnhzyIYF1RLTa1Au3HaPTiG96Cj+0+guTiDBj7pIHLjn47u zxMpQTn5b6vrb77pURuis5YlqUgOaifArwmYbpmSpvTQhI+FXCL6LvauPjCRobFWRtlc O8+UStiTWpDI8uv7Ekd5vluUGZcI9SGqZd3bGP2qPKCEo37LouOu9qymnC40wj1gWsWO q8P7yD49HN/rDJoHHsFENNN98tbwyARTgl4C6gH2UhyEI5qJwtFJlfUis85rPfgd1phJ si0Xp/svbBiMKB1PRgHCAkkmDlIl2o1P9iGkItoZ4vtzP3Yok3e9pCrsact+ArG8Rtve JdKw== 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=6h3E7NF8vyeoCxjxwIXmzkeQaUxsN0VIejC4AOIhfsA=; b=UjSOV5HFUIGTWRd2xlx50p6mc9aaMGVoKyCPYyGOX5dgoO0IzZOfT1I6qOVkEslrcx KWBzodr7kAR0k//1nXolVMmmkYgRTFG28v2i4z1a1AFUvHOtjimNEaHHhHH2Hm/9EGhc k51It0YEEH5Fe42s7K2l2gbDJ0DgAXTAQRjGfNTEl4BlHMOWJUTE5Sa6tBMBFbcLuckm 8WDc7v+LKIPpZll+r+Rnxs8h/vIaumeaiafFh+KdSRpdzeJqQiy552Q5b6+eDgCEV0y1 qcfM0h14++kAkNcrTUC6hUssh4IGZQVUqxAdXv8FNtMcWcKi2M5MBeGVsTjdiJ9tDT6u oDDg== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 28-v6si4455543pgn.428.2018.11.08.16.54.47; Thu, 08 Nov 2018 16:55:05 -0800 (PST) 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727567AbeKIKce (ORCPT + 99 others); Fri, 9 Nov 2018 05:32:34 -0500 Received: from mga04.intel.com ([192.55.52.120]:60969 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbeKIKce (ORCPT ); Fri, 9 Nov 2018 05:32:34 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Nov 2018 16:54:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,481,1534834800"; d="scan'208";a="84450513" Received: from tassilo.jf.intel.com (HELO tassilo.localdomain) ([10.7.201.126]) by fmsmga007.fm.intel.com with ESMTP; 08 Nov 2018 16:54:23 -0800 Received: by tassilo.localdomain (Postfix, from userid 1000) id 75188301E5E; Thu, 8 Nov 2018 16:54:23 -0800 (PST) Date: Thu, 8 Nov 2018 16:54:23 -0800 From: Andi Kleen To: Milian Wolff Cc: Jiri Olsa , linux-kernel@vger.kernel.org, Jiri Olsa , namhyung@kernel.org, linux-perf-users@vger.kernel.org, Arnaldo Carvalho Subject: Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?] Message-ID: <20181109005423.GZ6218@tassilo.jf.intel.com> References: <2335309.gnWok9HYb4@agathebauer> <2102566.fCj8pZGm78@agathebauer> <20181106202411.GU6218@tassilo.jf.intel.com> <1584560.aXQ729uQp3@agathebauer> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1584560.aXQ729uQp3@agathebauer> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > - Independently, when I add a custom printk manually in `arch/x86/events/ > intel/ds.c` at the end of `setup_pebs_sample_data`, then I'm never seeing any > differences between SP in iregs/pebs/regs. Shouldn't it also be recorded via > PEBS? Or is it just chance that I'm never seeing any difference in > setup_pebs_sample_data between iregs->sp and regs->sp? It will depend on the workload. > > - Generally, how do we want to handle this bug? If `--intr-regs` would > actually record a different IP than stored in uregs in the perf.data file, > then we could use that as a fallback for unwinding, when it fails the first > time. Or should we always unwind from that IP? How do we mark the "actual" > frame/IP then, if that differs? I don't think the regs include IP currently? Would need to add it. Then could report everything from the original stack in intr-regs, and this would address that problem. Yes it might be useful to add some indication to the sample that there is a potential divergence between the backtrace and the IP. Would also need to report that in perf report then. -Andi