| Filename | /usr/sbin/pkg_info |
| Statements | Executed 13 statements in 11.7ms |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 84.6ms | 15.7s | main::run |
| 1 | 1 | 1 | 10.3ms | 10.4ms | main::BEGIN@20 |
| 1 | 1 | 1 | 2.02ms | 2.62ms | main::BEGIN@19 |
| 160 | 2 | 2 | 661µs | 661µs | UNIVERSAL::isa (xsub) |
| 111 | 3 | 1 | 148µs | 148µs | Internals::SvREADONLY (xsub) |
| 14 | 14 | 6 | 146µs | 146µs | UNIVERSAL::VERSION (xsub) |
| 83 | 1 | 1 | 120µs | 120µs | mro::method_changed_in (xsub) |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 0 | 2 | 5.33ms | Profile 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 | ||
| 1 | 1 | 3µ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 | |||||
| 19 | 2 | 1.13ms | 2 | 2.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 # spent 2.62ms making 1 call to main::BEGIN@19
# spent 41µs making 1 call to strict::import |
| 20 | 2 | 10.1ms | 2 | 10.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 # spent 10.4ms making 1 call to main::BEGIN@20
# spent 86µs making 1 call to warnings::import |
| 21 | |||||
| 22 | sub 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 | ||||
| 24 | 1 | 3µs | my ($cmd, $m) = @_; | ||
| 25 | 1 | 4µs | my $module = "OpenBSD::$m"; | ||
| 26 | 1 | 78µs | eval "require $module"; # spent 383µs executing statements in string eval | ||
| 27 | 1 | 1µs | if ($@) { | ||
| 28 | die $@; | ||||
| 29 | } | ||||
| 30 | 1 | 106µs | 1 | 15.4s | exit($module->parse_and_run($cmd)); # spent 15.4s making 1 call to OpenBSD::PkgInfo::parse_and_run |
| 31 | } | ||||
| 32 | |||||
| 33 | 1 | 16µs | my $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 | |||||
| 43 | 1 | 6µs | my @l = qw(add check create delete info sign); | ||
| 44 | |||||
| 45 | 1 | 44µs | while (my ($cmd, $module) = each %$choices) { | ||
| 46 | 1 | 197µs | 3 | 15.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 | ||||
| 52 | run($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 | |||||
# 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 | |||||
# 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 | |||||
# 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 |