public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Gautam Menghani <gautam@linux.ibm.com>
To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org,
	namhyung@kernel.org, mark.rutland@arm.com,
	alexander.shishkin@linux.intel.com, jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	kan.liang@linux.intel.com
Cc: Gautam Menghani <gautam@linux.ibm.com>,
	maddy@linux.ibm.com, linux-perf-users@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] perf python: Add an example for sampling
Date: Mon, 28 Jul 2025 11:29:26 +0530	[thread overview]
Message-ID: <20250728055937.58531-1-gautam@linux.ibm.com> (raw)

Add an example for sampling events with python. Patch 1 adds support for
record_opts struct and patch 2 adds an example for sampling. The example
also demonstrates usage of the record_opts struct to customize the evsel
initialization from python.

Gautam Menghani (2):
  perf python: Add support for record_opts struct
  perf python: Add sampling.py as example for sampling

 tools/perf/python/sampling.py |  49 +++++++++
 tools/perf/util/python.c      | 186 +++++++++++++++++++++++++++++++++-
 2 files changed, 232 insertions(+), 3 deletions(-)
 create mode 100755 tools/perf/python/sampling.py

-- 
2.49.0


             reply	other threads:[~2025-07-28  6:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-28  5:59 Gautam Menghani [this message]
2025-07-28  5:59 ` [PATCH 1/2] perf python: Add support for record_opts struct Gautam Menghani
2025-07-28  5:59 ` [PATCH 2/2] perf python: Add sampling.py as example for sampling Gautam Menghani
2025-08-12  5:22 ` [PATCH 0/2] perf python: Add an " Gautam Menghani
2025-08-26  7:07 ` Gautam Menghani
2025-09-16 13:30 ` Gautam Menghani
2025-09-16 19:25   ` Arnaldo Carvalho de Melo
2025-09-16 20:07     ` Ian Rogers
2025-09-17 12:37       ` Arnaldo Carvalho de Melo
2025-09-17 15:29         ` Ian Rogers
2025-09-17 16:41           ` Arnaldo Carvalho de Melo
2025-09-17 17:26             ` Ian Rogers

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=20250728055937.58531-1-gautam@linux.ibm.com \
    --to=gautam@linux.ibm.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=maddy@linux.ibm.com \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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