Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1419138ybj; Tue, 5 May 2020 20:41:54 -0700 (PDT) X-Google-Smtp-Source: APiQypLY5b45C0TpsL3+T8jt6IR6fUgcwlnwLG3FfK1FZz2+5M05d7DC6LoBElSKtHAXHEL4EkCc X-Received: by 2002:a17:906:1f16:: with SMTP id w22mr5711044ejj.327.1588736514840; Tue, 05 May 2020 20:41:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588736514; cv=none; d=google.com; s=arc-20160816; b=KLnerN/Jz1m0fjl0z94nG0hYW1f8y8dbjwUa5vm5FWsWF5Qbrsdb+cNzD43HX/BNUb ctuK0FS+6FosE7DBgNxNHHjFwnzbIdwbILOp9mV6zKO2fvOAGJ2sbC5uNj81TshGRSaY AkeQo1Ze6rLbz7t2wv3FET+gjYwdAi8GO3OME1nFhYzvRriD4yM00G69df1LYuFkxBzg byk81mDUrY+JCjpOpBIpdvmfa8dlW/RE0uDvEf53lPr/vD6yyMkLqKWbgKFhakKk5vGH tvZK0kE0oNVJGoXxl98XOAj1P88XYF557DZi/tcgzMbQjP3Pb1IuK1vS5+nZJqHsFtlr XEnQ== 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 :mime-version:dkim-signature; bh=/K450lb1lXZWNub5l53fuFTH1txZt+evZRmROoeb2I4=; b=TpeMqZnxI1NyGiX6j+mMUF8GE6xf3eHwHRb9Qa9zQAmJXmar47NDrfABUixny8VKoA aEbdzXEEsCuEiYiiRC7PnexABR+ekLPa2hu2H2rzT2ZngN/jY+bJ1NCyOPpt4PdyqdVy fw5YVXCGqv29LA83DTVsOO+RLZRx4/alXfzJKpG/GTD7W9NZGeoFMd4pKFnHtBdPHKoB A7VMsSuvZX6+lncxKxFXI4tbbcKQjoTQB/1Wgc+idN6eMdnUoJz9T4gB4SkpqDrfSoPX mFAalVjIKINhl10vEc/2aFjeUpCmrLtLFRJIe7dc2wDbRHSO7Nul8pFln1YypVzmzjQ7 Q/og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=i66gvCd5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si339174ede.225.2020.05.05.20.41.31; Tue, 05 May 2020 20:41:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=i66gvCd5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726689AbgEFDhx (ORCPT + 99 others); Tue, 5 May 2020 23:37:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726367AbgEFDhx (ORCPT ); Tue, 5 May 2020 23:37:53 -0400 Received: from mail-ua1-x943.google.com (mail-ua1-x943.google.com [IPv6:2607:f8b0:4864:20::943]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEB14C061A0F for ; Tue, 5 May 2020 20:37:52 -0700 (PDT) Received: by mail-ua1-x943.google.com with SMTP id a7so23840uak.2 for ; Tue, 05 May 2020 20:37:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=/K450lb1lXZWNub5l53fuFTH1txZt+evZRmROoeb2I4=; b=i66gvCd5ocghenQRtvgyBvO4MQYtXaaIOon567733AdAxnF0DIOSZhuFE+cORJxNdd YOiB/UYnx7f7v6JjSC+TJ1pc8vKVmZNfKPXeEWf1v9B6zqt7HP9vcSutGuUvtL76kw/d NRnLYDQmjUIKTL4GHRCv/IPLUMcq6VpL0657fCSVZAue++G46gIWtA3FF8w+OKQJJHue /HzU8UFrua5SixBKkwyq3ECJrlKVnF0u9b+Fl5xYVE7qUfHT28DpioD8cBUApJROyv92 r5QixTZ42/4k7N9zgNQp0sQTwpsvIZBVX1BiACbxogmow4WaY9Wp1sXxvIb2yjv6LEZQ XM/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=/K450lb1lXZWNub5l53fuFTH1txZt+evZRmROoeb2I4=; b=snN5xgQiRD04hE40BhRwqktstmUpNXZViGOnmsPgaZImghVSwWhiM+qAPsdpAig3iw jQnX638SDt+potigkNeRo5XVjJ3A2tesT4J+ZbEoPuDDc0RXUf87+qcvxxC5AugdFx2K JxHQfsUNp7ag9gnN2dY9syjUbJKGLHzQy32HIg9aMpUDeCIGTbEYDAlRoYYHA4wIENrH mHCcxUb5ezM755SK/vu7IZy92C2ZoLVEGxXgfMeMe8TlNjvz/92Nr1BRPl8CucRFZKyB I7N4/m8zpyu1TWnDuKOBD29adNmqX4UIKzP439wLKghY+7NoPmBX4ybBVseEZWo9lyHx LcJQ== X-Gm-Message-State: AGi0PuYEAPZUTb/UkQKsUfGfiuCat2Kq7N9ntMoyYhZj521lDyayyXmC z3NOtiQOQb0QghmYhsnWOMxRYUhfpp496HguVHGJDw== X-Received: by 2002:a9f:2344:: with SMTP id 62mr5892977uae.7.1588736271638; Tue, 05 May 2020 20:37:51 -0700 (PDT) MIME-Version: 1.0 From: Stephane Eranian Date: Tue, 5 May 2020 20:37:40 -0700 Message-ID: Subject: callchain ABI change with commit 6cbc304f2f360 To: Peter Zijlstra Cc: LKML , Vince Weaver , jpoimboe@redhat.com, "Liang, Kan" , Andi Kleen 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 Hi, I have received reports from users who have noticed a change of behaviour caused by commit: 6cbc304f2f360 ("perf/x86/intel: Fix unwind errors from PEBS entries (mk-II)") When using PEBS sampling on Intel processors. Doing simple profiling with: $ perf record -g -e cycles:pp ... Before: 1 1595951041120856 0x7f77f8 [0xe8]: PERF_RECORD_SAMPLE(IP, 0x4002): 795385/690513: 0x558aa66a9607 period: 10000019 addr: 0 ... FP chain: nr:22 ..... 0: fffffffffffffe00 ..... 1: 0000558aa66a9607 ..... 2: 0000558aa66a8751 ..... 3: 0000558a984a3d4f Entry 1: matches sampled IP 0x558aa66a9607. After: 3 487420973381085 0x2f797c0 [0x90]: PERF_RECORD_SAMPLE(IP, 0x4002): 349591/146458: 0x559dcd2ef889 period: 10000019 addr: 0 ... FP chain: nr:11 ..... 0: fffffffffffffe00 ..... 1: 0000559dcd2ef88b ..... 2: 0000559dcd19787d ..... 3: 0000559dcd1cf1be entry 1 does not match sampled IP anymore. Before the patch the kernel was stashing the sampled IP from PEBS into the callchain. After the patch it is stashing the interrupted IP, thus with the skid. I am trying to understand whether this is an intentional change or not for the IP. It seems that stashing the interrupted IP would be more consistent across all sampling modes, i.e., with and without PEBS. Entry 1: would always be the interrupted IP. The changelog talks about ORC unwinder being more happy this the interrupted machine state, but not about the ABI expectation here. Could you clarify? Thanks.