lkml.org 
[lkml]   [2018]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4 v6] lib: debugobjects: export max loops counter
On Tue, 6 Feb 2018, Yang Shi wrote:
> @@ -720,7 +721,7 @@ static void __debug_check_no_obj_freed(const void *address, unsigned long size)
> enum debug_obj_state state;
> struct debug_bucket *db;
> struct debug_obj *obj;
> - int cnt;
> + int cnt, max_loops = 0;
>
> saddr = (unsigned long) address;
> eaddr = saddr + size;
> @@ -765,7 +766,12 @@ static void __debug_check_no_obj_freed(const void *address, unsigned long size)
>
> if (cnt > debug_objects_maxchain)
> debug_objects_maxchain = cnt;
> +
> + max_loops += cnt;

I don't think max_loops is the proper name for this. It's not counting
loops. It's counting the aggregate number of objects inspected for a single
invocation of __debug_check_no_obj_freed() while max_chain records the
chain length in a hash bucket corresponding to a single memory chunk. I'll
fix that up myself. No need to resend.

Thanks,

tglx

\
 
 \ /
  Last update: 2018-02-12 16:05    [W:0.112 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site