Re: [util-linux] readprofile ignores the last element in /proc/profile

From: mita akinobu
Date: Tue Aug 31 2004 - 12:27:14 EST


Perhaps the prof_buffer[] should have prepared another entry for
exceeded PC samplings.

--- 2.6-mm/kernel/profile.c.orig 2004-09-01 01:46:16.000000000 +0900
+++ 2.6-mm/kernel/profile.c 2004-09-01 01:58:02.549930824 +0900
@@ -44,7 +44,7 @@ void __init profile_init(void)
return;

/* only text is profiled */
- prof_len = (_etext - _stext) >> prof_shift;
+ prof_len = ((_etext - _stext) >> prof_shift) + 1;
prof_buffer = alloc_bootmem(prof_len*sizeof(atomic_t));
}


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/