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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 May 2021 18:17:03 +0300
From:   James Clark <james.clark@....com>
To:     Leo Yan <leo.yan@...aro.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        John Garry <john.garry@...wei.com>,
        Will Deacon <will@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-arm-kernel@...ts.infradead.org,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        Al Grant <Al.Grant@....com>
Subject: Re: [PATCH v1 2/3] perf arm-spe: Correct sample flags for dummy event



On 12/05/2021 17:39, James Clark wrote:
> 
> 
> On 29/04/2021 18:00, Leo Yan wrote:
>> The dummy event is mainly used for mmap, the TIME sample is only needed
[...]
>> -	tracking_evsel->core.attr.freq = 0;
>> -	tracking_evsel->core.attr.sample_period = 1;
>> -	evsel__set_sample_bit(tracking_evsel, TIME);
>> -	evsel__set_sample_bit(tracking_evsel, CPU);
>> -	evsel__reset_sample_bit(tracking_evsel, BRANCH_STACK);
>> +	if (opts->full_auxtrace) {
>> +		struct evsel *tracking_evsel;
> 
> Hi Leo,
> 
> I know the "if (opts->full_auxtrace)" pattern is copied from other auxtrace
> files, but I don't think it does anything because there is this at the top
> of the function:
> 
>    	if (!opts->full_auxtrace)
> 		return 0;
> 
> The same applies for other usages of "full_auxtrace" in the same function.
> They are all always true. I'm also not sure if it's ever defined what
> full_auxtrace means.
> 
> James

Apart from this issue above, I've tested the full patchset with various combinations
of --per-thread, -a and --timestamp and don't see any issues like missing command names
or decode issues. (Apart from -a where Command is reported as '-1', but this issue is
present before and after this patchset so is unrelated.)

I think it makes sense to unify the behaviour to make it more like Coresight and others
so this is a good change.

Reviewed-by: James Clark <james.clark@....com>
Tested-by: James Clark <james.clark@....com>

> 
>> +
>> +		err = parse_events(evlist, "dummy:u", NULL);
>> +		if (err)
>> +			return err;
>> +
>> +		tracking_evsel = evlist__last(evlist);
>> +		evlist__set_tracking_event(evlist, tracking_evsel);
>> +
>> +		tracking_evsel->core.attr.freq = 0;
>> +		tracking_evsel->core.attr.sample_period = 1;
>> +
>> +		/* In per-cpu case, always need the time of mmap events etc */
>> +		if (!perf_cpu_map__empty(cpus))
>> +			evsel__set_sample_bit(tracking_evsel, TIME);
>> +	}
>>  
>>  	return 0;
>>  }
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ