From: Brian T. <tb...@us...> - 2007-09-19 18:53:18
|
Hi, When opcontrol invokes oprofiled, it specifies a range of valid kernel addresses. By default, the range is bounded by the start and end of vmlinux's ".text" section. The problem with this is that some kernels (e.g. RHEL 5 x86_64) have multiple sections containing text; for those kernels, samples are dropped for all routines except those in the .text section, resulting in a misleading profile. The magnitude of this problem is significant; the RHEL 5 x86_64 kernel has over 10,000 sections containing text. The implication of this is that oprofile will drop samples for over 10,000 routines in those kernels. The attached patch modifies opcontrol, to make the end of the kernel range the address of "_etext". With a few exceptions (e.g. kernel initialization code), this results in all kernel code being included in the kernel range. Before this patch, 30% of the kernel samples are thrown away for my I/O benchmark. After this patch, no kernel samples are thrown away. Brian Twichell |