Ok, I've looked at the iSCSI_provider.d and except for the translator code I 
don't see anything obvious.  In order to simplify things I've created a small 
program that exhibits the same issue.
The compilation and failing dtrace execution follows:

% cc -c debug.c
% dtrace -G -32 -s usdt.d debug.o
% cc -o main main.c usdt.o debug.o
% dtrace -c main -n 'mpi__test$target::: { printf("%d",args[0]->bar)}'
dtrace: invalid probe specifier mpi__test$target::: { 
printf("%d",args[0]->bar)}: in action list: failed to resolve translated type 
for args[0]

The code is as follows:
-----main.c------
void main() {
   dprintf();
}

-----debug.c-----
#include <sys/sdt.h>
void
dprintf()
{
  struct foo {
        int bar;
        int baz;
  } me;

  me.bar = 1;
  me.baz = 2;

  DTRACE_PROBE1(mpi__test, DEBUG_MESSAGE, &me);
}
-----usdt.d-----
typedef struct foo {
    int bar;
    int baz;
} foo_t;

provider mpi__test {
        probe DEBUG_MESSAGE(foo_t *);
};

thanks,

--td
> You can certainly access typed arguments from USDT
> probes. Can you send
> the full script? If you're using the conninfo_t you
> may want to take a look
> at what I did in the iSCSI target provider and some
> scripts that Brendan
> Gregg wrote that use the provider.
> 
> Adam
> 
> On Wed, Sep 05, 2007 at 12:16:50PM -0700, Terry
> Dontje wrote:
> > Is trying to access a typed argument from a USDT
> probe allowed?
> > I have a script that does "printf("%s\n",
> copyinstr(args[0]->ci_protocol);" and I get the error
> message of "dtrace: failed to compile script
> mpiconn.d: line 12: failed to resolve translated type
> for args[0]"?
> > 
> > --td
> > 
> > 
> > --
> > This message posted from opensolaris.org
> > _______________________________________________
> > dtrace-discuss mailing list
> > [email protected]
> 
> -- 
> Adam Leventhal, FishWorks
>                        http://blogs.sun.com/ahl
> ________________________
> dtrace-discuss mailing list
> [email protected]


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

Reply via email to