[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e4b6b710-f144-2da5-c92a-c78d196d8a02@linux.intel.com>
Date: Wed, 20 Feb 2019 17:44:26 +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:09, Jiri Olsa wrote:
> On Mon, Feb 11, 2019 at 11:25:00PM +0300, Alexey Budankov wrote:
>
> SNIP
>
>> @@ -1932,6 +2059,38 @@ fetch_mmaped_event(struct perf_session *session,
>> return event;
>> }
>>
>> +static int __perf_session__process_decomp_events(struct perf_session *session)
>> +{
>> + s64 skip;
>> + u64 size, file_pos = 0;
>> + union perf_event *event;
>> + struct decomp *decomp = session->decomp_last;
>> +
>> + if (!decomp)
>> + return 0;
>> +
>> + while (decomp->head < decomp->size && !session_done()) {
>
> so how this actualy works? does one PERF_RECORD_COMPRESSED event carry
> complete data to unpack? or you wait to receive more PERF_RECORD_COMPRESSED
> to give you data you can unpack?
One record contains compressed data chunk that is ready for decompression.
Record header is skipped and the rest is fetched to perf_session__zstd_decompress()
also providing the buffer to decompress to, which is of the size encoded in
the file header (comp_mmap_len). After decompression the buffer is iterated
the same way as mmapped event records. Decompressed split event records are
handled. Decompressed buffers are chained into the linked list so the records
memory remains available for later references.
Thanks,
Alexey
>
> jirka
>
Powered by blists - more mailing lists