Hi,
On 15.06.2011 21:24, Nuno Cardoso wrote:
> Hi list,
> Can I use Valgrind to make some memory leaks tests and performance
> tests on device drivers?
I guess, you are talking about the device drivers implemented as Linux kernel 
modules, right?

If so, the answer is "you can - to some extent". Valgrind-based tools operate 
on user-space processes. You can try User-Mode Linux project 
(http://en.wikipedia.org/wiki/User-mode_Linux) to run a kernel as a whole in a 
user-space process. That process can probably be analyzed with Valgrind-based 
tools. Haven't tried this myself though.

Apart from that, there are other tools that may be more suitable for you and 
easier to use depending on what you try to accomplish. They are more oriented 
towards kernel-mode software.

SystemTap (http://sourceware.org/systemtap/) and profiling facilities included 
into the kernel can help you obtain performance-related information. Ftrace 
and LTTng might also be helpful here.

To detect memory leaks in a kernel module, you can try Kmemleak (included into 
the kernel) or KEDR (http://kedr.berlios.de/) - both are quite easy to use.

You could also try Kmemcheck tool, if you need to detect incorrect memory 
accesses. Despite its name, Kmemcheck is based on a different technology then 
Valgrind's Memcheck. The overhead of Kmemcheck is rather high but it is a 
useful tool nonetheless.

Hope this helps.

Regards,
Eugene


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to