Turns out the problem was that conn_tcp is actually located at conn_sqp: This worked fine for accessing tcp_t object from conn_p : (tcp_t *)((conn_t *)args[0])->conn_sqp;
Regards On Thu, Oct 1, 2009 at 1:15 PM, Iwan Aucamp <aucam...@gmail.com> wrote: > Hi > > I get error: > > dtrace: failed to compile script /dev/stdin: line 204: operands have > incompatible types: "tcp_t *" = "tcp_t *" > > > When trying to run this code: > > 204:fbt:ip:tcp_conn_create_v4:entry > 205:{ > 206: self->tcp_conn_create_v4_lconnp = args[0]; > 207: self->tcp_conn_create_v4_connp = args[1]; > 208: /*self->tcp_conn_create_v4_ltcp = > self->tcp_conn_create_v4_lconnp->conn_tcp; > 209: self->tcp_conn_create_v4_tcp = > self->tcp_conn_create_v4_connp->conn_tcp;*/ > 210: self->tcp_conn_create_v4_ltcp = args[0]->conn_tcp; > 211: self->tcp_conn_create_v4_tcp = args[1]->conn_tcp; > 212: this->ipha = args[2]; > 213: this->tcph = args[3]; > 214: > 215: printf("(%i):(%s:%s:%s:%s):():(tid=%i):(ltcp=%p,tcp=%p) > 216:", > 217: walltimestamp, probeprov, probemod, probefunc, probename, tid, > 218: self->tcp_conn_create_v4_ltcp, self->tcp_conn_create_v4_tcp); > 219: > 220: /* > 221: VERBOSE_PRINT_CONN_T_P( self->tcp_conn_create_v4_lconnp ) > 222: VERBOSE_PRINT_CONN_T_P( self->tcp_conn_create_v4_connp ) > 223: VERBOSE_PRINT_IPHA_T_P( "tcp_conn_create_v4:entry", this->ipha ); > 224: VERBOSE_PRINT_TCPH_T_P( "tcp_conn_create_v4:entry", this->tcph ); > 225: */ > 226:} > > > The thread-locals are declared as: > > 68:self conn_t *tcp_conn_create_v4_connp; > 69:self conn_t *tcp_conn_create_v4_lconnp; > 70:self tcp_t *tcp_conn_create_v4_tcp; > 71:self tcp_t *tcp_conn_create_v4_ltcp; > > > If i dont declare them first then the values assigned to them is 0. > > Running on Solaris 10 update 5. > > > Regards > > > > >
_______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org