LKML Archive mirror
 help / color / mirror / Atom feed
From: Alexander Shishkin <alexander.shishkin@linux.intel.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, Jiri Olsa <jolsa@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	alexander.shishkin@linux.intel.com
Subject: Re: [PATCH 2/2] perf intel-pt: Use aux_watermark
Date: Wed, 14 Apr 2021 18:50:42 +0300	[thread overview]
Message-ID: <87wnt4g90t.fsf@ashishki-desk.ger.corp.intel.com> (raw)
In-Reply-To: <e8097eb7-66cb-432a-a799-2514b28ae48e@intel.com>

Adrian Hunter <adrian.hunter@intel.com> writes:

> On 8/04/21 6:31 pm, Alexander Shishkin wrote:
>> diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
>> index a6420c647959..d00707faf547 100644
>> --- a/tools/perf/arch/x86/util/intel-pt.c
>> +++ b/tools/perf/arch/x86/util/intel-pt.c
>> @@ -776,6 +776,10 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
>>  		}
>>  	}
>>  
>> +	if (opts->full_auxtrace)
>> +		intel_pt_evsel->core.attr.aux_watermark =
>> +		       opts->auxtrace_mmap_pages / 4 * page_size;
>> +
>
> I would be explicit about the mode and put "/ 4" at the end
> for the case auxtrace_mmap_pages is not a multiple of 4 (e.g. 2).
> i.e.
>
> 	if (!opts->auxtrace_snapshot_mode && !opts->auxtrace_sample_mode) {
> 		u32 aux_watermark = opts->auxtrace_mmap_pages * page_size / 4;
>
> 		intel_pt_evsel->core.attr.aux_watermark = aux_watermark;
> 	}

Thank you! I'll do exactly that.

Regards,
--
Alex

      reply	other threads:[~2021-04-14 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 15:31 [PATCH 0/2] perf, pt: Improve data loss Alexander Shishkin
2021-04-08 15:31 ` [PATCH 1/2] perf: Cap allocation order at aux_watermark Alexander Shishkin
2021-04-08 15:31 ` [PATCH 2/2] perf intel-pt: Use aux_watermark Alexander Shishkin
2021-04-14  6:00   ` Adrian Hunter
2021-04-14 15:50     ` Alexander Shishkin [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=87wnt4g90t.fsf@ashishki-desk.ger.corp.intel.com \
    --to=alexander.shishkin@linux.intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=mingo@redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).