Lines Matching +full:per +full:- +full:cpu
1 #!/usr/sbin/dtrace -qs
3 /*-
4 * Copyright (c) 2008-2012 Alexander Leidinger <netchild@FreeBSD.org>
30 * Some statistics (all per provider):
31 * - number of calls to a function per executable binary (not per PID!)
32 * - allows to see where an optimization would be beneficial for a given
34 * - graph of CPU time spend in functions per executable binary
35 * - together with the number of calls to this function this allows
38 * - graph of longest running (CPU-time!) function in total
39 * - may help finding problem cases in the kernel code
40 * - graph of longest held (CPU-time!) locks
47 self->time[probefunc] = vtimestamp;
52 /self->time[probefunc] != 0/
54 this->timediff = self->time[probefunc] - vtimestamp;
56 @stats[probeprov, execname, probefunc] = quantize(this->timediff);
57 @longest[probeprov, probefunc] = max(this->timediff);
59 self->time[probefunc] = 0;
64 self->lock[arg0] = vtimestamp;
68 /self->lock[arg0] != 0/
70 this->timediff = self->lock[arg0] - vtimestamp;
72 @lockstats[probefunc] = quantize(this->timediff);
73 @longlock[probefunc] = max(this->timediff);
75 self->lock[arg0] = 0;
80 printf("Number of calls per provider/application/kernel function:");
82 printf("CPU-timing statistics per provider/application/kernel function (in ns):");
84 printf("Longest running (CPU-time!) functions per provider (in ns):");
86 printf("Lock CPU-timing statistics:");
88 printf("Longest running (CPU-time!) locks:");