summaryrefslogtreecommitdiff
path: root/maintenance/dtrace/counts.d
blob: 13725d9932bb737fe029951e9a76f17fc7b09b33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * This software is in the public domain.
 *
 * $Id: counts.d 10510 2005-08-15 01:46:19Z kateturner $
 */

#pragma D option quiet

self int tottime;
BEGIN {
	tottime = timestamp;
}

php$target:::function-entry
	@counts[copyinstr(arg0)] = count();
}

END {
	printf("Total time: %dus\n", (timestamp - tottime) / 1000);
	printf("# calls by function:\n");
	printa("%-40s %@d\n", @counts);
}