Re: DTrace (or other monitor) access to LBA of a block device
On Sun, Dec 5, 2010 at 19:02, Artem Belevich <fbsdlist@src.cx> wrote:
>> GEOM sounds like a good candidate for probing of that kind.
>>
>> sudo dtrace -n 'fbt:kernel:g_io_deliver:entry { printf("%s %d %d
>> %d\n",stringof(args[0]->bio_from->geom->name), args[0]->bio_cmd,
>> args[0]->bio_offset, args[0]->bio_length); }'
>
> By the way, in order for this to work one would need r207057 applied
> to -8. Any chance that could be MFC'ed?
In the meantime, a workaround is an explicit cast. Using
((struct bio *)arg0)
instead of
args[0]
works.
Or wrapped in a tiny d script:
#!/usr/sbin/dtrace -s
#pragma D option quiet
fbt:kernel:g_io_deliver:entry
{
bio = (struct bio *)arg0;
printf("%s %d %d %d\n",stringof(bio->bio_from->geom->name),
bio->bio_cmd, bio->bio_offset, bio->bio_length);
}
Riggs
_______________________________________________
freebsd-stable@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org"
討論串 (同標題文章)
完整討論串 (本文為第 5 之 10 篇):