All of lore.kernel.org
 help / color / mirror / Atom feed
From: Beau Belgrave <beaub@linux.microsoft.com>
To: rostedt@goodmis.org, mhiramat@kernel.org,
	dcook@linux.microsoft.com, alanau@linux.microsoft.com
Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org
Subject: [PATCH 0/2] tracing: Fix print_fields() and use best filter
Date: Wed, 19 Apr 2023 14:41:38 -0700	[thread overview]
Message-ID: <20230419214140.4158-1-beaub@linux.microsoft.com> (raw)

When using user_events along with the new print_fields() functionality
a few issues were discovered. When printing out fields, the __rel_loc
field types were printing out the wrong array values. Also, user_events
wasn't setting the best filter type, so __rel_loc data was marked as
FILTER_OTHER vs FILTER_RDYN_STRING when chars were used. This resulted
in strings being printed out as array of bytes vs a string.

After applying this series user_events will output strings correctly
for __rel_loc via /sys/kernel/tracing/trace outputs. All events that
utilize print_fields() will print the correct array/string for
__data_loc and __rel_loc data, when it's enabled.

Beau Belgrave (2):
  tracing/user_events: Set event filter_type from type
  tracing: Fix print_fields() for __dyn_loc/__rel_loc

 kernel/trace/trace_events_user.c |  3 +++
 kernel/trace/trace_output.c      | 10 ++++++----
 2 files changed, 9 insertions(+), 4 deletions(-)


base-commit: 88fe1ec75fcb296579e05eaf3807da3ee83137e4
-- 
2.25.1


             reply	other threads:[~2023-04-19 21:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-19 21:41 Beau Belgrave [this message]
2023-04-19 21:41 ` [PATCH 1/2] tracing/user_events: Set event filter_type from type Beau Belgrave
2023-04-19 21:41 ` [PATCH 2/2] tracing: Fix print_fields() for __dyn_loc/__rel_loc 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=20230419214140.4158-1-beaub@linux.microsoft.com \
    --to=beaub@linux.microsoft.com \
    --cc=alanau@linux.microsoft.com \
    --cc=dcook@linux.microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.