[Bug 211821] dtrace: invalid probe specifier lockstat:::: "/usr/lib/dtrace/tcp.d", line 201: operator / requires operands of arithmetic type
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Aug 15 05:49:55 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211821
--- Comment #3 from Damon Zwolinski <freebsd at g3os.org> ---
I think this is relevant:
1) On my emac, it looks like `hz is a pointer to an int.
# dtrace -n 'BEGIN { printf("`hz: %d\n", `hz); exit(0); }'
dtrace: invalid probe specifier BEGIN { printf("%d\n", `hz); exit(0); }:
printf( ) argument #2 is incompatible with conversion #1 prototype:
conversion: %d
prototype: char, short, int, long, or long long
argument: int (*)()
# dtrace -qn 'BEGIN { printf("`hz: %p, (int) `hz: %d\n", `hz, (int) `hz);
exit(0); }'
dtrace: buffer size lowered to 2m
`hz: 3e8, (int) `hz: 1000
2) On my amd64 system (running in virtualbox on a macbook), `hz is an int.
# uname -a
FreeBSD macbook.local 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25
02:10:02 UTC 2016 root at releng1.nyi.freebsd.org:/usr
/obj/usr/src/sys/GENERIC amd64
# dtrace -qn 'BEGIN { printf("`hz: %d\n", `hz); exit(0); }'
`hz: 1000
# dtrace -qn 'BEGIN { printf("&`hz: %p, `hz: %d\n", &`hz, `hz); exit(0); }'
&`hz: ffffffff816a5d4c, `hz: 1000
3) I would bet they should be the same.
Assuming sys/sys/kernel.h is the right file, hz is defined as an int there so
maybe it's not being brought into dtrace correctly on powerpc and/or on 32 bit
systems. Because I used trace(`hz), which tries to do the right thing (use a
cast if needed) above, it seemed like it worked. I'm also surprised the value
of hz is 1000 on my amd64 system. I thought it would be higher; I double
checked to make sure I didn't copy the wrong text. I guess it doesn't mean
what I thought it meant.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list