From: hejunhao <hejunhao3@huawei.com>
To: Yicong Yang <yangyicong@huawei.com>, <mathieu.poirier@linaro.org>,
<suzuki.poulose@arm.com>, <jonathan.cameron@huawei.com>,
<corbet@lwn.net>, <linux-kernel@vger.kernel.org>,
<linux-doc@vger.kernel.org>
Cc: <alexander.shishkin@linux.intel.com>, <helgaas@kernel.org>,
<linux-pci@vger.kernel.org>, <prime.zeng@huawei.com>,
<yangyicong@hisilicon.com>
Subject: Re: [PATCH v4 4/5] hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU
Date: Mon, 19 Jun 2023 21:00:12 +0800 [thread overview]
Message-ID: <01c39cb9-e56a-862b-2d99-024b7ba5a769@huawei.com> (raw)
In-Reply-To: <20230606142244.10939-5-yangyicong@huawei.com>
Hi, Yicong
On 2023/6/6 22:22, Yicong Yang wrote:
> From: Yicong Yang <yangyicong@hisilicon.com>
>
> The PTT trace collects PCIe TLP headers from the PCIe link and don't
> have the ability to exclude certain context. It doesn't support itrace
> as well. So only advertise PERF_PMU_CAP_NO_EXCLUDE. This will greatly
> save the storage of final data. Tested tracing idle link for ~15s,
> without this patch we'll collect ~28.682MB data for context related
> information and with this patch it reduced to ~0.226MB.
>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
> ---
> drivers/hwtracing/ptt/hisi_ptt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/ptt/hisi_ptt.c b/drivers/hwtracing/ptt/hisi_ptt.c
> index 5c7e93e7705f..ff2c16efe5b1 100644
> --- a/drivers/hwtracing/ptt/hisi_ptt.c
> +++ b/drivers/hwtracing/ptt/hisi_ptt.c
> @@ -1210,7 +1210,7 @@ static int hisi_ptt_register_pmu(struct hisi_ptt *hisi_ptt)
>
> hisi_ptt->hisi_ptt_pmu = (struct pmu) {
> .module = THIS_MODULE,
> - .capabilities = PERF_PMU_CAP_EXCLUSIVE | PERF_PMU_CAP_ITRACE,
> + .capabilities = PERF_PMU_CAP_NO_EXCLUDE,
According to the error prompt of function hisi_ptt_trace_start().
https://elixir.bootlin.com/linux/v6.4-rc7/source/drivers/hwtracing/ptt/hisi_ptt.c#L197
You may be need to keep advertise PERF_PMU_CAP_EXCLUSIVE?
Such pmus can only have one event scheduled at a time, if not the perf
tool will report device busy.
Best regards,
Junhao.
> .task_ctx_nr = perf_sw_context,
> .attr_groups = hisi_ptt_pmu_groups,
> .event_init = hisi_ptt_pmu_event_init,
next prev parent reply other threads:[~2023-06-19 13:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 14:22 [PATCH v4 0/5] Improve PTT filter interface and some fixes Yicong Yang
2023-06-06 14:22 ` [PATCH v4 1/5] hwtracing: hisi_ptt: Factor out filter allocation and release operation Yicong Yang
2023-06-06 14:22 ` [PATCH v4 2/5] hwtracing: hisi_ptt: Add support for dynamically updating the filter list Yicong Yang
2023-06-06 16:40 ` Jonathan Cameron
2023-06-06 14:22 ` [PATCH v4 3/5] hwtracing: hisi_ptt: Export available filters through sysfs Yicong Yang
2023-06-06 16:46 ` Jonathan Cameron
2023-06-06 14:22 ` [PATCH v4 4/5] hwtracing: hisi_ptt: Advertise PERF_PMU_CAP_NO_EXCLUDE for PTT PMU Yicong Yang
2023-06-19 13:00 ` hejunhao [this message]
2023-06-20 9:09 ` Yicong Yang
2023-06-06 14:22 ` [PATCH v4 5/5] hwtracing: hisi_ptt: Fix potential sleep in atomic context Yicong Yang
2023-06-06 16:43 ` Jonathan Cameron
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=01c39cb9-e56a-862b-2d99-024b7ba5a769@huawei.com \
--to=hejunhao3@huawei.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=corbet@lwn.net \
--cc=helgaas@kernel.org \
--cc=jonathan.cameron@huawei.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=prime.zeng@huawei.com \
--cc=suzuki.poulose@arm.com \
--cc=yangyicong@hisilicon.com \
--cc=yangyicong@huawei.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