// size of array equals to max. number of pending requests global calls[30000]; probe begin { printf("device,sector,time_ns\n"); } probe ioblock.request { if (devname == @1) { calls[$bio] = gettimeofday_ns(); } } probe ioblock.end { if ([$bio] in calls) { time = gettimeofday_ns() - calls[$bio]; delete calls[$bio]; printf("%s,%u,%ld\n", devname, sector, time); } } probe end { foreach ([bio] in calls) { printf("# Lost: %s,%u,%u\n", __bio_devname(bio), @cast(bio, "bio")->bi_sector, calls[bio]); } }