John Baboval <email@example.com> writes:
> The attached patch makes the following enhancements to the kernel profiler:
> - Dynamic allocation of the profile buffer.
> This allows for profiling on a production system without the continuous
> performance hit that the profiler causes. You can turn it on, get you
> data, and then turn it off again....
> I submitted this as a patch to 2.3.99pre8, but nobody commented, and it
> didn't get applied. I'm resubmitting because the further enhancements
I actually commented, but it bounced because your mail seemed to have
an invalid From/Reply address.
> Please review and test/apply this patch.
+ size = prof_len * sizeof(unsigned int) + PAGE_SIZE-1;
+ /* Use kmalloc if size < 512 * PAGE_SIZE, if it's bigger use vmalloc */
+ if(size < 512 * PAGE_SIZE)
+ if(!(prof_buffer = kmalloc(size, GFP_KERNEL)))
kmalloc cannot allocate >128K, and that is very unreliable; better use vmalloc
I also think the cleanup function does not check if all resources were
really allocated (which can be triggered with sysctl)
I also have my doubts that the per process name is that useful, because
the linux kernel does a lot of things asynchronously outside process context.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:15 EST