Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1042593imu; Mon, 5 Nov 2018 12:52:02 -0800 (PST) X-Google-Smtp-Source: AJdET5eNxMUv81vUkWRdcpGcbpuMZByuoSWeT5fN0quz1SPbF9pbqnnxTVELmEcCKXXvmipc+9+r X-Received: by 2002:a65:584c:: with SMTP id s12-v6mr19714180pgr.99.1541451122102; Mon, 05 Nov 2018 12:52:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541451122; cv=none; d=google.com; s=arc-20160816; b=FWzS+Hh8zS02qRwVd4ZkTNBZXVhBa6F4DmpEvGVDDD77pnq3fAQgeuQQBzQ4SrsKF9 qWmzW8ROAJQWcTL2Ix/iwPwvnDAqCKmD3bX/goX2Qds4ND0PV3BhX0IHOMM2/SvMy7m9 /NOxBSmi2C+B83rcobIS4EjjVmSrVuDe9AZr/+zIhXWCaNUN62gkfkUsMNwIxB4+oQ0O +9/WHEDBgwME4pkH/+eCxhkJZBok0N1YX9Kcg0/Mn8B/SIIS8m/CbO1syB/TLCJf7igT VQ3Xdhk+ldh9S63LwV0copv28OzqCXKU4YUs3560TE8NN+hmOTg0/wSgHE/PEsLYu2cD mgYw== 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=eN2kw326Yegt7gU2pADvwwbTGnZcnhY/1x/ssTqmMRA=; b=kXaA9AHqpgErGcmEKWkYerjXQ14h4IOPBzWj6HZY5pI0nEgT2Yz0RoBCWyCcdlVL9d x8wwUeEPcFFT5H30Yh1lx0DyAVwey9u7LGfijFUdLBQCKpWRTMoig0UR01lMjfvoeami F1mWlkqqMoSK56vZyApmqxna+d/G1elT4Dy05CxiUx7A7HN4b/pYzUD9e6ZDY7kr6yS5 8uYY0th2AMaXVorsZrzNRWvKZ06z09S4meiYSUHdTrYVsziBGuWkXHVu5NrNxSvvJppw ADtw4+HshkGLFuZFFNgv59F9FcpmHWHtt8GssfXPdC0JkZHuo6lZa+xDurUiVoZWKUii EY1Q== 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 t10si11126647pgn.551.2018.11.05.12.51.46; Mon, 05 Nov 2018 12:52:02 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730283AbeKFGMy (ORCPT + 99 others); Tue, 6 Nov 2018 01:12:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45826 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726902AbeKFGMy (ORCPT ); Tue, 6 Nov 2018 01:12:54 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 119D62D7F5; Mon, 5 Nov 2018 20:51:23 +0000 (UTC) Received: from krava (ovpn-204-79.brq.redhat.com [10.40.204.79]) by smtp.corp.redhat.com (Postfix) with SMTP id EBCD55D73F; Mon, 5 Nov 2018 20:51:20 +0000 (UTC) Date: Mon, 5 Nov 2018 21:51:19 +0100 From: Jiri Olsa To: Milian Wolff Cc: Andi Kleen , 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: <20181105205119.GC25674@krava> References: <2335309.gnWok9HYb4@agathebauer> <13521319.OzbRBoFVZM@agathebauer> <20181102112635.GD5458@krava> <3227038.olIWmsCzzY@agathebauer> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3227038.olIWmsCzzY@agathebauer> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Mon, 05 Nov 2018 20:51:23 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 02, 2018 at 06:56:50PM +0100, Milian Wolff wrote: SNIP > > > > > > Note how precise levels 0 and 1 do not produce any samples where unwinding > > > fails. But precise level 2 produces some, and precise level 3 increases > > > the > > > amount (by ca. ~2x). > > > > > > I can reproduce this pattern on two separate Intel CPUs and kernel > > > versions > > > currently: > > > > > > Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz with 4.18.16-arch1-1-ARCH > > > Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz with 4.14.78-1-lts > > > > > > Could someone else try this? What about AMD and IBS - is it also affected? > > > What about newer/different Intel CPUs? > > > > I tried on intel and can't actualy see that.. how do the failed samples > > look like? like is there the stack dump attached, what's in the regs? > > > > could you please paste the 'perf report -D' output for some of the > > failed samples? > > See here for one case: https://paste.kde.org/prryvdilq we should really print some helpfull debug output for this.. like to show some markers where the stack data starts > > What Intel CPU did you use? What microcode version? Which kernel version? > > Generally, isn't what I'm seeing actually a neccessary evil of the ustack > based unwinding in perf? I mean, the general procedure is as follows if I'm > not mistaken: > > - PMU triggers interrupt and PEBS stores RIP etc. > - code continous to execute, possibly changing the stack I dont think the code continues to execute.. the stack is ok the problem I saw in past is that the copy from user is not 100% and sometimes you might not get full stack data you asked for have you tried with libdw unwinder? if one of the unwinder shows more callchains, we need to fix the other one ;-) jirka