I'm trying to printf
some Solaris
kernel level information with the type of uint64_t
(e.g. timestamp
) using a DTrace
script. How I can print uint64_t
safely and precisely in my DTrace
code.
I know the proper way of printing uint64_t
in C is:
#define __STDC_FORMAT_MACROS
#include <sys/inttypes.h> //sys: Kernel level
uint64_t timestamp;
printf("%"PRIu64"\n", timestamp);
What's an equivalent in DTrace
D? (%d
and `%llu are imprecise and dangerous).
NOTE Not to be confused with other programming languages named "D" (a C++-like programming language developed by Walter Bright).