6612059a9f
Change-Id: I9ad826eca3ea97505a660e8d226780de7c7ecbc7
24 lines
503 B
Plaintext
Executable File
24 lines
503 B
Plaintext
Executable File
#!/usr/bin/env stap
|
|
# alias_suffixes.stp
|
|
# Uses alias suffixes to track time intervals for a subset of kernel
|
|
# functions. Based on func_time_stats.stp.
|
|
|
|
global now_count =0;
|
|
global old_count = 0;
|
|
|
|
|
|
# We can apply a suffix to multiple probe points designated by one alias:
|
|
probe miscellany = syscall.{open,close,read,write} { }
|
|
|
|
probe miscellany {
|
|
now_count = now_count +1;
|
|
}
|
|
|
|
probe timer.ms(1000){
|
|
new_count = now_count - old_count;
|
|
printf("%d\n",new_count);
|
|
old_count = now_count;
|
|
|
|
}
|
|
|