#!/usr/bin/env stap global nfscalls global write_time probe begin { printf("Collecting top NFS idmap procs...\n") } probe module("nfs").function("*@fs/nfs/idmap.c") { nfscalls[probefunc()] = gettimeofday_us() } probe module("nfs").function("*@fs/nfs/idmap.c").return { write_time = nfscalls[probefunc()] nfscalls[probefunc()] = gettimeofday_us() - write_time } probe end { printf("Collating data...\n"); foreach (name in nfscalls- limit 50) printf("%10d %s\n", nfscalls[name], name) }