00001 /* 00002 * This software is in the public domain. 00003 * 00004 * $Id: counts.d 10510 2005-08-15 01:46:19Z kateturner $ 00005 */ 00006 00007 #pragma D option quiet 00008 00009 self int tottime; 00010 BEGIN { 00011 tottime = timestamp; 00012 } 00013 00014 php$target:::function-entry 00015 @counts[copyinstr(arg0)] = count(); 00016 } 00017 00018 END { 00019 printf("Total time: %dus\n", (timestamp - tottime) / 1000); 00020 printf("# calls by function:\n"); 00021 printa("%-40s %@d\n", @counts); 00022 } 00023