mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Jihong <yangjihong1@huawei.com>
To: Adrian Hunter <adrian.hunter@intel.com>, <peterz@infradead.org>,
	<mingo@redhat.com>, <acme@kernel.org>, <mark.rutland@arm.com>,
	<alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>,
	<namhyung@kernel.org>, <irogers@google.com>,
	<linux-perf-users@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] perf/core: deliver PERF_RECORD_COMM and PERF_RECORD_MMAP side-band events to all online cpus
Date: Fri, 23 Jun 2023 13:48:39 +0800	[thread overview]
Message-ID: <d6dc0437-854f-8dad-91fc-404138d171a4@huawei.com> (raw)
In-Reply-To: <f5b4e1e4-9966-c22a-1628-b3df37523841@intel.com>

Hello,

On 2023/6/21 2:49, Adrian Hunter wrote:
> On 20/06/23 18:55, Yang Jihong wrote:
>> Tasks are migrated between cores due to scheduling.
>> If perf samples specified CPUs, PERF_RECORD_COMM and PERF_RECORD_MMAP
>> events need be deliver to all cores to avoids the problem that the comm
>> and symbols cannot be parsed due to task migration to the target core.
>>
>> 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
>>
>> Now perf samples the PC of taskA. However, perf does not record the
>> PERF_RECORD_COMM and PERF_RECORD_COMM events of taskA.
>> Therefore, the comm and symbols of taskA cannot be parsed.
> 
> perf record deals with this for PERF_RECORD_TEXT_POKE, by opening
> the corresponding "dummy" event on each CPU irrespective of whether
> the main events are on selected CPUs.  Refer
> evlist__add_dummy_on_all_cpus().
> 
> So this could be handled by perf record.

Okay, I'll take a look at it and use this solution to deal with it.

Thanks,
Yang

      reply	other threads:[~2023-06-23  5:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-20 15:55 Yang Jihong
2023-06-20 15:55 ` [PATCH 1/2] perf/core: perf_iterate_sb_cpu() supports to receive side-band events for all oneline cpus Yang Jihong
2023-06-20 15:55 ` [PATCH 2/2] perf/core: deliver PERF_RECORD_COMM and PERF_RECORD_MMAP side-band events to all online cpus Yang Jihong
2023-06-20 18:49 ` [PATCH 0/2] " Adrian Hunter
2023-06-23  5:48   ` Yang Jihong [this message]

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=d6dc0437-854f-8dad-91fc-404138d171a4@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=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

all inboxes | Powered by JetHome®