Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Mar 2022 16:47:04 -0700
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        freebsd-current@freebsd.org
Subject:   DTrace Brokenness
Message-ID:  <20220318234704.6C14AED@slippy.cwsent.com>

next in thread | raw e-mail | index | archive | help
It's been a while (~ 4-6 months) since I've last used dtrace. Needing to 
use it again today scripts that worked before fail to.

A first example:

cwfw# cat dt10.d
#!/usr/sbin/dtrace -s

fbt::ipf_check:entry {
	parintf("%x\n", (void) arg[1]);
}

cwfw# 

Results in this error:

cwfw# ./dt10.d 
dtrace: failed to compile script ./dt10.d: "/usr/lib/dtrace/psinfo.d", line 
1: cannot translate from "struct thread *" to "lwpsinfo_t *"
cwfw# 

Another example,

slippy# cat dtrace.d 
#!/usr/sbin/dtrace -s

fbt::uma_reclaim:entry {
	printf("in uma_reclaim\n");
}
slippy# 

Results in the same error:

slippy# ./dtrace.d 
dtrace: failed to compile script ./dtrace.d: "/usr/lib/dtrace/psinfo.d", 
line 1: cannot translate from "struct thread *" to "lwpsinfo_t *"
slippy# 


A variation of the second example,

slippy# cat dtrace.sh 
#!/bin/sh -
dtrace -n 'fbt::uma_reclaim:entry { printf("in uma_reclaim\n"); }'
slippy# 

Results in two errors, the first being that the -n option results in an 
invalid probe specified and the second being the struct thread * error.

slippy# ./dtrace.sh 
dtrace: invalid probe specifier fbt::uma_reclaim:entry { printf("in 
uma_reclaim\n"); }: "/usr/lib/dtrace/psinfo.d", line 1: cannot translate 
from "struct thread *" to "lwpsinfo_t *"
slippy# 

I'm not sure if this is related to 2d5d2a986ce or something else.


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

	The need of the many outweighs the greed of the few.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20220318234704.6C14AED>