stats_timing.d (302408) | stats_timing.d (346812) |
---|---|
1#!/usr/sbin/dtrace -qs 2 3/*- 4 * Copyright (c) 2008-2012 Alexander Leidinger <netchild@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1#!/usr/sbin/dtrace -qs 2 3/*- 4 * Copyright (c) 2008-2012 Alexander Leidinger <netchild@FreeBSD.org> 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: stable/11/sys/compat/linux/stats_timing.d 283383 2015-05-24 14:53:16Z dchagin $ | 28 * $FreeBSD: stable/11/sys/compat/linux/stats_timing.d 346812 2019-04-28 09:53:08Z dchagin $ |
29 */ 30 31/** 32 * Some statistics (all per provider): 33 * - number of calls to a function per executable binary (not per PID!) 34 * - allows to see where an optimization would be beneficial for a given 35 * application 36 * - graph of CPU time spend in functions per executable binary --- 15 unchanged lines hidden (view full) --- 52 53linuxulator*:::return 54/self->time[probefunc] != 0/ 55{ 56 this->timediff = self->time[probefunc] - vtimestamp; 57 58 @stats[probeprov, execname, probefunc] = quantize(this->timediff); 59 @longest[probeprov, probefunc] = max(this->timediff); | 29 */ 30 31/** 32 * Some statistics (all per provider): 33 * - number of calls to a function per executable binary (not per PID!) 34 * - allows to see where an optimization would be beneficial for a given 35 * application 36 * - graph of CPU time spend in functions per executable binary --- 15 unchanged lines hidden (view full) --- 52 53linuxulator*:::return 54/self->time[probefunc] != 0/ 55{ 56 this->timediff = self->time[probefunc] - vtimestamp; 57 58 @stats[probeprov, execname, probefunc] = quantize(this->timediff); 59 @longest[probeprov, probefunc] = max(this->timediff); |
60 | 60 |
61 self->time[probefunc] = 0; 62} 63 64linuxulator*:::locked 65{ 66 self->lock[arg0] = vtimestamp; 67} 68 --- 25 unchanged lines hidden --- | 61 self->time[probefunc] = 0; 62} 63 64linuxulator*:::locked 65{ 66 self->lock[arg0] = vtimestamp; 67} 68 --- 25 unchanged lines hidden --- |