Re: [PATCH v3 2/4] perf record: bind the AIO user space buffers to nodes

From: Alexey Budankov
Date: Wed Jan 09 2019 - 11:58:22 EST


Hi,
On 09.01.2019 18:58, Jiri Olsa wrote:
> On Wed, Jan 09, 2019 at 12:37:17PM +0300, Alexey Budankov wrote:
>>
>> Allocate and bind AIO user space buffers to the memory nodes
>> that mmap kernel buffers are bound to.
<SNIP>
>>
>> Signed-off-by: Alexey Budankov <alexey.budankov@xxxxxxxxxxxxxxx>
<SNIP>
>> +static void perf_mmap__aio_bind(struct perf_mmap *map, int index, int cpu, int affinity)
>> +{
>> + void *data;
>> + size_t mmap_len;
>> + unsigned long node_mask;
>> +
>> + if (affinity != PERF_AFFINITY_SYS && cpu__max_node() > 1) {
>> + data = map->aio.data[index];
>> + mmap_len = perf_mmap__mmap_len(map);
>> + node_mask = 1UL << cpu__get_node(cpu);
>> + if (mbind(data, mmap_len, MPOL_BIND, &node_mask, 1, 0)) {
>> + pr_warn("failed to bind [%p-%p] to node %d\n",
>> + data, data + mmap_len, cpu__get_node(cpu));
>> + }
>
> getting compilation fail in here:
>
> CC util/mmap.o
> util/mmap.c: In function âperf_mmap__aio_bindâ:
> util/mmap.c:193:4: error: implicit declaration of function âpr_warnâ; did you mean âpr_warningâ? [-Werror=implicit-function-declaration]
> pr_warn("failed to bind [%p-%p] to node %d\n",
> ^~~~~~~
> pr_warning
> util/mmap.c:193:4: error: nested extern declaration of âpr_warnâ [-Werror=nested-externs]
> cc1: all warnings being treated as errors

Yes, it should be pr_warning().
This hunk missed when I was preparing the patches - sorry.
It will be included into v4.

Thanks!
Alexey

>
>
> jirka
>