From: Masami Hiramatsu <mhiramat@kernel.org>
To: Beau Belgrave <beaub@linux.microsoft.com>
Cc: rostedt@goodmis.org, linux-trace-devel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 01/12] user_events: Add minimal support for trace_event into ftrace
Date: Tue, 18 Jan 2022 00:45:17 +0900 [thread overview]
Message-ID: <20220118004517.b9dda3d98d6c5d6233ac8886@kernel.org> (raw)
In-Reply-To: <20220111172602.2513-2-beaub@linux.microsoft.com>
Hi Beau,
On Tue, 11 Jan 2022 09:25:51 -0800
Beau Belgrave <beaub@linux.microsoft.com> wrote:
> +static int user_event_show(struct seq_file *m, struct dyn_event *ev)
> +{
> + struct user_event *user = container_of(ev, struct user_event, devent);
> + struct ftrace_event_field *field, *next;
> + struct list_head *head;
> + int depth = 0;
> +
> + seq_printf(m, "%s%s", USER_EVENTS_PREFIX, EVENT_NAME(user));
> +
> + head = trace_get_fields(&user->call);
> +
> + list_for_each_entry_safe_reverse(field, next, head, link) {
> + if (depth == 0)
> + seq_puts(m, " ");
> + else
> + seq_puts(m, "; ");
> + seq_printf(m, "%s %s", field->type, field->name);
> + depth++;
> + }
> +
> + seq_puts(m, "\n");
> +
> + return 0;
> +}
Let me confirm just one point. Your syntax supports
[__data_loc|__rel_loc] [unsigned] TYPE[\[LEN\]] NAME
or
struct TYPE NAME SIZE
for the fields, right? In that case, above seq_printf() seems not enough.
Thank you,
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2022-01-17 15:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-11 17:25 [PATCH v9 00/12] user_events: Enable user processes to create and write to trace events Beau Belgrave
2022-01-11 17:25 ` [PATCH v9 01/12] user_events: Add minimal support for trace_event into ftrace Beau Belgrave
2022-01-17 15:45 ` Masami Hiramatsu [this message]
2022-01-17 18:09 ` Beau Belgrave
2022-01-18 1:02 ` Masami Hiramatsu
2022-01-11 17:25 ` [PATCH v9 02/12] user_events: Add print_fmt generation support for basic types Beau Belgrave
2022-01-11 17:25 ` [PATCH v9 03/12] user_events: Handle matching arguments from dyn_events Beau Belgrave
2022-01-11 17:25 ` [PATCH v9 04/12] user_events: Add basic perf and eBPF support Beau Belgrave
2022-01-11 17:25 ` [PATCH v9 05/12] user_events: Optimize writing events by only copying data once Beau Belgrave
2022-01-11 17:25 ` [PATCH v9 06/12] user_events: Validate user payloads for size and null termination Beau Belgrave
2022-01-11 17:25 ` [PATCH v9 07/12] user_events: Add self-test for ftrace integration Beau Belgrave
2022-01-11 17:25 ` [PATCH v9 08/12] user_events: Add self-test for dynamic_events integration Beau Belgrave
2022-01-11 17:25 ` [PATCH v9 09/12] user_events: Add self-test for perf_event integration Beau Belgrave
2022-01-11 17:26 ` [PATCH v9 10/12] user_events: Add self-test for validator boundaries Beau Belgrave
2022-01-11 17:26 ` [PATCH v9 11/12] user_events: Add sample code for typical usage Beau Belgrave
2022-01-11 17:26 ` [PATCH v9 12/12] user_events: Add documentation file Beau Belgrave
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=20220118004517.b9dda3d98d6c5d6233ac8886@kernel.org \
--to=mhiramat@kernel.org \
--cc=beaub@linux.microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-devel@vger.kernel.org \
--cc=rostedt@goodmis.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
Powered by JetHome