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]
Message-ID: <f2b04e7b-6014-1799-3360-85ade10252c4@linux.intel.com>
Date:   Wed, 20 Feb 2019 18:19:03 +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 4/4] perf report: support record trace file
 decompression


On 12.02.2019 16:08, Jiri Olsa wrote:
> On Mon, Feb 11, 2019 at 11:25:00PM +0300, Alexey Budankov wrote:
> 
> SNIP
> 
>>  size_t perf_session__zstd_copy(void *to __maybe_unused,
>> @@ -533,6 +646,8 @@ void perf_tool__fill_defaults(struct perf_tool *tool)
>>  		tool->time_conv = process_event_op2_stub;
>>  	if (tool->feature == NULL)
>>  		tool->feature = process_event_op2_stub;
>> +	if (tool->compressed == NULL)
>> +		tool->compressed = perf_session__process_compressed_event;
>>  }
>>  
>>  static void swap_sample_id_all(union perf_event *event, void *data)
>> @@ -1469,7 +1584,8 @@ static s64 perf_session__process_user_event(struct perf_session *session,
>>  	int fd = perf_data__fd(session->data);
>>  	int err;
>>  
>> -	dump_event(session->evlist, event, file_offset, &sample);
>> +	if (event->header.type != PERF_RECORD_COMPRESSED)
>> +		dump_event(session->evlist, event, file_offset, &sample);
>>  
>>  	/* These events are processed right away */
>>  	switch (event->header.type) {
>> @@ -1522,6 +1638,11 @@ static s64 perf_session__process_user_event(struct perf_session *session,
>>  		return tool->time_conv(session, event);
>>  	case PERF_RECORD_HEADER_FEATURE:
>>  		return tool->feature(session, event);
>> +	case PERF_RECORD_COMPRESSED:
>> +		err = tool->compressed(session, event, file_offset);
>> +		if (err)
>> +			dump_event(session->evlist, event, file_offset, &sample);
> 
> I'm not sure about having compressed callback at all, but maybe
> it could be usefull for inject, to get the compressed data..?

This code implements handling thru callbacks, for some reason,
so the new part is designed the same way. Inject flow probably 
will benefit from this approach. It is required to be tested 
additionally.

Thanks,
Alexey


> 
> I assume inject is working now and it will get you the uncompressed
> perf.data?
> 
> jirka
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ