All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: linux-kernel@vger.kernel.org
Cc: linux-trace-kernel@vger.kernel.org, mark.rutland@arm.com,
	mhiramat@kernel.org, rostedt@goodmis.org, zanussi@kernel.org
Subject: [PATCH 0/2] tracing/hist: add a modulus operator
Date: Thu,  2 Mar 2023 17:17:53 +0000	[thread overview]
Message-ID: <20230302171755.1821653-1-mark.rutland@arm.com> (raw)

I've been analysing some usercopy code, and wanted to cpature the spread
of sizes and alignment of copies for a workload. I found that histrogram
triggers were great for cpaturing the size, but there's not currently a
way to capture the alignment short of recording the entire base pointer
and post-processing the histogram, which is less than ideal.

These patches add a modulus operator to histogram expressions, so which
allows the alignment of pointers to be captured directly.

The first patch is a preparatory refactoring to the expression parsing
code, and the second actually adds the new operator.

Thanks,
Mark.

Mark Rutland (2):
  tracing/hist: simplify contains_operator()
  tracing/hist: add modulus operator

 Documentation/trace/histogram.rst |   4 +-
 kernel/trace/trace_events_hist.c  | 109 ++++++++++++++++--------------
 2 files changed, 62 insertions(+), 51 deletions(-)

-- 
2.30.2


             reply	other threads:[~2023-03-02 17:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02 17:17 Mark Rutland [this message]
2023-03-02 17:17 ` [PATCH 1/2] tracing/hist: simplify contains_operator() Mark Rutland
2023-03-18 19:12   ` Steven Rostedt
2023-03-22 13:13     ` Mark Rutland
2023-03-02 17:17 ` [PATCH 2/2] tracing/hist: add modulus operator Mark Rutland
2023-03-02 21:41   ` kernel test robot
2023-03-03 12:56   ` kernel test robot
2023-03-18 19:19   ` Steven Rostedt
2023-03-22 13:40     ` Mark Rutland

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=20230302171755.1821653-1-mark.rutland@arm.com \
    --to=mark.rutland@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=zanussi@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 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.