[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1fc617e-5280-14a5-aa32-d7ef9e79415e@linux.intel.com>
Date: Wed, 20 Feb 2019 18:11:25 +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 3/4] perf record: enable runtime trace compression
On 12.02.2019 16:09, Jiri Olsa wrote:
> On Mon, Feb 11, 2019 at 11:23:40PM +0300, Alexey Budankov wrote:
>
> SNIP
>
>> diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c
>> index 239e9a13c2b7..980784b77fe2 100644
>> --- a/tools/perf/util/mmap.c
>> +++ b/tools/perf/util/mmap.c
>> @@ -156,6 +156,86 @@ void __weak auxtrace_mmap_params__set_idx(struct auxtrace_mmap_params *mp __mayb
>> {
>> }
>>
>> +static ssize_t perf_mmap__capture(struct perf_mmap *md, int idx,
>> + perf_mmap__compress_fn_t compress, void *where)
>> +{
>> + u64 head = perf_mmap__read_head(md);
>> + unsigned char *data = md->base + page_size;
>> + unsigned long size, size0 = 0;
>> + void *buf;
>> + int rc = 0;
>> + size_t mmap_len = perf_mmap__mmap_len(md);
>
> again, this function seems like duplicate of perf_mmap__push,
> can't you just overload the push callback?
Answered related question in other mail.
Overloading could be an option.
Thanks,
Alexey
>
> thanks,
> jirka
>
Powered by blists - more mailing lists