From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 826E3C433DB for ; Thu, 4 Feb 2021 21:02:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4428860C3E for ; Thu, 4 Feb 2021 21:02:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230050AbhBDVBw (ORCPT ); Thu, 4 Feb 2021 16:01:52 -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 ]