← Index
NYTProf Performance Profile   « line view »
For /usr/sbin/pkg_info
  Run on Mon Aug 7 09:39:31 2017
Reported on Mon Aug 7 09:40:20 2017

Filename/usr/sbin/pkg_info
StatementsExecuted 13 statements in 11.7ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
11184.6ms15.7smain::::run main::run
11110.3ms10.4msmain::::BEGIN@20 main::BEGIN@20
1112.02ms2.62msmain::::BEGIN@19 main::BEGIN@19
16022661µs661µsUNIVERSAL::::isaUNIVERSAL::isa (xsub)
11131148µs148µsInternals::::SvREADONLYInternals::SvREADONLY (xsub)
14146146µs146µsUNIVERSAL::::VERSIONUNIVERSAL::VERSION (xsub)
8311120µs120µsmro::::method_changed_in mro::method_changed_in (xsub)
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
025.33msProfile data that couldn't be associated with a specific line:
# spent 5.25ms making 1 call to OpenBSD::Temp::END # spent 75µs making 1 call to OpenBSD::PackageRepository::END
113µs#! /usr/bin/perl
2# ex:ts=8 sw=4:
3# $OpenBSD: pkg_add,v 1.483 2014/12/27 23:59:44 espie Exp $
4#
5# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
6#
7# Permission to use, copy, modify, and distribute this software for any
8# purpose with or without fee is hereby granted, provided that the above
9# copyright notice and this permission notice appear in all copies.
10#
11# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
12# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
13# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
1921.13ms22.66ms
# spent 2.62ms (2.02+600µs) within main::BEGIN@19 which was called: # once (2.02ms+600µs) by main::NULL at line 19
use strict;
# spent 2.62ms making 1 call to main::BEGIN@19 # spent 41µs making 1 call to strict::import
20210.1ms210.4ms
# spent 10.4ms (10.3+100µs) within main::BEGIN@20 which was called: # once (10.3ms+100µs) by main::NULL at line 20
use warnings;
# spent 10.4ms making 1 call to main::BEGIN@20 # spent 86µs making 1 call to warnings::import
21
22sub run
23
# spent 15.7s (84.6ms+15.6) within main::run which was called: # once (84.6ms+15.6s) by main::RUNTIME at line 46
{
2413µs my ($cmd, $m) = @_;
2514µs my $module = "OpenBSD::$m";
26178µs eval "require $module";
# spent 383µs executing statements in string eval
2711µs if ($@) {
28 die $@;
29 }
301106µs115.4s exit($module->parse_and_run($cmd));
# spent 15.4s making 1 call to OpenBSD::PkgInfo::parse_and_run
31}
32
33116µsmy $choices = {
34 pkg_add => 'PkgAdd',
35 pkg_check => 'PkgCheck',
36 pkg_create => 'PkgCreate',
37 pkg_delete => 'PkgDelete',
38 pkg_info => 'PkgInfo',
39 pkg_sign => 'PkgSign',
40 fw_update => 'FwUpdate',
41};
42
4316µsmy @l = qw(add check create delete info sign);
44
45144µswhile (my ($cmd, $module) = each %$choices) {
461197µs315.7s if ($0 =~ m/\/?\Q$cmd\E$/) {
# spent 15.7s making 1 call to main::run # spent 65µs making 1 call to main::CORE:regcomp # spent 36µs making 1 call to main::CORE:match
47 run($cmd, $module);
48 }
49}
50
51# defaults to pkg_info personality but keeps the command name
52run($0, 'PkgInfo');
 
# spent 148µs within Internals::SvREADONLY which was called 111 times, avg 1µs/call: # 109 times (144µs+0s) by constant::import at line 164 of constant.pm, avg 1µs/call # once (3µs+0s) by constant::BEGIN@24 at line 33 of constant.pm # once (1µs+0s) by constant::BEGIN@24 at line 34 of constant.pm
sub Internals::SvREADONLY; # xsub
# spent 146µs within UNIVERSAL::VERSION which was called 14 times, avg 10µs/call: # once (24µs+0s) by IO::Uncompress::RawInflate::BEGIN@8 at line 8 of IO/Uncompress/RawInflate.pm # once (14µs+0s) by IO::Compress::Base::Common::BEGIN@8 at line 23 of Scalar/Util.pm # once (14µs+0s) by IO::Uncompress::RawInflate::BEGIN@9 at line 9 of IO/Uncompress/RawInflate.pm # once (12µs+0s) by IO::Uncompress::RawInflate::BEGIN@11 at line 11 of IO/Uncompress/RawInflate.pm # once (9µs+0s) by IO::Uncompress::Base::BEGIN@17 at line 17 of IO/Uncompress/Base.pm # once (9µs+0s) by IO::Uncompress::Adapter::Inflate::BEGIN@7 at line 7 of IO/Uncompress/Adapter/Inflate.pm # once (9µs+0s) by IO::Uncompress::Gunzip::BEGIN@12 at line 12 of IO/Uncompress/Gunzip.pm # once (9µs+0s) by IO::Uncompress::Gunzip::BEGIN@16 at line 16 of IO/Uncompress/Gunzip.pm # once (8µs+0s) by IO::Uncompress::RawInflate::BEGIN@12 at line 12 of IO/Uncompress/RawInflate.pm # once (8µs+0s) by IO::Uncompress::Adapter::Inflate::BEGIN@8 at line 8 of IO/Uncompress/Adapter/Inflate.pm # once (8µs+0s) by IO::Compress::Zlib::Extra::BEGIN@13 at line 13 of IO/Compress/Zlib/Extra.pm # once (7µs+0s) by IO::Uncompress::Gunzip::BEGIN@17 at line 17 of IO/Uncompress/Gunzip.pm # once (7µs+0s) by IO::Uncompress::Gunzip::BEGIN@15 at line 15 of IO/Uncompress/Gunzip.pm # once (7µs+0s) by IO::Uncompress::Gunzip::BEGIN@14 at line 14 of IO/Uncompress/Gunzip.pm
sub UNIVERSAL::VERSION; # xsub
# spent 661µs within UNIVERSAL::isa which was called 160 times, avg 4µs/call: # 80 times (413µs+0s) by File::Path::rmtree at line 281 of File/Path.pm, avg 5µs/call # 80 times (249µs+0s) by IO::Compress::Base::Common::isaFilehandle at line 115 of IO/Compress/Base/Common.pm, avg 3µs/call
sub UNIVERSAL::isa; # xsub
# spent 120µs within mro::method_changed_in which was called 83 times, avg 1µs/call: # 83 times (120µs+0s) by constant::import at line 198 of constant.pm, avg 1µs/call
sub mro::method_changed_in; # xsub