On 10/27/15, Thomas Klausner <[email protected]> wrote: > On Tue, Oct 27, 2015 at 12:14:15PM -0700, bch wrote: >> > "/usr/lib/dtrace/psinfo.d", line 46: syntax error near "u_int" >> >> I'm trying to build a userland app w/ dtrace support, and a dtrace >> compilation is failing w/ the above error... Is anybody having success >> instrumenting userland code w/ dtrace ? I saw this[0], and will be >> looking for representative code. In the meantime, I've diff'd our >> /usr/lib/dtrace/psinfo.d w/ FreeBSD head and see no immediate fixes >> for ourselves (note: I'm not a dtrace expert). >> >> Does anybody have insight or comments on this ? > > I have built a kernel with MKCTF but still cannot build mysql55-client > (which was throwing this error). > > The error changed to > > dtrace: failed to compile script > /disk/3/archive/obj/databases/mysql55-client/work/mysql-5.5.46/include/probes_mysql.d: > "/usr/lib/dtrace/psinfo.d", line 46: failed to copy type of 'pr_arglen': > Type information is in parent and unavailable > > When I change the type from u_int to size_t in psinfo.d, I see > > dtrace: failed to compile script > /disk/3/archive/obj/databases/mysql55-client/work/mysql-5.5.46/include/probes_mysql.d: > "/usr/lib/dtrace/psinfo.d", line 63: cannot find type: struct proc*: Type > information is in parent and unavailable > > instead. Line 63 is the "};" that ends this block: > > #pragma D binding "1.0" translator > translator psinfo_t < struct proc *T > { > pr_nlwp = T->p_nlwps; > pr_pid = T->p_pid; > pr_ppid = (T->p_pptr == 0) ? 0 : T->p_pptr->p_pid; > pr_pgid = (T->p_pgrp->pg_session->s_leader == 0) ? 0 : > T->p_pgrp->pg_session->s_leader->p_pid; > pr_sid = (T->p_pgrp == 0) ? 0 : ((T->p_pgrp->pg_session == 0) ? 0 : > T->p_pgrp->pg_session->s_sid); > pr_uid = T->p_cred->cr_uid; > pr_euid = T->p_cred->cr_euid; > pr_gid = T->p_cred->cr_gid; > pr_egid = T->p_cred->cr_egid; > pr_addr = 0; > pr_psargs = stringof(T->p_comm); > pr_arglen = strlen(T->p_comm); > }; > > Christos cannot reproduce this problem, and I have no idea how to > continue here. Any suggestions?
Did you ever get this solved, Thomas? I'm running into same thing currently (up-to-date nbsd -current as of this message). > Thomas >
