Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Aug 2016 05:49:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 211821] dtrace: invalid probe specifier lockstat:::: "/usr/lib/dtrace/tcp.d", line 201: operator / requires operands of arithmetic type
Message-ID:  <bug-211821-8-R4Okhl4pq5@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-211821-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-211821-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211821

--- Comment #3 from Damon Zwolinski <freebsd@g3os.org> ---
I think this is relevant:

1) On my emac, it looks like `hz is a pointer to an int.=20=20

# 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@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 va=
lue
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.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211821-8-R4Okhl4pq5>