lkml.org 
[lkml]   [2019]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 3/4] perf record: enable runtime trace compression
From
Date

On 21.02.2019 12:43, Jiri Olsa wrote:
> On Wed, Feb 20, 2019 at 05:53:17PM +0300, Alexey Budankov wrote:
>>
>> 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.
>
> so current state then.. why do we need new function for that?

This copy() function has the same signature as compress()
so it can be used as the replacement in the _pack() call
instead of memcpy() with different signature.

Thanks,
Alexey

>
> jirka

\
 
 \ /
  Last update: 2019-02-21 12:18    [W:0.211 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site