On Wed, 27 Feb 2008, J Duff wrote:

> Why does the typed argument (pointer to arc_buf_hdr_t) fail on the return 
> probe?
>
> I wrote the following probes for the buf_hash_insert method:
>
>    static arc_buf_hdr_t *
>    buf_hash_insert(arc_buf_hdr_t *buf, kmutex_t **lockp);
>
>    fbt:zfs:buf_hash_insert:entry
>    /args[0]->b_datacnt > 1/
>    {
>       printf("b_datacnt=%d", args[0]->b_datacnt);
>    }
>
>    fbt:zfs:buf_hash_insert:return
>    /args[0]->b_datacnt > 1/
>    {
>    }

http://www.solarisinternals.com/wiki/index.php/DTrace_Topics_Cheatsheets_Checklists

For function entry probes, the arguments array will provide access to all 
function input arguments. For function return probes, the arguments array 
provides the return offset in args[0], and the return value of the 
function in args[1].

You don't really want to be using args[0] here do you?


-- Dave
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to