linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Maguire <alan.maguire@oracle.com>
To: "Masami Hiramatsu (Google)" <mhiramat@kernel.org>
Cc: rostedt@goodmis.org, corbet@lwn.net, shuah@kernel.org,
	linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
	linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH tracing 0/3] tracing: support > 8 byte filter predicates
Date: Tue, 25 Apr 2023 18:15:03 +0100	[thread overview]
Message-ID: <9c4cebb7-514c-f7fd-1f95-50837460eb66@oracle.com> (raw)
In-Reply-To: <20230425233233.2ad5168c630b4c1349ab3398@kernel.org>

On 25/04/2023 15:32, Masami Hiramatsu (Google) wrote:
> On Tue, 25 Apr 2023 10:16:34 +0100
> Alan Maguire <alan.maguire@oracle.com> wrote:
> 
>> For cases like IPv6 addresses, having a means to supply tracing
>> predicates for fields with more than 8 bytes would be convenient.
>> This series provides a simple way to support this by allowing
>> simple ==, != memory comparison with the predicate supplied when
>> the size of the field exceeds 8 bytes.  For example, to trace
>> ::1, the predicate
>>
>> 	"dst == 0x00000000000000000000000000000001"
>>
>> ..could be used.
> 
> Nice!
> And I also would like to use something like "dst == ipv6(::1)" because
> it seems easy to make a mistake on the number of zeros.
> 
> Can we add such type casting feature to the filter?
>

that's a great idea; what would be the most consistent ftrace syntax
for this do you think? I noticed that hist triggers append a modifier
to the field name so would something like

"dst.ipv6 == ::1"

make sense maybe? Thanks!

Alan

 
> Thank you,
> 
>>
>> Patch 1 provides the support for > 8 byte fields via a memcmp()-style
>> predicate. Patch 2 adds tests for filter predicates, and patch 3
>> documents the fact that for > 8 bytes. only == and != are supported.
>>
>> Changes since RFC [1]:
>>
>> - originally a fix was intermixed with the new functionality as
>>   patch 1 in series [1]; the fix landed separately
>> - small tweaks to how filter predicates are defined via fn_num as
>>   opposed to via fn directly
>>
>> [1] https://lore.kernel.org/lkml/1659910883-18223-1-git-send-email-alan.maguire@oracle.com/
>>
>> Alan Maguire (3):
>>   tracing: support > 8 byte array filter predicates
>>   selftests/ftrace: add test coverage for filter predicates
>>   tracing: document > 8 byte numeric filtering support
>>
>>  Documentation/trace/events.rst                |  9 +++
>>  kernel/trace/trace_events_filter.c            | 55 +++++++++++++++-
>>  .../selftests/ftrace/test.d/event/filter.tc   | 62 +++++++++++++++++++
>>  3 files changed, 125 insertions(+), 1 deletion(-)
>>  create mode 100644 tools/testing/selftests/ftrace/test.d/event/filter.tc
>>
>> -- 
>> 2.31.1
>>
> 
> 

  reply	other threads:[~2023-04-25 17:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-25  9:16 [PATCH tracing 0/3] tracing: support > 8 byte filter predicates Alan Maguire
2023-04-25  9:16 ` [PATCH tracing 1/3] tracing: support > 8 byte array " Alan Maguire
2023-04-25 10:58   ` kernel test robot
2023-04-28  1:37   ` kernel test robot
2023-04-25  9:16 ` [PATCH tracing 2/3] selftests/ftrace: add test coverage for " Alan Maguire
2023-04-25  9:16 ` [PATCH tracing 3/3] tracing: document > 8 byte numeric filtering support Alan Maguire
2023-04-25 14:32 ` [PATCH tracing 0/3] tracing: support > 8 byte filter predicates Masami Hiramatsu
2023-04-25 17:15   ` Alan Maguire [this message]
2023-04-25 17:20     ` Steven Rostedt
2023-04-26  8:51       ` Alan Maguire
2023-04-26 14:08         ` Steven Rostedt
2023-04-26 14:12         ` 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=9c4cebb7-514c-f7fd-1f95-50837460eb66@oracle.com \
    --to=alan.maguire@oracle.com \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=shuah@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).