Message ID | 170723207174.502590.8310845480962046722.stgit@devnote2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-55176-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1603341dyb; Tue, 6 Feb 2024 07:08:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHFexCT4BqSsWAjHBascwJrnhHBTXj0vJ/bYqtusY9CRQmHbKpnMFxuM3jKgVSWLJ1//kEE X-Received: by 2002:aa7:84c6:0:b0:6e0:3c34:50d8 with SMTP id x6-20020aa784c6000000b006e03c3450d8mr2853676pfn.4.1707232126493; Tue, 06 Feb 2024 07:08:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707232126; cv=pass; d=google.com; s=arc-20160816; b=gFzlTmROtGMLOy8lvPo5Ci8yx69dFUrjCrfDofHs8yoWenKd/eyEDGmbOS0JXPM5hy 25kxVpVVz+FiF8M4CsECkAZa77NV9HjlBsiEOrT44m1YqW6ArCRV9GwjqXb9HWsxcPYS D/l6/WkVNEdoKWDQT1M3EEiPZ9ThYGhyPouP8o9i5NYwmzNmwx+07qYc36KPLqXmhmFV rFFyXspGAgl+FcAh4sTkCWoGbOXCbLy4g6terTSAeWZLmfEoT+OvEu90HsRyROLYtIFK LT5bY8ZTZb2sAMPbijPxckRNHFHGUPkRm5CUceabx3X23yHdFS52kt11NP6rkrE5BhNo Z9NA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=pkOupataBJGsCIvcHYS0aTNEYz0mzBxc/lo+KDKHOFs=; fh=AVkoyS8Tnt8FlsxZpChuEpzHOnG/c/SzNBSpWS0t3M0=; b=hC38JM/OelVCyGbXKnYSPG5FhOahrptCy5hPcCEWpst7W+vSlgCGl6C7J7ttI5Uo9M 9rqSVPH0RxmHiKNaba8tF67YNXOj8/obgyE8ETTxPELFgU16Q9zzHKovF7CJ2GfHoUhQ FtqZP1mqtfPLD9X1WJUDv3h+P92Z7ihiovfTnB3iuSPjqpoGX/vqtl2p8hrMM1vviPQV rijlCLucZbZg+t80QcCPhH4/2wfrnYaahEK/VUvOZmAS5YNr2Pej1+bbtacoBYdxWLFJ 3/9jCeetPrLsNrycBxta/o+GbuK7P67NEgHzX5aMMAHF/mXD0pHo3odai5s+oxRLbf/W 10Uw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MBKevHBM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55176-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55176-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCUDWquC/RbzNmeBTHdHTHTQ0Sfq5RoscibAJftwp0juWWebJ+DkuI1A6tf+wN518y/QmBSxUnNfWzJbK2e3OP6AQccr0g== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k136-20020a633d8e000000b005d9252c9d05si1834223pga.103.2024.02.06.07.08.46 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 07:08:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55176-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MBKevHBM; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-55176-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55176-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 27119289D46 for <ouuuleilei@gmail.com>; Tue, 6 Feb 2024 15:08:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9364F1332A7; Tue, 6 Feb 2024 15:08:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MBKevHBM" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEA831E866; Tue, 6 Feb 2024 15:07:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707232078; cv=none; b=raMiHPQhgzAyhQdsQUMpBgman7AJORyf3J0c/0UdN5GLc/ZYp+TBgk/R/xdGb4UUxVqeFnFr5GIvnDsF0R3JEFH2XLQTxdtOndR4x5fQK73/M0WQR6b1MyZM1OWaUsbOnwrZSlYqNpY0qpa7md2LAvgUqivI94wPdAt0AIWJbhA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707232078; c=relaxed/simple; bh=fXbFH1CnbhIn3DpSugbxQNOb5BcqjkwOHd00xmP9WY0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=DxmfUPwhfpn2YtjtGuTe+AA3nvJw44ysY9dSNNlxj+snlK/m8cABw6ne7n7chPYv/VFIlRixRByCMU8RzGVe5CkfRAJfjE1+/6s23LsAHNOzgpdRCstD+dNbQFT2vcT5raEX/7jdSR9gurh9zYm6jKpHj03apWA7gJakji+lACE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MBKevHBM; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2D6BC433F1; Tue, 6 Feb 2024 15:07:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707232077; bh=fXbFH1CnbhIn3DpSugbxQNOb5BcqjkwOHd00xmP9WY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MBKevHBMNjgsyg8h2DgvhmrkXL6rttjvpT4dSYx0BbbHzoxV08ViByyJ+iaNwJfO7 NQ6qVtAZ4US5Y+4RqlQ/YRHPu+3HF80HyDiAK8pX61xiHeyvL5C2lSk0h6zN+cvuZU qBg+R2QqnrDJ/pHur9QdtOPSkdN+iFKBtWdZoXSehew/CYUH9/17V+C79fupBwQytD RiB/v3yvh+F8yOu6pCmBrhXNj+bM4UiGYAvJSWdms/5DM1GjjztqH/DQ620e3nUJpA cjS0opgBrmrGZhTSoHQT7YdVqZIFN/2dyCge0ftYk59ybhO7sMj7rAoA1L/1KsMxiO bhLOaAdwI+9hg== From: "Masami Hiramatsu (Google)" <mhiramat@kernel.org> To: Alexei Starovoitov <alexei.starovoitov@gmail.com>, Steven Rostedt <rostedt@goodmis.org>, Florent Revest <revest@chromium.org> Cc: linux-trace-kernel@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>, Martin KaFai Lau <martin.lau@linux.dev>, bpf <bpf@vger.kernel.org>, Sven Schnelle <svens@linux.ibm.com>, Alexei Starovoitov <ast@kernel.org>, Jiri Olsa <jolsa@kernel.org>, Arnaldo Carvalho de Melo <acme@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Alan Maguire <alan.maguire@oracle.com>, Mark Rutland <mark.rutland@arm.com>, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Guo Ren <guoren@kernel.org> Subject: [PATCH v7 02/36] tracing: Add a comment about ftrace_regs definition Date: Wed, 7 Feb 2024 00:07:51 +0900 Message-Id: <170723207174.502590.8310845480962046722.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <170723204881.502590.11906735097521170661.stgit@devnote2> References: <170723204881.502590.11906735097521170661.stgit@devnote2> User-Agent: StGit/0.19 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790162634534375423 X-GMAIL-MSGID: 1790162634534375423 |
Series |
tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph
|
|
Commit Message
Masami Hiramatsu (Google)
Feb. 6, 2024, 3:07 p.m. UTC
From: Masami Hiramatsu (Google) <mhiramat@kernel.org> To clarify what will be expected on ftrace_regs, add a comment to the architecture independent definition of the ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> --- Changes in v3: - Add instruction pointer Changes in v2: - newly added. --- include/linux/ftrace.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index e8921871ef9a..8b48fc621ea0 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@ -118,6 +118,32 @@ extern int ftrace_enabled; #ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS +/** + * ftrace_regs - ftrace partial/optimal register set + * + * ftrace_regs represents a group of registers which is used at the + * function entry and exit. There are three types of registers. + * + * - Registers for passing the parameters to callee, including the stack + * pointer. (e.g. rcx, rdx, rdi, rsi, r8, r9 and rsp on x86_64) + * - Registers for passing the return values to caller. + * (e.g. rax and rdx on x86_64) + * - Registers for hooking the function call and return including the + * frame pointer (the frame pointer is architecture/config dependent) + * (e.g. rip, rbp and rsp for x86_64) + * + * Also, architecture dependent fields can be used for internal process. + * (e.g. orig_ax on x86_64) + * + * On the function entry, those registers will be restored except for + * the stack pointer, so that user can change the function parameters + * and instruction pointer (e.g. live patching.) + * On the function exit, only registers which is used for return values + * are restored. + * + * NOTE: user *must not* access regs directly, only do it via APIs, because + * the member can be changed according to the architecture. + */ struct ftrace_regs { struct pt_regs regs; };