lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87wnt4g90t.fsf@ashishki-desk.ger.corp.intel.com>
Date:   Wed, 14 Apr 2021 18:50:42 +0300
From:   Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To:     Adrian Hunter <adrian.hunter@...el.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        Jiri Olsa <jolsa@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        alexander.shishkin@...ux.intel.com
Subject: Re: [PATCH 2/2] perf intel-pt: Use aux_watermark

Adrian Hunter <adrian.hunter@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ