From: Yang Jihong <yangjihong1@huawei.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: <peterz@infradead.org>, <mingo@redhat.com>, <acme@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>,
<linux-kernel@vger.kernel.org>,
<linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH 3/5] perf record: Tracking side-band events for all CPUs when tracing selected CPUs
Date: Thu, 6 Jul 2023 09:39:28 +0800 [thread overview]
Message-ID: <dba16f45-c303-6600-6102-f78cc90ead6c@huawei.com> (raw)
In-Reply-To: <CAM9d7cjSTqE+rEJiSkAwmg5+XSxrgFFZC3B94fo4rbA9MH9dQg@mail.gmail.com>
Hello,
On 2023/7/6 5:09, Namhyung Kim wrote:
> On Tue, Jul 4, 2023 at 12:44 AM Yang Jihong <yangjihong1@huawei.com> wrote:
>>
>> User space tasks can migrate between CPUs, we need to track side-band
>> events for all CPUs.
>>
>> The specific scenarios are as follows:
>>
>> CPU0 CPU1
>> perf record -C 0 start
>> taskA starts to be created and executed
>> -> PERF_RECORD_COMM and PERF_RECORD_MMAP
>> events only deliver to CPU1
>> ......
>> |
>> migrate to CPU0
>> |
>> Running on CPU0 <----------/
>> ...
>>
>> perf record -C 0 stop
>
> But I'm curious why you don't limit the task to run on the
> specified CPUs only (using taskset).
>
> Also, as you may know, you don't need to specify -C if you
> want to profile specific tasks only. It'll open per-cpu, per-task
> events and they will have all necessary info.
>
The actual application scenario is to perform perf records only for
specified cores. However, during sampling, the system may create new
processes and then migrate the processes between cores due to
scheduling. If the processes run on the selected core, In this case, the
perf report cannot parse symbols for these processes.
>>
>> Now perf samples the PC of taskA. However, perf does not record the
>> PERF_RECORD_COMM and PERF_RECORD_COMM events of taskA.
>
> _COMM and _MMAP right?
>
Yes, PERF_RECORD_COMM and PERF_RECORD_MMAP. There's a clerical error here...
Thanks,
Yang
next prev parent reply other threads:[~2023-07-06 1:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 7:42 [PATCH 0/5] perf record: Tracking side-band events for all CPUs when tracing selected CPUs Yang Jihong
2023-07-04 7:42 ` [PATCH 1/5] perf evlist: Export perf_evlist__propagate_maps() Yang Jihong
2023-07-11 13:12 ` Adrian Hunter
2023-07-12 14:30 ` Yang Jihong
2023-07-12 15:01 ` Adrian Hunter
2023-07-04 7:42 ` [PATCH 2/5] perf evlist: Add evlist__findnew_tracking_event() helper Yang Jihong
2023-07-11 13:13 ` Adrian Hunter
2023-07-12 14:32 ` Yang Jihong
2023-07-04 7:42 ` [PATCH 3/5] perf record: Tracking side-band events for all CPUs when tracing selected CPUs Yang Jihong
2023-07-05 21:09 ` Namhyung Kim
2023-07-06 1:39 ` Yang Jihong [this message]
2023-07-11 13:13 ` Adrian Hunter
2023-07-12 14:44 ` Yang Jihong
2023-07-12 15:03 ` Adrian Hunter
2023-07-04 7:42 ` [PATCH 4/5] perf test: Add test case for record tracking Yang Jihong
2023-07-12 20:48 ` Ian Rogers
2023-07-13 6:59 ` Yang Jihong
2023-07-04 7:42 ` [PATCH 5/5] perf record: All config tracking are integrated into record__config_tracking_events() Yang Jihong
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=dba16f45-c303-6600-6102-f78cc90ead6c@huawei.com \
--to=yangjihong1@huawei.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=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;
as well as URLs for NNTP newsgroup(s).