Browse Source

add script for timing virtio_random driver..

main
John-Mark Gurney 1 year ago
parent
commit
b246cbe180
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      dtrace/virtio_random.d

+ 20
- 0
dtrace/virtio_random.d View File

@@ -0,0 +1,20 @@
dtrace:::BEGIN
{
tracebegin = timestamp;
}

dtrace:::END
{
printf("trace length (ms): %d\n", (timestamp - tracebegin) / 1000 / 1000);
}

::vtrnd_read:entry
{
self->s = timestamp;
}

::vtrnd_read:return /self->s/
{
@count["count"] = count();
@["ns"] = quantize(timestamp - self->s); self->s = 0;
}

Loading…
Cancel
Save