linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ajay Kaher <ajay.kaher@broadcom.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@redhat.com, acme@kernel.org, namhyung@kernel.org,
	 mark.rutland@arm.com, rostedt@goodmis.org,
	alexander.shishkin@linux.intel.com,  jolsa@kernel.org,
	irogers@google.com, adrian.hunter@intel.com,
	 kan.liang@linux.intel.com, yangjihong1@huawei.com,
	zegao2021@gmail.com,  leo.yan@linux.dev, asmadeus@codewreck.org,
	siyanteng@loongson.cn,  sunhaiyong@loongson.cn,
	linux-perf-users@vger.kernel.org,  linux-kernel@vger.kernel.org,
	alexey.makhalov@broadcom.com,  vasavi.sirnapalli@broadcom.com,
	 Vamsi Krishna Brahmajosyula
	<vamsi-krishna.brahmajosyula@broadcom.com>,
	nadav.amit@gmail.com
Subject: Re: [PATCH RFC 1/3] perf/core: add logic to collect off-cpu sample
Date: Sun, 14 Jul 2024 21:53:10 +0530	[thread overview]
Message-ID: <CAD2QZ9YQ6n_6J+bq+wNxS5bGuAOsLkSiicigan84qaD+xrjS3Q@mail.gmail.com> (raw)
In-Reply-To: <20240711214936.GH27299@noisy.programming.kicks-ass.net>

On Fri, Jul 12, 2024 at 3:19 AM Peter Zijlstra <peterz@infradead.org> wrote:
>
> On Thu, Jul 11, 2024 at 05:46:17PM +0530, Ajay Kaher wrote:
> > following logics has been added to collect the off-cpu sample:
> >
> > - 'task_pt_regs(current)' has been used to capture registers
> >   status off-cpu sample.
> >
> > - off-cpu time represent the time period for which the target
> >   process not occupying the cpu cycles. And calculate as:
> >
> >   off-cpu time = swap-in time - swap-out time
> >
>
> I have absolutely no idea what you're trying to do :/ The above does not
> constitute a comprehensible Changelog.

Sorry Peter, it’s sched-in/out (not swap-in/out).

'Perf record' captures on-cpu samples at frequency which is specified by
the user ( i.e. time period to collect sample is NSEC_PER_SEC / freq).

This patch is to collect the off_cpu sample and time period of off_cpu
sample is calculated based upon the time when target task was sched_out
to sched_in, as:

 off-cpu time period = sched_in time - sched-out time

-Ajay

  reply	other threads:[~2024-07-14 16:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-11 12:16 [PATCH RFC 0/3] perf: add logic to collect off-cpu samples Ajay Kaher
2024-07-11 12:16 ` [PATCH RFC 1/3] perf/core: add logic to collect off-cpu sample Ajay Kaher
2024-07-11 21:49   ` Peter Zijlstra
2024-07-14 16:23     ` Ajay Kaher [this message]
2024-07-15 11:48       ` Peter Zijlstra
2024-07-11 12:16 ` [PATCH RFC 2/3] perf/record: add options --off-cpu-kernel Ajay Kaher
2024-07-11 12:16 ` [PATCH RFC 3/3] perf/report: add off-cpu samples Ajay Kaher
2024-07-11 21:58 ` [PATCH RFC 0/3] perf: add logic to collect " Ian Rogers
2024-07-13  7:42   ` Ajay Kaher
2024-07-14 18:32     ` 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=CAD2QZ9YQ6n_6J+bq+wNxS5bGuAOsLkSiicigan84qaD+xrjS3Q@mail.gmail.com \
    --to=ajay.kaher@broadcom.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexey.makhalov@broadcom.com \
    --cc=asmadeus@codewreck.org \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=leo.yan@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=nadav.amit@gmail.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=siyanteng@loongson.cn \
    --cc=sunhaiyong@loongson.cn \
    --cc=vamsi-krishna.brahmajosyula@broadcom.com \
    --cc=vasavi.sirnapalli@broadcom.com \
    --cc=yangjihong1@huawei.com \
    --cc=zegao2021@gmail.com \
    /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).