Re: [PATCH] Better document profile=

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>
Date: Friday, October 26, 2007 - 1:03 am

On 10/25/07, Andrew Morton <akpm@linux-foundation.org> wrote:

Sorry, I had sent an updated email a couple minutes after this one
without the wrapping.



I thought we just went through this?

extern char _text[], _stext[], _etext[];
[...]
prof_len = (_etext - _stext) >> prof_shift;
prof_buffer = alloc_bootmem(prof_len*sizeof(atomic_t));

1MB kernel, 32 bit, prof_shift = 2, makes for 262144 profiling slots,
a granularity of 4 bytes
1MB kernel, 64 bit, prof_shift = 2, makes for 262144 profiling slots,
a granularity of 4 bytes

The only difference between the two being the sizeof(atomic_t), so
that a 32 bit kernel would allocate a 1MB buffer, and a 64 bit kernel
would allocate a 2MB buffer. I'm having nightmares about megawords
again...


now you are confusing me even more... by 8<<2 and 4<<3 do you mean 32
bytes? Linus says the following in 0.98:

# uncomment this if you want kernel profiling: the profile_shift is the
# granularity of the profiling (5 = 32-byte granularity)
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Better document profile=, Russ Dill, (Wed Oct 17, 1:16 am)
Re: [PATCH] Better document profile=, Andrew Morton, (Thu Oct 25, 7:37 pm)
Re: [PATCH] Better document profile=, Russ Dill, (Fri Oct 26, 1:03 am)
Re: [PATCH] Better document profile=, Andrew Morton, (Fri Oct 26, 1:21 am)