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:   Thu, 7 Mar 2019 11:28:17 +0300
From:   Alexey Budankov <alexey.budankov@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v5 09/10] perf inject: enable COMPRESSED records
 decompression


On 05.03.2019 15:26, Jiri Olsa wrote:
> On Fri, Mar 01, 2019 at 07:07:49PM +0300, Alexey Budankov wrote:
>>
>> Initialized decompression API so COMPRESSED record would be
>> decompressed into the resulting output data file.
>>
>> Signed-off-by: Alexey Budankov <alexey.budankov@...ux.intel.com>
>> ---
>>  tools/perf/builtin-inject.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
>> index 24086b7f1b14..8e0e06d3edfc 100644
>> --- a/tools/perf/builtin-inject.c
>> +++ b/tools/perf/builtin-inject.c
>> @@ -837,6 +837,9 @@ int cmd_inject(int argc, const char **argv)
>>  	if (inject.session == NULL)
>>  		return -1;
>>  
>> +	if (zstd_init(&(inject.session->zstd_data), 0) < 0)
>> +		pr_warning("Decompression initialization failed.\n");
> 
> hum, I wonder we should put this inside perf_session__new/perf_session__delete

comp_level parameter passing would extend the signature of __new()

struct perf_session *perf_session__new(struct perf_data *data,
				       bool repipe, struct perf_tool *tool,
				       int comp_level)

~Alexey

> 
> jirka
> 
>> +
>>  	if (inject.build_ids) {
>>  		/*
>>  		 * to make sure the mmap records are ordered correctly
>> @@ -867,6 +870,7 @@ int cmd_inject(int argc, const char **argv)
>>  	ret = __cmd_inject(&inject);
>>  
>>  out_delete:
>> +	zstd_fini(&(inject.session->zstd_data));
>>  	perf_session__delete(inject.session);
>>  	return ret;
>>  }
>> -- 
>> 2.20.1
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ