lkml.org 
[lkml]   [2022]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 01/12] user_events: Add minimal support for trace_event into ftrace
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>

\
 
 \ /
  Last update: 2022-01-17 16:45    [W:0.105 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site