Tuesday 17 August 2010

dtrace: d_path() - a wonderful function

Given a "file" structure, the d_path() is a cool function which
gives you the full path of the underlying file. This is what the
/proc/pid/fd code uses to give you the mapping of file descriptors
to real filenames.

And now, dtrace for linux, in the io:::start provider can reflect
the Sun standard structures for buf_t, fileinfo_t etc.

I need to polish off the code, but its looking good - we can see the
full filename of the entity being manipulated and proves the io:::
provider will be most useful for not only writing D scripts, but porting
existing Dtrace utilities (like iosnoop.d)


Post created by CRiSP v10.0.2a-b5882


No comments:

Post a Comment