lkml.org 
[lkml]   [2018]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 1/3]: perf util: map data buffer for preserving collected data
From
Date
Hi,

On 05.10.2018 9:23, Namhyung Kim wrote:
<SNIP>
> On Wed, Oct 03, 2018 at 07:01:26PM +0300, Alexey Budankov wrote:
<SNIP>
>> +#ifdef HAVE_AIO_SUPPORT
>> + map->nr_cblocks = mp->nr_cblocks;
>> + if (map->nr_cblocks) {
>> + map->data = malloc(perf_mmap__mmap_len(map));
>> + if (!map->data) {
>> + pr_debug2("failed to allocate data buffer, error %d\n",
>> + errno);
>
> I guess the error code is not very useful than the message. But in
> this case it's probably ENOMEM so we can simply omit it.

Possibly like this:
pr_debug2("failed to allocate data buffer, error %d: %s\n",
errno, strerror(errno));
would be more informative.

Thanks,
Alexey

\
 
 \ /
  Last update: 2018-10-05 09:31    [W:0.044 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site