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, 20 Feb 2019 17:53:17 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ingo Molnar <mingo@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 3/4] perf record: enable runtime trace compression


On 12.02.2019 16:08, Jiri Olsa wrote:
> On Mon, Feb 11, 2019 at 11:23:40PM +0300, Alexey Budankov wrote:
> 
> SNIP
> 
>> @@ -774,6 +775,8 @@ static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evli
>>  	struct perf_mmap *maps;
>>  	int trace_fd = rec->data.file.fd;
>>  	off_t off;
>> +	struct perf_session *session = rec->session;
>> +	perf_mmap__compress_fn_t compress_fn;
>>  
>>  	if (!evlist)
>>  		return 0;
>> @@ -785,6 +788,9 @@ static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evli
>>  	if (overwrite && evlist->bkw_mmap_state != BKW_MMAP_DATA_PENDING)
>>  		return 0;
>>  
>> +	compress_fn = (record__comp_enabled(rec) ?
>> +		perf_session__zstd_compress : perf_session__zstd_copy);
>> +
> 
> I don't follow what's the perf_session__zstd_copy function for..?

It bridges AIO without compression case.

Thanks,
Alexey

> 
> for !record__comp_enabled case we seem not to use it
> and calling the current perf_mmap__push interface
> 
> however I dont see point to have this function at all
> 
> jirka
> 
> 
>>  	if (record__aio_enabled(rec))
>>  		off = record__aio_get_pos(trace_fd);
>>  
>> @@ -799,11 +805,21 @@ static int record__mmap_read_evlist(struct record *rec, struct perf_evlist *evli
>>  				map->flush = MMAP_FLUSH_DEFAULT;
>>  			}
>>  			if (!record__aio_enabled(rec)) {
>> -				if (perf_mmap__push(map, rec, record__pushfn) != 0) {
>> -					if (sync)
>> -						map->flush = flush;
>> -					rc = -1;
>> -					goto out;
>> +				if (!record__comp_enabled(rec)) {
>> +					if (perf_mmap__push(map, rec, record__pushfn) != 0) {
>> +						if (sync)
>> +							map->flush = flush;
>> +						rc = -1;
>> +						goto out;
>> +					}
>> +				} else {
>> +					if (perf_mmap__pack(map, rec, record__pushfn,
>> +							compress_fn, session) != 0) {
>> +						if (sync)
>> +							map->flush = flush;
>> +						rc = -1;
>> +						goto out;
>> +					}
> 
> SNIP
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ