dtrace's walltimestamp built-in variable should be unsigned

Originator:i.am.rodionovd
Number:rdar://21676036 Date Originated:05-Jul-2015
Status:Open Resolved:
Product:Developer Tools Product Version:OS X 10.10, Xcode 6.4
Classification: Reproducible:Always
 
Summary:
From Oracle DTrace User Guide, chapter "DTrace Built-in Variables" [0]:

> uint64_t walltimestamp
> The current number of nanoseconds since 00:00 Universal Coordinated Time, January 1, 1970

But it appears that `walltimestamp` is int64_t instead of uint64_t in Apple implementation of dtrace.

[0]:http://docs.oracle.com/cd/E18752_01/html/819-5488/gcfpz.html

Steps to Reproduce:
Try to, for example, printf `walltimestamp` with %llu format specifier:

$ sudo dtrace -n "dtrace:::BEGIN { printf(\"%llu\n\", walltimestamp);}"

You'll get the following error:

dtrace: invalid probe specifier dtrace:::BEGIN { printf("%llu\n", walltimestamp);}: printf( ) argument #2 is incompatible with conversion #1 prototype:
	conversion: %llu
	 prototype: unsigned long long
	  argument: int64_t

Expected Results:
There's no error since `walltimestamp` should be uint64_t (i.e. unsigned 64 bit integer)

Actual Results:
walltimestamp's type is int64_t, i.e. signed 64-bit integer

Version:
OS X 10.10.4, Xcode 6.4

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!