Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754022AbeAOGsH (ORCPT + 1 other); Mon, 15 Jan 2018 01:48:07 -0500 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46903 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751086AbeAOGsG (ORCPT ); Mon, 15 Jan 2018 01:48:06 -0500 X-Google-Smtp-Source: ACJfBosS+JXVyFe6/JM/x7Sacfqe8vr2YMApAAcJqJJY28g4puRNUBeWBB0lMR1HFhfP4AUqOY3gig== From: Alan Kao X-Google-Original-From: Alan Kao To: Palmer Dabbelt , Albert Ou , Christoph Hellwig , Steven Rostedt , Ingo Molnar , Masahiro Yamada , Kamil Rytarowski , Andrew Morton , patches@groups.riscv.org, linux-kernel@vger.kernel.org Cc: Alan Kao , Greentime Hu Subject: [PATCH v2 0/6] Add dynamic ftrace support for RISC-V platforms Date: Mon, 15 Jan 2018 14:47:36 +0800 Message-Id: <20180115064742.25324-1-alankao@andestech.com> X-Mailer: git-send-email 2.15.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: This patch set includes the building blocks of dynamic ftrace features for RISC-V machines. Changes in v2: - Fix the return value as writing to kernel text goes wrong (2/6) - Replace manual comparisons by calling memcmp (2/6) - Simplify the conditional assignment in the Makefile (1/6) Alan Kao (6): riscv/ftrace: Add RECORD_MCOUNT support riscv/ftrace: Add dynamic function tracer support riscv/ftrace: Add dynamic function graph tracer support riscv/ftrace: Add ARCH_SUPPORTS_FTRACE_OPS support riscv/ftrace: Add DYNAMIC_FTRACE_WITH_REGS support riscv/ftrace: Add HAVE_FUNCTION_GRAPH_RET_ADDR_PTR support arch/riscv/Kconfig | 3 + arch/riscv/Makefile | 3 + arch/riscv/include/asm/ftrace.h | 47 ++++++++ arch/riscv/kernel/Makefile | 5 +- arch/riscv/kernel/ftrace.c | 142 ++++++++++++++++++++++- arch/riscv/kernel/mcount-dyn.S | 244 ++++++++++++++++++++++++++++++++++++++++ arch/riscv/kernel/mcount.S | 22 ++-- arch/riscv/kernel/stacktrace.c | 6 + scripts/recordmcount.pl | 5 + 9 files changed, 464 insertions(+), 13 deletions(-) create mode 100644 arch/riscv/kernel/mcount-dyn.S -- 2.15.1