Message ID | 170505427384.459169.12870691493043411135.stgit@devnote2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-24547-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp75071dyc; Fri, 12 Jan 2024 02:12:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IFOtPoFTiH+Te6WScWLhWhrOgbFC6dIHSYZGNEbjRmik9oHPNcx6mkrKQ4vahZUythWpnJn X-Received: by 2002:a05:6214:c8d:b0:680:b44c:1a01 with SMTP id r13-20020a0562140c8d00b00680b44c1a01mr717008qvr.116.1705054336068; Fri, 12 Jan 2024 02:12:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705054336; cv=none; d=google.com; s=arc-20160816; b=TuUHEsLeopcfNyjRRfVTIAn5c/N8mrTRgkdUN+jp1o/7xIokiujnuHn7EN2FfLjKdt gm9RKyhz5tnkDDY7Ett9CIBObpOGZ4VVhy7rK/MNgdYWfdCpVk5zq4CBRX6HKxpifJxw qYWycm/VLsKTIjbeYQC+37d+3Awl9M/KY+a+0z3CMsW+XC1o05Lmz2CpVmjIfPcfFGFp X4kJoqEFK92VfhKemZgB3cDPPdgOEeoqK5ATrRyiUCTHfn8l93gv2s/+Y66Z2cB2+7Qv KAcss3IOuGzR3vWJmYsGFPQiOj+XCP3VaeEILBSTTRTV0bkFDPPvx8I9gxgkdQ0wue51 t0ew== ARC-Message-Signature: i=1; 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=SIgps5XdV0XNwjZfT2uAI7g3mrspDldK9Qs8qQAfoa4=; b=z6ExhleRBW+uSCYJfHmlgAB+x7SQhA5/R7SggNQUeMDFASLQEdXMYnl8U6Nlfqgjv7 xC59M5R5svRuqNFEr2fdtPCgmXQeI0h+P5GeckiYiWaZYxouBxFL95wLK7ZPYstU/qwE uJvxofABXp6ofk3zFL2HpPLClOIbSqK4jIdT+2OIQGe4HU02E3vgn4ddaNSR21tmfEQB NGNAy64GlWxEZwIvuS9m82Hsdv5nVS7O8St3/RfH2WmOOt468Nq//KUXhFDLlVG0Mf1d FggiiQl92kBtCl5iKpDVcjzyjSeB7UrR7uf6EDO7Um51LQfRcQOC9pR4ObwtobXD2b3m a/Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NxFC9jkP; spf=pass (google.com: domain of linux-kernel+bounces-24547-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24547-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p12-20020a0c8c8c000000b0067f4f8cc986si2526679qvb.274.2024.01.12.02.12.15 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 02:12:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24547-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NxFC9jkP; spf=pass (google.com: domain of linux-kernel+bounces-24547-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24547-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D88461C24C35 for <ouuuleilei@gmail.com>; Fri, 12 Jan 2024 10:12:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 114AB5EE80; Fri, 12 Jan 2024 10:11:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NxFC9jkP" 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 665DD5DF2D; Fri, 12 Jan 2024 10:11:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 13778C433C7; Fri, 12 Jan 2024 10:11:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705054280; bh=fXbFH1CnbhIn3DpSugbxQNOb5BcqjkwOHd00xmP9WY0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NxFC9jkPlN7an4Xdrcilr85BFyWOBxS44YIJ5+Dt9J6JLNEDC3QdtLIHFR8IT3kQN G8liurMBGobnwfTC73+AbA3lQaMeqR2DczjfaLbTS0YoZkOyDdzTZWvAoXxTskexq6 AQnxsJ50Maai1qxPXo6HrC3PW49QHGnoJj3+uH8J6orHR6qSYdygSB9U0TGmouNY1k fpnTX6XlmcSuhGki25n7J2PrIkRQ3oP1CeZFfl3ZYjZXxdtKH6ZhO8TQ/PaLlcFIAT GR5fg4IaHuvRc901FQnjrt8oP5ZWyrXvX5mAY1uOL6jc1u1GzPCVYieyb2ZELqOSCj cThgFyL8QFX9A== 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 v6 02/36] tracing: Add a comment about ftrace_regs definition Date: Fri, 12 Jan 2024 19:11:13 +0900 Message-Id: <170505427384.459169.12870691493043411135.stgit@devnote2> X-Mailer: git-send-email 2.34.1 In-Reply-To: <170505424954.459169.10630626365737237288.stgit@devnote2> References: <170505424954.459169.10630626365737237288.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: 1787879055762513928 X-GMAIL-MSGID: 1787879055762513928 |
Series |
tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph
|
|
Commit Message
Masami Hiramatsu (Google)
Jan. 12, 2024, 10:11 a.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; };