| 1 |
#! /usr/bin/env stap |
| 2 |
|
| 3 |
# minimum number of microseconds to print at |
| 4 |
# override with -G sloth=NNN |
| 5 |
global sloth = 50 |
| 6 |
|
| 7 |
probe vfs.open.return { |
| 8 |
time = gettimeofday_us()-@entry(gettimeofday_us()) |
| 9 |
if (time >= sloth) |
| 10 |
printf("%s[%d] %d %s\n", execname(), tid(), time, pathname) |
| 11 |
} |