Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7452666imu; Wed, 14 Nov 2018 18:07:01 -0800 (PST) X-Google-Smtp-Source: AJdET5c765pYI6llNLzIQae7OP2ltZsqORjkhhLLsz+jeOCFXMUNE0IFLz541fwYGXmDz71NNHaI X-Received: by 2002:a63:1b1f:: with SMTP id b31mr4044873pgb.66.1542247620952; Wed, 14 Nov 2018 18:07:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542247620; cv=none; d=google.com; s=arc-20160816; b=PODIqQfNloeNN4jnumKQK56PFUTbDxgbScpPHtzvJfZR2as4Ik2GJ85xDFuGijwRiq 5KRCY9l3FcNzgtFpXiq10bdPxoAW0yj2Vz5fJyGyrHo5mfADNHT2tOS+TB/C2xK1NDMy NxFLe05euA4mck54hooHklkdAPcQNoL55uI3fEOyB0DFjifaybC8/a5azW29LV1s1C0p MxfUWZIlTZkjLq/PDsyGTAei70i9dH4LxQWXq2tTEL50/tHhiaqMHMlzwyTZpzYkgugm jqbCJp4grUI1Q863RLQUdclC6HrA1sR2eyNO2YfaFkVZ3J5KC9kqpf45h/0jXmEWKdsc a7sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XUz/XSl6RoQ53EWVZFImh1lTtVq5//CnDHoDtignLls=; b=OL2mIzkavqbyobLzEuNBq5nB9QOPQK6n18T08i21pC7pG2fDxFitDFNLxnvk532lbx fCYj1YP4OvmnSb6szwG2CnJAYJvXzMMlF7/lkk62sXNpKpX1M+kfZdJ6vGqYTudxkR/Z BxRvEXlYK7Ad1bQTJ+5c736BR+0fNP08rqh2VOiYxx2TIM+5GwcyIHyT6zGrdg+lh1mB F8vCGBwXnpZJ9AyXnnbk7xFrj8tHLx85+Ncxx4jW0J9kfBiaLVXgWWzQtluVcyyhUiYp NiLWD2J+m+EOg7K2XH/NlHkA0Daknhb7pFAgwsNF6X0/SEu7vujYxxCbCOhnK16KiFeB shcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IyxrDmZJ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23si9070457pfk.287.2018.11.14.18.06.45; Wed, 14 Nov 2018 18:07:00 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=IyxrDmZJ; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727984AbeKOML6 (ORCPT + 99 others); Thu, 15 Nov 2018 07:11:58 -0500 Received: from mail-io1-f67.google.com ([209.85.166.67]:43199 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbeKOML6 (ORCPT ); Thu, 15 Nov 2018 07:11:58 -0500 Received: by mail-io1-f67.google.com with SMTP id t81-v6so13296407iod.10; Wed, 14 Nov 2018 18:06:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XUz/XSl6RoQ53EWVZFImh1lTtVq5//CnDHoDtignLls=; b=IyxrDmZJ5+DzQdqvWM/ucI02P3PU2iJNW2gHZKXV5S95ZLdIINj0vIYhFVOlW4ntTT cV6sCrKyOJPN/GNM4mmIc1C+7b5+EqUgyc6017e6iKVDXaF7mxvtWtAoSpaHmQog5FZ4 tsVM/X+6B18exMADAESxspiqVx+BgSdw9erQeibtHKmyq8bB9bm8uDa+fllNE8KBMWRG ARojpwe5U7vyGXQnCMcAryt1uagQps2KLay1mDpP2M7vIxSVMffJBHrQsAafpSAOipcN d8JLAWEUYTLMB0zzRVlloEZQULgIEaFw3DqSmktrhCRnfCrDcZlioTKP8SOkW/X8f+eQ 9iaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XUz/XSl6RoQ53EWVZFImh1lTtVq5//CnDHoDtignLls=; b=tNs6Bt4L37QjEpsjoKpkjfOLfS/HFIBM0pUX8bGYIeVechjXa4v/ALlkUX6fWEQZeI b1arCv61tjO7gvOfTA5Yfq219F6DWz8/nkqsnqbqlUXq+x48fmf7SlREBuK0bAT+/PbO Gh2u1NWHWLMs0fHLXLtOE9CE/cVMjU++tu2fUrqvNlicWwAsMA1a8DN7KzJ19/uh9A2A sSRTbejlt8zV1xOROdqMV5BFKrSsgwXqdWU7ZNXJzNp9fbdyOxLN+rCbhNeQmaIPWeaN ZZJV/hRlIm9362XiAjlSKMbkfWGOlkz7AB0xjgrkDZtIgcBAXXMQqPcj7QNGt4dr7Z3d OgoA== X-Gm-Message-State: AGRZ1gKDGsCXf+Hnm9PghaGQjMviHSIxjdOmWC5KfTlE4RobllMvP5rs NyqLOFTHnUNDwjnCInDZWsdDyYdkc9RGs/87Tw8= X-Received: by 2002:a6b:5b02:: with SMTP id v2-v6mr3686730ioh.157.1542247568790; Wed, 14 Nov 2018 18:06:08 -0800 (PST) MIME-Version: 1.0 References: <2335309.gnWok9HYb4@agathebauer> <20181112032637.GG6218@tassilo.jf.intel.com> <31474933.dcNFsqGoRn@agathebauer> In-Reply-To: <31474933.dcNFsqGoRn@agathebauer> From: Travis Downs Date: Wed, 14 Nov 2018 21:05:32 -0500 Message-ID: Subject: Re: PEBS level 2/3 breaks dwarf unwinding! [WAS: Re: Broken dwarf unwinding - wrong stack pointer register value?] To: Milian Wolff Cc: ak@linux.intel.com, jolsa@redhat.com, linux-kernel@vger.kernel.org, jolsa@kernel.org, namhyung@kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 14, 2018 at 8:20 AM Milian Wolff wrote: > 3) I suggest we always keep the first frame and sample IP from the user regs, > i.e. the accurate PEBS/IBS IP. Then we add the following frames from unwinding > the ustack with the iregs. Does this mean that the displayed unwind will sometimes be "impossible" to have actually be generated from a consistent execution of the user program? For example, the top frame (from PEBS) and second frame (from iregs) may be inconsistent in that the latter function never calls the first. At this point it would be good to have an indication at the top frame is from a different source than the rest of the frames, lest the user pull is hair out trying to determine how function X seems to call function Y despite that not being the case in the source.