Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1441271pxb; Thu, 4 Feb 2021 13:05:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8gD32fI5e/QA6JWeSmFDVq/qBEmo/qxom4sQgi/kVSsyXWC+fPdcJrTPwyk/zQtPycYr8 X-Received: by 2002:a17:906:8612:: with SMTP id o18mr905978ejx.435.1612472754987; Thu, 04 Feb 2021 13:05:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612472754; cv=none; d=google.com; s=arc-20160816; b=epH0Af7yWXM9AClDCvQdWhuvJ0MvrdHL5ttiLWJCgeJ2H/bCc1wRnISpTL8DOPcXrv xqfqW9BCjAWXrL74nn/d197w4766oDHj0kYN8NCk7TPxBpHCZbt8qKbn98rW+4jCFyso eJ8WJMq213+rwmxbFOmv6g+DQR2jRnIacyQGhd+SZq9wL91qMVQ4Gwk0RmM9R7n8AvjE 1DBSIj8DwXNBag5sRjFRGnj4OHYGU4MCd0Le6xyaZz2MBYml4S7C5D6FblJdnUA7ZIzU pPkQbo4UQl+GCe1DdmLuDqhSe2ajSBRS3vneVeybwSzZMbz73abQEIi44LaoOwZ6r74L 7URQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=TA0QHo4hxayXna2u3ISjAWlAnQycFLyMCvDvcewpjVQ=; b=T7JlUyXsvsP00sNsPfUWKEkAt5TTj8yZAjUainlJ2NgN75RFp+UsedZ+37K9U2r/Y0 Z2x3kwECAEtPiyu3QYE+cj+XayjnNK1iZ314FlDgTRX0KuuvbkkPB4EWB9V5/C9mznpL rJJXUFMgrU5PTZmX8FgwvaXGUrRO/j6z35q1qRADWDfxGfWNffXApy7c9UqCyJGwTi7D Ue9H5xHGbjcLvs+ypOCCUVrNpDhFLdxj9yuwxJ8Li0BbkwAo+S3fzDWi/tE8FBiN7FPn TY3gG8fdDZULKHmjQEHzr3M77noKtZtWjrFOIGsmcRT88TS13H1aQNKExzIOmOaPsTP3 MLAQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z102si2903378ede.224.2021.02.04.13.05.30; Thu, 04 Feb 2021 13:05:54 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229981AbhBDVBs (ORCPT + 99 others); Thu, 4 Feb 2021 16:01:48 -0500 Received: from elvis.franken.de ([193.175.24.41]:52905 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229511AbhBDVBp (ORCPT ); Thu, 4 Feb 2021 16:01:45 -0500 Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1l7ljq-0002rO-02; Thu, 04 Feb 2021 22:00:30 +0100 Received: by alpha.franken.de (Postfix, from userid 1000) id F1755C0D71; Thu, 4 Feb 2021 21:59:45 +0100 (CET) Date: Thu, 4 Feb 2021 21:59:45 +0100 From: Thomas Bogendoerfer To: Tiezhu Yang Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Xuefeng Li , Juxin Gao , David Daney , Ralf Baechle , Archer Yan Subject: Re: [PATCH v2 1/3] MIPS: kernel: Support extracting off-line stack traces from user-space with perf Message-ID: <20210204205945.GC19460@alpha.franken.de> References: <1612409724-3516-1-git-send-email-yangtiezhu@loongson.cn> <1612409724-3516-2-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1612409724-3516-2-git-send-email-yangtiezhu@loongson.cn> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 04, 2021 at 11:35:22AM +0800, Tiezhu Yang wrote: > Add perf_event_mips_regs/perf_reg_value/perf_reg_validate to support > features HAVE_PERF_REGS/HAVE_PERF_USER_STACK_DUMP in kernel. > > [ayan@wavecomp.com: Repick this patch for unwinding userstack backtrace > by perf and libunwind on MIPS based CPU.] > > [ralf@linux-mips.org: Add perf_get_regs_user() which is required after > 'commit 88a7c26af8da ("perf: Move task_pt_regs sampling into arch code")'.] > > [yangtiezhu@loongson.cn: Fix build error about perf_get_regs_user() after > commit 76a4efa80900 ("perf/arch: Remove perf_sample_data::regs_user_copy"), > and also separate the original patches into two parts (MIPS kernel and perf > tools) to merge easily.] > > The original patches: > https://lore.kernel.org/patchwork/patch/1126521/ > https://lore.kernel.org/patchwork/patch/1126520/ > > Signed-off-by: David Daney > Signed-off-by: Ralf Baechle > Signed-off-by: Archer Yan > Signed-off-by: Tiezhu Yang > --- > > v2: add R26 and R27 to the enum perf_event_mips_regs > > arch/mips/Kconfig | 2 + > arch/mips/include/uapi/asm/perf_regs.h | 40 ++++++++++++++++++++ > arch/mips/kernel/Makefile | 2 +- > arch/mips/kernel/perf_regs.c | 68 ++++++++++++++++++++++++++++++++++ > 4 files changed, 111 insertions(+), 1 deletion(-) > create mode 100644 arch/mips/include/uapi/asm/perf_regs.h > create mode 100644 arch/mips/kernel/perf_regs.c applied to mips-next. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]