Received: by 10.223.185.116 with SMTP id b49csp1036428wrg; Wed, 21 Feb 2018 10:59:03 -0800 (PST) X-Google-Smtp-Source: AH8x225YJ6iAew5XE/bT1RIJdMRddDd5ZkZgqj2rPjJSOxIyS6WjHZ2mmfM5mfgUaDGqPVzbAvJS X-Received: by 10.101.65.137 with SMTP id a9mr3382126pgq.99.1519239543670; Wed, 21 Feb 2018 10:59:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239543; cv=none; d=google.com; s=arc-20160816; b=zyUBXzItjJKnYnN7t/il+YZ7F6X6Ef497MMxMzCu1qI+ecaClR4tzZlRm/vfTVFVkB 93+mLDBVlL0Nb7nZMpTyzwt1UxwyJVUvLD2tVJG9n1NECkUj3ROPHs9W7e6b4lzrrLPj 66OIDA+2aOhVUCIHEtusC+1N2/i12R7+V9hz8SvM9l8x0kp8GDU+kY2r2Qs0nbg4t/7f 48xqyLCGI7g53yNqiXfjQ7VBJ5oX9rpIHuHmKFxRKieJVwFMNzslTPCCciU0ycnRFq7B Fy7GAxrwH1V8lJ74hoA04kEKZCnHIoubPMrjQTI2jYDo5bjSpQ/7DKpH2tUTvsZxezwj c0ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:to:from:cc:in-reply-to:subject:date:dkim-signature :arc-authentication-results; bh=EfHc9wlI0s5BhFDICcIOmC21xPRyLZZdbOOgPBjv+4U=; b=qUhK9is9/RLcHt+Bf9zmjdE8AJnYn7vbSUct0fhK1ImcTQXP2wizfQg+jHyFxVSstt OcK4SAC2FxqRjq5zU97Y23JgcMy4XKMdzPI3Q+rpxtR871ZT5lLKGuvfaak7fHKcAWsB /e58OihguyWpIf/NB+GTbMQRtui6eruVqgsoX7wv5AeaT7UcVkamyQ4TGW0mY8UNxpG9 D/q/z17eBLoOy+FK4RNUYLnKkStOx1QzkBncbgkWszxqcOTK6pMmgmhdKQaikF7v20Ct hDZl+7GaxKugnruZv2fSfFw37zPdTcgJgzbJK0pqP9NW2ggvXIGWbFIiSdMGHmoCGqQ4 ugjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=htCjVz/F; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q12-v6si151830plk.518.2018.02.21.10.58.49; Wed, 21 Feb 2018 10:59:03 -0800 (PST) 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=@sifive.com header.s=google header.b=htCjVz/F; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932291AbeBUQFP (ORCPT + 99 others); Wed, 21 Feb 2018 11:05:15 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:32779 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753170AbeBUQFN (ORCPT ); Wed, 21 Feb 2018 11:05:13 -0500 Received: by mail-pl0-f68.google.com with SMTP id x18so1146101pln.0 for ; Wed, 21 Feb 2018 08:05:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:subject:in-reply-to:cc:from:to:message-id:mime-version :content-transfer-encoding; bh=EfHc9wlI0s5BhFDICcIOmC21xPRyLZZdbOOgPBjv+4U=; b=htCjVz/FqzYy/pPuaodaOiRXUh0IQwppKRsXuaaLPXZ3FslgfR1Rep3YiNuofNsxUw 6kCUkr9kMlzrhoBkDZXX0EBbNSoI0IpbFFA8EzEZYg+705jxDzPKCk+NUgWk75/e0+uh /J1NY3cQOqIaN7Z+mK02xpKq1LQeEXghgewoWNPChFD/M6hKcV5iwhlLSaaDbBwFOe5V YpM5oN58A0J2XZEwKrKVqhakxIUh4aND6nTRpmDU+N+TN/nsIpsNk5voVfZj/sc9DEja reAwVi0EeWpAmpueE2rYpt+cW8s4pwAzTAs7JHi5nb862CkBm1wVtIjmBhuQ1DYDStJg MxJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:subject:in-reply-to:cc:from:to:message-id :mime-version:content-transfer-encoding; bh=EfHc9wlI0s5BhFDICcIOmC21xPRyLZZdbOOgPBjv+4U=; b=CnS6cKOr7UCgeQy2qmFuI9Z+1uON5Zk60mtLSUWtKiyzaqN46G8AXU+updOB3oEmIk Deqbd/2Wu7jrHBXhHqA9D2viO/xWmEncAXSTJIyGU+LvyuZbLqI1guu2+ttN/unR4k6E peGCAVY6vxlPxOEjpLHcpT+e0aUVW25TN+xgTSYXtCzn84xppNtfid4aSTRVRd1wf7Eo bBkOhuwGXn8E9baAVHJqbyeg5RKniyReEVuGJ++MrFLwhc2gvXGZp/t33OvakYgUF3Kd 5rYBdRukkZeeZxAfdP5TzMB2ghWsW8WALhQkV3kJT0neC3RO0SuYN6BKSBI3zXRIrmHl gSlg== X-Gm-Message-State: APf1xPDwJrSrKC34axVnQzR6vYtZNyQRRpAAUbbKRXxpITJHNRuIfHI9 x4cQztxrRa+atitS97u235kZ6YJjmXQ= X-Received: by 2002:a17:902:684a:: with SMTP id f10-v6mr3671484pln.129.1519229112378; Wed, 21 Feb 2018 08:05:12 -0800 (PST) Received: from localhost ([12.206.222.5]) by smtp.gmail.com with ESMTPSA id z7sm10677435pgp.55.2018.02.21.08.05.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 08:05:11 -0800 (PST) Date: Wed, 21 Feb 2018 08:05:11 -0800 (PST) X-Google-Original-Date: Wed, 21 Feb 2018 08:04:54 PST (-0800) Subject: Re: [patches] [PATCH v4 0/6] Add dynamic ftrace support for RISC-V platforms In-Reply-To: <1518498801-677-1-git-send-email-alankao@andestech.com> CC: albert@sifive.com, rostedt@goodmis.org, mingo@redhat.com, patches@groups.riscv.org, linux-kernel@vger.kernel.org, greentime@andestech.com, alankao@andestech.com From: Palmer Dabbelt To: alankao@andestech.com Message-ID: Mime-Version: 1.0 (MHng) Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 12 Feb 2018 21:13:15 PST (-0800), alankao@andestech.com wrote: > This patch set includes the building blocks of dynamic ftrace features > for RISC-V machines. > > Changes in v4: > - Organize code structure according to changes in v3 > - Rebase onto the riscv-linux-4.15 branch at github's > riscv/riscv-linux repo. Note that this set is based on the previous > ftrace patch, which provided basic support. > > Changes in v3: > - Replace the nops at the tracer call sites into "call ftrace_stub" > instructions for better understanding (1/6, 2/6 and 5/6) > > 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 | 56 ++++++++++ > arch/riscv/kernel/Makefile | 5 +- > arch/riscv/kernel/ftrace.c | 175 ++++++++++++++++++++++++++++- > arch/riscv/kernel/mcount-dyn.S | 239 ++++++++++++++++++++++++++++++++++++++++ > arch/riscv/kernel/mcount.S | 22 ++-- > arch/riscv/kernel/stacktrace.c | 6 + > scripts/recordmcount.pl | 5 + > 9 files changed, 501 insertions(+), 13 deletions(-) > create mode 100644 arch/riscv/kernel/mcount-dyn.S Thanks! I've added this to our for-next tree, it should be good to go for 4.17. Sorry this took a while, I'm still a bit behind from FOSDEM.