1 #!/usr/sbin/dtrace -qs
2
3 /*
4 * Copyright (c) 2012, Ben Rockwood (benr@cuddletech.com)
5 */
6
7 /* This should look at the arguments to dmu_zfetch_fetch */
8 /*
9 fbt:zfs:dmu_zfetch_fetch:entry
10 {
11 self->object = args[0]->dn_object;
12 self->blockid = arg1;
13 self->blocks = arg2;
14 self->start = timestamp;
15 printf("Prefetching object %d from dataset %s : %d blocks for blockid %dn",
16 args[0]->dn_objset->os_dsl_dataset->ds_dir->dd_object,
17 args[0]->dn_objset->os_dsl_dataset->ds_dir->dd_myname,
18 arg2, arg1);
19 }
20 */
21
22 fbt:zfs:dbuf_prefetch:entry
23 {
24 printf(" zfetching object %d block %d (%d bytes) from dataset %s\n",
25 args[0]->dn_objset->os_dsl_dataset->ds_dir->dd_object,
26 arg1,
27 args[0]->dn_datablksz,
28 stringof(args[0]->dn_objset->os_dsl_dataset->ds_dir->dd_myname));
29 }