mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add DTrace and Makefile dependency includes.
Sample file mpq.d by Georg Lukas; license GPL 2. Sample file counts.d by Kate Turner; public domain. Sample file javascript-race.d by unknown; license MPL 1.1/GPL 2.0/LGPL 2.1. Sample file probes.d by momjian; license TBD.
This commit is contained in:
23
samples/DTrace/counts.d
Normal file
23
samples/DTrace/counts.d
Normal file
@@ -0,0 +1,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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user