From: Steven Rostedt <rostedt@goodmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
linux-trace-kernel@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/3] tracing/probes: Fix return value when "(fault)" is injected
Date: Thu, 6 Jul 2023 22:20:20 -0400 [thread overview]
Message-ID: <20230706222020.6e5c8e89@rorschach.local.home> (raw)
In-Reply-To: <20230707110210.06e81e182c775454ce86280d@kernel.org>
On Fri, 7 Jul 2023 11:02:10 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> /* Print type function for string type */
> int PRINT_TYPE_FUNC_NAME(string)(struct trace_seq *s, void *data, void *ent)
> {
> int len = *(u32 *)data >> 16;
>
> if (!len)
> trace_seq_puts(s, "(fault)");
> else
> ----
>
> In this case, what we need is to set data_loc length = 0 if ret < 0.
>
> Do you really need to get '"(fault)"' (with double quotation) or
> just '(fault)' (no double quotation) is OK?
># echo 'e:myopen syscalls/sys_enter_openat file=+0($filename):ustring' >> /sys/kernel/tracing/dynamic_events
># trace-cmd start -e myopen
># trace-cmd show
# tracer: nop
#
# entries-in-buffer/entries-written: 19/19 #P:4
#
# _-----=> irqs-off/BH-disabled
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / _-=> migrate-disable
# |||| / delay
# TASK-PID CPU# ||||| TIMESTAMP FUNCTION
# | | | ||||| | |
trace-cmd-4688 [000] ...1. 466968.015784: myopen: (syscalls.sys_enter_openat) file=(fault)
trace-cmd-4688 [000] ...1. 466968.015816: myopen: (syscalls.sys_enter_openat) file=(fault)
trace-cmd-4688 [000] ...1. 466968.015833: myopen: (syscalls.sys_enter_openat) file=(fault)
trace-cmd-4688 [000] ...1. 466968.015849: myopen: (syscalls.sys_enter_openat) file=(fault)
trace-cmd-4688 [000] ...1. 466968.015864: myopen: (syscalls.sys_enter_openat) file=(fault)
trace-cmd-4688 [000] ...1. 466968.015879: myopen: (syscalls.sys_enter_openat) file=(fault)
Does that answer your question? ;-)
-- Steve
next prev parent reply other threads:[~2023-07-07 2:20 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-02 14:47 [PATCH 0/3] tracing/probes: Fix bugs in process_fetch_insn Masami Hiramatsu (Google)
2023-07-02 14:47 ` [PATCH 1/3] tracing/probes: Fix to avoid double count of the string length on the array Masami Hiramatsu (Google)
[not found] ` <25bd757c-f929-0153-4c94-f0502c5d1005@web.de>
2023-07-03 8:21 ` Masami Hiramatsu
2023-07-02 14:47 ` [PATCH 2/3] tracing/probes: Fix to exit fetching if an error is detected Masami Hiramatsu (Google)
2023-07-07 7:07 ` Masami Hiramatsu
2023-07-02 14:47 ` [PATCH 3/3] tracing/probes: Fix return value when "(fault)" is injected Masami Hiramatsu (Google)
2023-07-06 2:49 ` Steven Rostedt
2023-07-06 4:40 ` Masami Hiramatsu
2023-07-06 13:50 ` Steven Rostedt
2023-07-07 2:02 ` Masami Hiramatsu
2023-07-07 2:20 ` Steven Rostedt [this message]
2023-07-07 2:51 ` Masami Hiramatsu
2023-07-07 3:06 ` Steven Rostedt
2023-07-07 6:54 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230706222020.6e5c8e89@rorschach.local.home \
--to=rostedt@goodmis.org \
--cc=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).