lkml.org 
[lkml]   [2020]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 2/2] mm: mmap: add trace point of vm_unmapped_area
From
Date


On 2020년 03월 30일 18:56, Vlastimil Babka wrote:
> On 3/29/20 6:14 PM, Matthew Wilcox wrote:
>> On Fri, Mar 20, 2020 at 02:58:23PM +0900, Jaewon Kim wrote:
>>> + TP_printk("addr=%lx err=%ld total_vm=0x%lx flags=0x%lx len=0x%lx lo=0x%lx hi=0x%lx mask=0x%lx ofs=0x%lx\n",
>>> + IS_ERR_VALUE(__entry->addr) ? 0 : __entry->addr,
>>> + IS_ERR_VALUE(__entry->addr) ? __entry->addr : 0,
>> I didn't see the IS_ERR_VALUE problem that Vlastimil mentioned get resolved?
> Steven is fixing it in trace-cmd:
> https://lore.kernel.org/r/20200324200956.821799393@goodmis.org
Good news for me.
Thank you
>
>> I might suggest ...
>>
>> +++ b/include/linux/err.h
>> @@ -19,7 +19,8 @@
>>
>> #ifndef __ASSEMBLY__
>>
>> -#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
>> +#define __IS_ERR_VALUE(x) ((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
>> +#define IS_ERR_VALUE(x) unlikely(__IS_ERR_VALUE(x))
> So this shouldn't be needed, as we are adding a new tracepoint, not "breaking"
> an existing one?
>
>> static inline void * __must_check ERR_PTR(long error)
>> {
>>
>> and then you can use __IS_ERR_VALUE() which removes the unlikely() problem.
>>
>
>

\
 
 \ /
  Last update: 2020-03-30 12:01    [W:0.054 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site