Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757042AbbKSGhR (ORCPT ); Thu, 19 Nov 2015 01:37:17 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:38554 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbbKSGhP (ORCPT ); Thu, 19 Nov 2015 01:37:15 -0500 Date: Thu, 19 Nov 2015 07:37:10 +0100 From: Ingo Molnar To: "Wangnan (F)" Cc: Jiri Olsa , Arnaldo Carvalho de Melo , David Ahern , Peter Zijlstra , Milian Wolff , linux-kernel@vger.kernel.org, pi3orama , lizefan 00213767 Subject: Re: [BUG REPORT] perf tools: x86_64: Broken calllchain when sampling taken at 'callq' instruction Message-ID: <20151119063709.GA14852@gmail.com> References: <564C26C4.2040603@huawei.com> <564C3011.8090002@huawei.com> <20151118082033.GA24726@gmail.com> <564C3A0E.3030502@huawei.com> <564C3BAA.4040806@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <564C3BAA.4040806@huawei.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 873 Lines: 28 * Wangnan (F) wrote: > >perf cmdline is > > > ># ./pref record -g -F 9 --call-graph dwarf ./test_dwarf_unwind > > > >Use default events, precise_ip == 2 so uses PEBS. > > > > Testetd 'cycles', 'cycles:p' and 'cycles:pp'. Only 'cycles:pp' captures > sample at callq. So maybe a PEBS problem? Well, that's how our PEBS sampling works: we roll back the instruction pointer to point at the instruction generating the sample. The state itself is post-instruction. So dwarf unwind has to take this into account. Should the kernel pass in the original (uncorrected) RIP as well, perhaps? Thanks, Ingo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/