Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2929966imm; Thu, 24 May 2018 19:16:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoSuvzNQ+hi/6c1tNtWFZGlX8GWfs4EMdIYpGOSLpHqivgJGP3za8kTuU82iJHr+DXdL28N X-Received: by 2002:a62:990f:: with SMTP id d15-v6mr503187pfe.115.1527214575292; Thu, 24 May 2018 19:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527214575; cv=none; d=google.com; s=arc-20160816; b=ZuPHEc4I/3Xl6h/PKnodB4DwSMajA4gcEvgPOcKXhK5gxNYYBtu+RJYZpVG8Zik8Bn kLcqZPFq7Vs60stSR4C0yHdcc+QnA2lhWe7WXGvDxozkp8ssMZ0hnbg0jRD/7AO1XWGW 88e0O6z/RXPCmLlj+uQRcu7PRmYBZnVqrza0uWiMb//dyeJVu1MEzuvN3LW+MQTmn8p9 0J2UbEWDkz8hpSHOckRV/sVsXCiaySRTKXrsL9mZeRlnSycPfM2Vdvklt/BiPrxcQyFf Zf+A/iudIRkOF4aGEN4oBb2b5aagLml2iFEhyYoD+m4hjc9ZK53UPZLjZIq2N/r89Z2j 2VIQ== 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 :arc-authentication-results; bh=onPA/0lqPlPVEfpitfx3RblN8MQOMXLT2bCTfhEw+wg=; b=FhkV+AAPLLbYXmds+lawAm2VLbP9pLLPJZ1Pi+AYlJjsrlQWtUQ0CJnee8N8dGzOVz YUIKDv5S2XzxiQHf11VhYL5QxqwaY+lOwPAUSSqmwoDRqQfCAQQkiB5W2T5Yw9wog8mn 0w2ghyZp/+Swk6bUBpIL5y9Ny3dm6WoMrH77CfXOKQv5ZxGn2uVnotiknmHmHK9DdIGY menxjMdJv3UEdzcFasVyAwvvqIPrhdhEeNOjpaJJfChGYwnfMv+F1NJM0SnWzGuGWSdo YJv5bZo8ZjIPwTkzSOYl9Y7ih/uCz84ok3A3Eku+wl3IAhryZSKwZQFhaAR/ZsjMqlcQ zn8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=lqWW3Mwj; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l4-v6si21730988plt.258.2018.05.24.19.16.01; Thu, 24 May 2018 19:16:15 -0700 (PDT) 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=@kernel.org header.s=default header.b=lqWW3Mwj; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965706AbeEXOx0 (ORCPT + 99 others); Thu, 24 May 2018 10:53:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:49238 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965306AbeEXOxY (ORCPT ); Thu, 24 May 2018 10:53:24 -0400 Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 92C92208A4 for ; Thu, 24 May 2018 14:53:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527173603; bh=qf8St2jBF2KHjveO8EbW8EFSriToZxytUkWoG0lng6g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=lqWW3MwjHBUgj6WQXEqA0P5DfqmsZrXCCEXB79dh28IJZ6R8yO6m+ZB3FEH0LciMY FKq5IhI54KW0trqK0Le/w7lpN2ub6eVcSqvh2pqRnECeUgwdlTdzeUDqauZzWJgOO+ QM6fo+hbXlAZvlc+19+jNaKEon8qLoRcTdG5DVKc= Received: by mail-wm0-f46.google.com with SMTP id m129-v6so6120872wmb.3 for ; Thu, 24 May 2018 07:53:23 -0700 (PDT) X-Gm-Message-State: ALKqPwcVWPt6PHHuur2ek+vyAOo+/gEx1gZTh5GBdGRtOO4mvCZ4Olsy ZpIh/C7EsqERHi+eGKPVywnAWU2R4NbqhKG5Y2QmwQ== X-Received: by 2002:a1c:180b:: with SMTP id 11-v6mr8465852wmy.21.1527173602020; Thu, 24 May 2018 07:53:22 -0700 (PDT) MIME-Version: 1.0 References: <31205dc8-b756-e12b-0249-2ed06c2db9c9@linux.intel.com> <20180509145436.GV12217@hirez.programming.kicks-ass.net> <3ecedd91-1c01-6fc5-4648-89eaf5ff0930@linux.intel.com> <20180510101406.GA12217@hirez.programming.kicks-ass.net> <7051f72e-2570-68c8-1488-33ad1b024031@linux.intel.com> <20180523130950.GB12217@hirez.programming.kicks-ass.net> <137eab54-86df-cc7d-4618-bce49dfbc2d2@linux.intel.com> In-Reply-To: <137eab54-86df-cc7d-4618-bce49dfbc2d2@linux.intel.com> From: Andy Lutomirski Date: Thu, 24 May 2018 07:52:33 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2]: perf/x86: store user space frame-pointer value on a sample To: Alexey Budankov Cc: Peter Zijlstra , Andrew Lutomirski , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Andi Kleen , LKML , linux-perf-users@vger.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 Thu, May 24, 2018 at 7:37 AM Alexey Budankov < alexey.budankov@linux.intel.com> wrote: > Hi, > On 23.05.2018 16:09, Peter Zijlstra wrote: > > On Wed, May 23, 2018 at 01:06:58PM +0300, Alexey Budankov wrote: > > > >> Is the patch ready to be up streamed now? > > > > Please post a new one where you modify the comment about the syscalls > > not saving registers and ideally find the commit that made it so. > Sent v3 with adjusted comment. > As far comments become outdated quickly tried to be terse. > > > > Also; I think Andy would appreciate a comment near the syscall code that > > refers back to this code and states what registers we rely upon being > > there (+BP for this patch). > Not sure if I can find all proper places to put comments there. > However there is PUSH_AND_CLEAR_REGS macro that is employed at system > call implementation so it is possible to put something like this there: > .macro PUSH_AND_CLEAR_REGS rdx=%rdx rax=%rax save_ret=0 > /* > ... > * perf/core subsystem relies on bp register value stored > * at pt_regs->bp; see arch/x86/kernel/perf_regs.c: perf_get_regs_user() > * for more details; > ... > */ Near the top of entry_SYSCALL_64 would be reasonable, as would no comment at all, I think. > Thanks, > Alexey > > > >