After playing around with translators and getting args[0]->??? to work in my 
test provider I have a question that is nagging me.  If conninfo_t is to be a 
common typedef to be used by any provider shouldn't it be contained in a common 
.d file instead of something like iscsi.d or mpi.d?  

>From experiementation it doesn't look like both files can have the 
>typedef/struct exist otherwise you get and error similar to the following when 
>running a dtrace script:

dtrace -c main -n 'mpi__test$target::: { printf("%d",args[0]->bar);}'
dtrace: invalid probe specifier mpi__test$target::: { 
printf("%d",args[0]->bar);}: "/usr/lib/dtrace/bar.d", line 1: type redeclared: 
struct outfoo

Or is the idea that the first provider that needs a common typedef gets to 
define it?  I don't think this completely works because some providers are 
conditionally installed (like the mpi provider).

There also seems to be even a more greater name clashing situation that I 
wonder how to handle.  That is how do I assure myself that the typedefs private 
to mpi.d like the ones used for the mpi translators will not clash with someone 
elses?  Is there a naming convention or registry I should be adhering too?

--td


--
This message posted from opensolaris.org
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to