|
From: Jim C. <jim...@gm...> - 2006-10-12 18:54:45
|
Over on lm-sensors, Im advocating the use of 2D-callbacks (sysfs), which allows the consolidation of multiple (1D) callbacks, thus reducing text-size. Ive been asked to 'prove' its a win. Setting aside the idea that this is not a high-traffic interface (voltages & temps for system health monitoring), how can I go about it ? Im aware that valgrind has been used on a UML kernel, but the valgrind ML threads arent particularly helpful (Ive never used UML in any way, so its hard to tell). Running a Xen-guest also occurred to me, but 'Xen' has zero hits on gmane.comp.debugging.valgrind. Are UML or Xen my best bet for getting some cachegrind data on a kernel driver ? or is there another way I havent thought of ? Oprofile has occurred to me, but Im a newbie there too. While it might show some total time spent in the callbacks, it seems (apriori) unlikely to just tell me the cache usage of a handful of routines (it does have filtering, but I think thats by application, a couple functions in a kernel driver is a very different problem). any hints welcome tia |
|
From: Nicholas N. <nj...@cs...> - 2006-10-12 22:46:35
|
On Thu, 12 Oct 2006, Jim Cromie wrote: > Are UML or Xen my best bet for getting some cachegrind data on a kernel > driver ? > or is there another way I havent thought of ? I'm not aware of any easy solution. I don't think anyone has ever really got UML and Valgrind working together properly. I've heard that some kernel developers test with Valgrind by pulling out large chunks of kernel code into user-space test harnesses. Nick |
|
From: Josef W. <Jos...@gm...> - 2006-10-13 13:16:31
|
On Friday 13 October 2006 00:46, Nicholas Nethercote wrote: > On Thu, 12 Oct 2006, Jim Cromie wrote: > > > Are UML or Xen my best bet for getting some cachegrind data on a kernel > > driver ? > > or is there another way I havent thought of ? > > I'm not aware of any easy solution. I don't think anyone has ever really > got UML and Valgrind working together properly. I've heard that some kernel > developers test with Valgrind by pulling out large chunks of kernel code > into user-space test harnesses. Seems to be the best route. Xen is out of question, as guests directly run on the Xen hypervisor, and their is no way to control/observe such a guest from a user process inside of another guest (even from domain 0). Using VMWare could be more promising, as this is a hosted VM, ie. a real linux user level process. However, VMWare obviously uses similar code rewriting/JIT techniques as Valgrind itself (ie. similar complex as running Valgrind self-hosting); additional, VMWare is a binary blob. And to get useful profiling results out of it, there would need to be some debug info redirection to make VMWares JITter transparently - so probably also a no-go. Josef PS: VG client requests to provide debug info redirection for post processing would be interesting: Think about a Java VM, and cachegrind directly could annotate Java code. |
|
From: Bryan O'S. <bo...@se...> - 2006-10-13 18:56:07
|
Josef Weidendorfer quoted Nick: >> I'm not aware of any easy solution. I don't think anyone has ever really >> got UML and Valgrind working together properly. I've heard that some kernel >> developers test with Valgrind by pulling out large chunks of kernel code >> into user-space test harnesses. This is doable, but quite painful in my experience. > Using VMWare could be more promising, as this is a hosted VM, ie. a > real linux user level process. Try Qemu instead, since it can be quite a bit more easily modified. <b |