Hello, I can see that there is an implementation/emulation of ddi_pathname in DTrace, but I''m a bit confused about the capabilities and invocation of this function. I would like to diplay the path to the block device from bdev_strategy and other io:genunix::start probes. If someone is familiar with ddi_pathname, could you please provide an example invocation? Thanks, Michael This message posted from opensolaris.org
On Fri, Sep 16, 2005 at 01:03:57PM -0700, michael wrote:> Hello, > > I can see that there is an implementation/emulation of ddi_pathname in > DTrace, but I''m a bit confused about the capabilities and invocation > of this function. I would like to diplay the path to the block device > from bdev_strategy and other io:genunix::start probes.Uh: # dtrace -qn ''io:::start { printf("%s\n", args[1]->dev_pathname); }'' /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a <nfs> <nfs> <nfs> <nfs> <nfs> ... ^C # is the stable, supported version of this; ddi_pathname() is an implementation detail which requires a dev_info_t pointer and a minor number; since it isn''t documented in the Dynamic Tracing Guide, I''m not sure of its stability. Better to use dev_pathname field of the devinfo_t argument to io:::start. Cheers, - jonathan> If someone is familiar with ddi_pathname, could you please provide an example invocation? > > Thanks, > > Michael > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org-- Jonathan Adams, Solaris Kernel Development
michael wrote:> Hello, > > I can see that there is an implementation/emulation of ddi_pathname in DTrace,I don''t know of such an action/function, nor does the DTrace Guide show anything about it; what makes you think DTrace has such a function?> but I''m a bit confused about the capabilities and invocation of this function. > I would like to diplay the path to the block device from bdev_strategy and other > io:genunix::start probes. > > If someone is familiar with ddi_pathname, could you please provide an example invocation? > > Thanks, > > Michael > This message posted from opensolaris.org > _______________________________________________ > dtrace-discuss mailing list > dtrace-discuss at opensolaris.org
Thanks, that reveals my misunderstanding.> On Fri, Sep 16, 2005 at 01:03:57PM -0700, michael wrote: > > Hello, > > > > I can see that there is an implementation/emulation of ddi_pathname in > > DTrace, but I''m a bit confused about the capabilities and invocation > > of this function. I would like to diplay the path to the block device > > from bdev_strategy and other io:genunix::start probes. > > Uh: > > # dtrace -qn ''io:::start { printf("%s\n", args[1]->dev_pathname); }'' > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > /devices/pci at 1d,700000/scsi at 4/sd at 0,0:a > <nfs> > <nfs> > <nfs> > <nfs> > <nfs> > ... > ^C > # > > is the stable, supported version of this; ddi_pathname() is an > implementation detail which requires a dev_info_t pointer and a minor > number; since it isn''t documented in the Dynamic Tracing Guide, I''m not > sure of its stability. > > Better to use dev_pathname field of the devinfo_t argument to io:::start. > > Cheers, > - jonathan > > > If someone is familiar with ddi_pathname, could you please provide an > > example invocation? > > > > Thanks, > > > > Michael > > This message posted from opensolaris.org > > _______________________________________________ > > dtrace-discuss mailing list > > dtrace-discuss at opensolaris.org-- Conducive Technology Corporation Taking air cargo information to the next level http://www.conducivetech.com http://www.pathfinder-web.com Michael Crozier crozierm at conducivetech.com Voice: 503.445.4233 Fax: 503.274.0939
On Fri, Sep 16, 2005 at 01:28:54PM -0700, Dan Mick wrote:> michael wrote: > >Hello, > > > >I can see that there is an implementation/emulation of ddi_pathname in > >DTrace, > > I don''t know of such an action/function, nor does the DTrace Guide show > anything about it; what makes you think DTrace has such a function?Unfortunately, that Solaris Dynamic Tracing Guide is falling further and further out of date to the point that it''s no longer an exhaustive reference. We''re going to be revving the docs real soon now and will post here when they''re available. Adam -- Adam Leventhal, Solaris Kernel Development http://blogs.sun.com/ahl
Adam Leventhal wrote:> On Fri, Sep 16, 2005 at 01:28:54PM -0700, Dan Mick wrote: > >>michael wrote: >> >>>Hello, >>> >>>I can see that there is an implementation/emulation of ddi_pathname in >>>DTrace, >> >>I don''t know of such an action/function, nor does the DTrace Guide show >>anything about it; what makes you think DTrace has such a function? > > > Unfortunately, that Solaris Dynamic Tracing Guide is falling further and > further out of date to the point that it''s no longer an exhaustive > reference. We''re going to be revving the docs real soon now and will post > here when they''re available. > > Adam >You may need to add a section against the stability parts to list when it became available (if there is not one already), otherwise I''m sure we''ll see folks trying some of the things that are available in Nevada in 10. alan. -- Alan Hargreaves - http://blogs.sun.com/tpenta Kernel/VOSJEC/Performance Engineer Product Technical Support (APAC) Sun Microsystems