Re: [PATCH v9 10/12] perf report: implement record trace decompression

From: Alexey Budankov
Date: Mon Mar 18 2019 - 08:06:32 EST


On 18.03.2019 14:46, Jiri Olsa wrote:
> On Sat, Mar 16, 2019 at 05:17:06PM +0300, Alexey Budankov wrote:
>
> SNIP
>
>> static int perf_session__deliver_event(struct perf_session *session,
>> union perf_event *event,
>> struct perf_tool *tool,
>> @@ -198,12 +259,23 @@ static void perf_session__delete_threads(struct perf_session *session)
>>
>> void perf_session__delete(struct perf_session *session)
>> {
>> + struct decomp *next, *decomp;
>> + size_t decomp_len;
>> if (session == NULL)
>> return;
>> auxtrace__free(session);
>> auxtrace_index__free(&session->auxtrace_index);
>> perf_session__destroy_kernel_maps(session);
>> perf_session__delete_threads(session);
>> + next = session->decomp;
>> + decomp_len = session->header.env.comp_mmap_len;
>> + do {
>> + decomp = next;
>> + if (decomp == NULL)
>> + break;
>> + next = decomp->next;
>> + munmap(decomp, decomp_len + sizeof(struct decomp));
>> + } while (1);
>
> please put this to separate function

in v10.

~Alexey

>
> thanks,
> jirka
>