From: Adrian Hunter <adrian.hunter@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
linux-perf-users@vger.kernel.org
Subject: Re: [PATCH] perf/x86/intel/pt: Fix sampling using single range output
Date: Mon, 14 Nov 2022 13:10:38 +0200 [thread overview]
Message-ID: <dfbeecdb-c97c-993f-da03-5f3d1f141c61@intel.com> (raw)
In-Reply-To: <Y3IdnRgEPq2FN/ZX@hirez.programming.kicks-ass.net>
On 14/11/22 12:51, Peter Zijlstra wrote:
> On Sat, Nov 12, 2022 at 05:15:08PM +0200, Adrian Hunter wrote:
>> Deal with errata TGL052, ADL037 and RPL017 "Trace May Contain Incorrect
>> Data When Configured With Single Range Output Larger Than 4KB" by
>> disabling single range output whenever larger than 4KB.
>>
>> Fixes: 670638477aed ("perf/x86/intel/pt: Opportunistically use single range output mode")
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
>> ---
>> arch/x86/events/intel/pt.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/x86/events/intel/pt.c b/arch/x86/events/intel/pt.c
>> index 82ef87e9a897..42a55794004a 100644
>> --- a/arch/x86/events/intel/pt.c
>> +++ b/arch/x86/events/intel/pt.c
>> @@ -1263,6 +1263,15 @@ static int pt_buffer_try_single(struct pt_buffer *buf, int nr_pages)
>> if (1 << order != nr_pages)
>> goto out;
>>
>> + /*
>> + * Some processors cannot always support single range for more than
>> + * 4KB - refer errata TGL052, ADL037 and RPL017. Future processors might
>> + * also be affected, so for now rather than trying to keep track of
>> + * which ones, just disable it for all.
>> + */
>> + if (nr_pages > 1)
>> + goto out;
>
> This effectively declares single-output-mode dead? Because I don't think
> anybody uses PT with a single 4K buffer.
4K is the default size for "sample mode" i.e. stuffing 4KB of Intel PT trace
data into a PERF_RECORD_SAMPLE record that has sample_type bit PERF_SAMPLE_AUX
e.g.
$ perf record -vv --aux-sample -e '{intel_pt//u,cycles:u}' uname 2>err.txt
Linux
$ grep aux_sample_size err.txt
aux_sample_size 4096
$
next prev parent reply other threads:[~2022-11-14 11:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-12 15:15 [PATCH] perf/x86/intel/pt: Fix sampling using single range output Adrian Hunter
2022-11-14 10:51 ` Peter Zijlstra
2022-11-14 11:10 ` Adrian Hunter [this message]
2022-11-14 12:59 ` Peter Zijlstra
2022-11-15 19:46 ` Andi Kleen
2022-11-16 6:26 ` Adrian Hunter
2022-11-16 9:21 ` [tip: perf/urgent] " tip-bot2 for Adrian Hunter
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=dfbeecdb-c97c-993f-da03-5f3d1f141c61@intel.com \
--to=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--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