I want do the following task: Find out a library(lib) depends on which kernel modules,how do i use the dtrace to hack the relationship between the lib and kernel modules. ThaNk you ! -- This message posted from opensolaris.org
Adam Leventhal
2008-Feb-13 23:38 UTC
[dtrace-discuss] Dtrace the lib between the kernel module!
On Wed, Feb 13, 2008 at 03:52:39AM -0800, ZhangFan wrote:> I want do the following task: > Find out a library(lib) depends on which kernel modules,how do i use the dtrace to hack the relationship between the lib and kernel modules.I''m not sure what you mean precisely since libraries in user-land don''t explicitly depend on kernel modules. You could, however, write a script to see what kernel modules have functions which are invoked a result of calls to a library in a given process: ---8<--- pid$target:libzfs.so.1::entry { self->zfs++; } pid$target:libzfs.so.1::return /self->zfs > 0/ { self->zfs--; } fbt:::entry /self->zfs/ { @[probemod] = count(); } ---8<--- dtrace: pid 125874 has exited cmlb 2 scsi 3 sharefs 8 devfs 12 mntfs 12 procfs 16 sata 16 rootnex 26 sd 28 TS 29 dev 34 kcf 50 nv_sata 61 specfs 88 pcplusmp 1518 unix 87078 zfs 98398 genunix 114865 Adam -- Adam Leventhal, Fishworks http://blogs.sun.com/ahl