Hi all,
Here is a fragment dtrace script, I included it in my C program.
static const char *g_prog "sdt:::callout-start"
"{"
" @callouts[((callout_t *)arg0)->c_func] = count();"
"}"
I know
"printa("%40a %10 at d\n", @callout)"
will print "module`symbol-name" and count.
But how to achieve this in C program in libdtrace?
Is there any existing examples?
I''ve read intrstat.c. I know I can get the name of
"stringof(`devnamesp[this->devi->devi_major].dn_name)"
by
{
dtrace_agggdata_t *data;
dtrace_recdesc_t *nrec;
name = data->dtada_data + nrec->dtrd_offset;
}
Is there any docs about libdtrace programming?
Many thanks,
-Aubrey