Filename | /usr/lib/perl5/5.14/i686-cygwin-threads-64int/Compress/Raw/Zlib.pm |
Statements | Executed 2318937 statements in 4.01s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
8231 | 1 | 1 | 1.44s | 2.30s | parse | Compress::Raw::Zlib::Parameters::
8231 | 1 | 1 | 755ms | 3.76s | new | Compress::Raw::Zlib::Inflate::
82310 | 2 | 1 | 750ms | 802ms | _checkType | Compress::Raw::Zlib::Parameters::
74079 | 8 | 1 | 336ms | 336ms | value | Compress::Raw::Zlib::Parameters::
8231 | 1 | 1 | 200ms | 2.56s | ParseParameters | Compress::Raw::Zlib::
71791 | 8 | 2 | 180ms | 180ms | __ANON__[:80] | Compress::Raw::Zlib::
8231 | 1 | 1 | 77.7ms | 77.7ms | _inflateInit (xsub) | Compress::Raw::Zlib::
8231 | 1 | 1 | 57.9ms | 57.9ms | new | Compress::Raw::Zlib::Parameters::
16465 | 2 | 1 | 52.5ms | 52.5ms | CORE:subst (opcode) | Compress::Raw::Zlib::
16462 | 2 | 1 | 52.5ms | 52.5ms | CORE:match (opcode) | Compress::Raw::Zlib::
1 | 1 | 1 | 4.62ms | 5.46ms | BEGIN@6 | Compress::Raw::Zlib::
1 | 1 | 1 | 4.09ms | 4.91ms | BEGIN@71 | Compress::Raw::Zlib::
137 | 1 | 1 | 1.01ms | 1.01ms | crc32 (xsub) | Compress::Raw::Zlib::
3 | 3 | 1 | 104µs | 152µs | AUTOLOAD | Compress::Raw::Zlib::
3 | 1 | 1 | 26µs | 26µs | constant (xsub) | Compress::Raw::Zlib::
1 | 1 | 1 | 17µs | 38µs | BEGIN@12 | Compress::Raw::Zlib::
1 | 1 | 1 | 16µs | 92µs | BEGIN@7 | Compress::Raw::Zlib::
1 | 1 | 1 | 14µs | 19µs | BEGIN@13 | Compress::Raw::Zlib::
1 | 1 | 1 | 14µs | 65µs | BEGIN@102 | Compress::Raw::Zlib::
1 | 1 | 1 | 14µs | 68µs | BEGIN@72 | Compress::Raw::Zlib::
1 | 1 | 1 | 13µs | 62µs | BEGIN@85 | Compress::Raw::Zlib::
1 | 1 | 1 | 13µs | 62µs | BEGIN@115 | Compress::Raw::Zlib::
1 | 1 | 1 | 13µs | 16µs | BEGIN@11 | Compress::Raw::Zlib::
1 | 1 | 1 | 13µs | 65µs | BEGIN@112 | Compress::Raw::Zlib::
1 | 1 | 1 | 13µs | 62µs | BEGIN@116 | Compress::Raw::Zlib::
1 | 1 | 1 | 13µs | 62µs | BEGIN@88 | Compress::Raw::Zlib::
1 | 1 | 1 | 13µs | 62µs | BEGIN@109 | Compress::Raw::Zlib::
1 | 1 | 1 | 13µs | 29µs | BEGIN@79 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 63µs | BEGIN@104 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 62µs | BEGIN@105 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 65µs | BEGIN@86 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 71µs | BEGIN@107 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 65µs | BEGIN@103 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 63µs | BEGIN@84 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 60µs | BEGIN@87 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 63µs | BEGIN@113 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 61µs | BEGIN@111 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 59µs | BEGIN@106 | Compress::Raw::Zlib::
1 | 1 | 1 | 12µs | 60µs | BEGIN@114 | Compress::Raw::Zlib::
0 | 0 | 0 | 0s | 0s | new | Compress::Raw::Zlib::Deflate::
0 | 0 | 0 | 0s | 0s | new | Compress::Raw::Zlib::InflateScan::
0 | 0 | 0 | 0s | 0s | parsed | Compress::Raw::Zlib::Parameters::
0 | 0 | 0 | 0s | 0s | setError | Compress::Raw::Zlib::Parameters::
0 | 0 | 0 | 0s | 0s | deflateParams | Compress::Raw::Zlib::deflateStream::
0 | 0 | 0 | 0s | 0s | createDeflateStream | Compress::Raw::Zlib::inflateScanStream::
0 | 0 | 0 | 0s | 0s | inflate | Compress::Raw::Zlib::inflateScanStream::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | |||||
2 | package Compress::Raw::Zlib; | ||||
3 | |||||
4 | 1 | 86µs | require 5.004 ; | ||
5 | 1 | 1µs | require Exporter; | ||
6 | 2 | 2.59ms | 2 | 5.92ms | # spent 5.46ms (4.62+848µs) within Compress::Raw::Zlib::BEGIN@6 which was called:
# once (4.62ms+848µs) by Archive::Zip::BEGIN@12 at line 6 # spent 5.46ms making 1 call to Compress::Raw::Zlib::BEGIN@6
# spent 458µs making 1 call to AutoLoader::import |
7 | 2 | 59µs | 2 | 168µs | # spent 92µs (16+76) within Compress::Raw::Zlib::BEGIN@7 which was called:
# once (16µs+76µs) by Archive::Zip::BEGIN@12 at line 7 # spent 92µs making 1 call to Compress::Raw::Zlib::BEGIN@7
# spent 76µs making 1 call to Exporter::import |
8 | |||||
9 | #use Parse::Parameters; | ||||
10 | |||||
11 | 2 | 53µs | 2 | 20µs | # spent 16µs (13+4) within Compress::Raw::Zlib::BEGIN@11 which was called:
# once (13µs+4µs) by Archive::Zip::BEGIN@12 at line 11 # spent 16µs making 1 call to Compress::Raw::Zlib::BEGIN@11
# spent 4µs making 1 call to strict::import |
12 | 2 | 54µs | 2 | 58µs | # spent 38µs (17+21) within Compress::Raw::Zlib::BEGIN@12 which was called:
# once (17µs+21µs) by Archive::Zip::BEGIN@12 at line 12 # spent 38µs making 1 call to Compress::Raw::Zlib::BEGIN@12
# spent 21µs making 1 call to warnings::import |
13 | 2 | 275µs | 2 | 24µs | # spent 19µs (14+5) within Compress::Raw::Zlib::BEGIN@13 which was called:
# once (14µs+5µs) by Archive::Zip::BEGIN@12 at line 13 # spent 19µs making 1 call to Compress::Raw::Zlib::BEGIN@13
# spent 5µs making 1 call to bytes::import |
14 | 1 | 2µs | our ($VERSION, $XS_VERSION, @ISA, @EXPORT, $AUTOLOAD); | ||
15 | |||||
16 | 1 | 2µs | $VERSION = '2.033'; | ||
17 | 1 | 1µs | $XS_VERSION = $VERSION; | ||
18 | 1 | 32µs | $VERSION = eval $VERSION; # spent 7µs executing statements in string eval | ||
19 | |||||
20 | 1 | 15µs | @ISA = qw(Exporter); | ||
21 | # Items to export into callers namespace by default. Note: do not export | ||||
22 | # names by default without a very good reason. Use EXPORT_OK instead. | ||||
23 | # Do not simply export all your public functions/methods/constants. | ||||
24 | 1 | 21µs | @EXPORT = qw( | ||
25 | adler32 crc32 | ||||
26 | |||||
27 | ZLIB_VERSION | ||||
28 | ZLIB_VERNUM | ||||
29 | |||||
30 | DEF_WBITS | ||||
31 | OS_CODE | ||||
32 | |||||
33 | MAX_MEM_LEVEL | ||||
34 | MAX_WBITS | ||||
35 | |||||
36 | Z_ASCII | ||||
37 | Z_BEST_COMPRESSION | ||||
38 | Z_BEST_SPEED | ||||
39 | Z_BINARY | ||||
40 | Z_BLOCK | ||||
41 | Z_BUF_ERROR | ||||
42 | Z_DATA_ERROR | ||||
43 | Z_DEFAULT_COMPRESSION | ||||
44 | Z_DEFAULT_STRATEGY | ||||
45 | Z_DEFLATED | ||||
46 | Z_ERRNO | ||||
47 | Z_FILTERED | ||||
48 | Z_FIXED | ||||
49 | Z_FINISH | ||||
50 | Z_FULL_FLUSH | ||||
51 | Z_HUFFMAN_ONLY | ||||
52 | Z_MEM_ERROR | ||||
53 | Z_NEED_DICT | ||||
54 | Z_NO_COMPRESSION | ||||
55 | Z_NO_FLUSH | ||||
56 | Z_NULL | ||||
57 | Z_OK | ||||
58 | Z_PARTIAL_FLUSH | ||||
59 | Z_RLE | ||||
60 | Z_STREAM_END | ||||
61 | Z_STREAM_ERROR | ||||
62 | Z_SYNC_FLUSH | ||||
63 | Z_TREES | ||||
64 | Z_UNKNOWN | ||||
65 | Z_VERSION_ERROR | ||||
66 | |||||
67 | WANT_GZIP | ||||
68 | WANT_GZIP_OR_ZLIB | ||||
69 | ); | ||||
70 | |||||
71 | 2 | 2.54ms | 2 | 5.00ms | # spent 4.91ms (4.09+816µs) within Compress::Raw::Zlib::BEGIN@71 which was called:
# once (4.09ms+816µs) by Archive::Zip::BEGIN@12 at line 71 # spent 4.91ms making 1 call to Compress::Raw::Zlib::BEGIN@71
# spent 90µs making 1 call to constant::import |
72 | 2 | 148µs | 2 | 122µs | # spent 68µs (14+54) within Compress::Raw::Zlib::BEGIN@72 which was called:
# once (14µs+54µs) by Archive::Zip::BEGIN@12 at line 72 # spent 68µs making 1 call to Compress::Raw::Zlib::BEGIN@72
# spent 54µs making 1 call to constant::import |
73 | |||||
74 | # spent 152µs (104+48) within Compress::Raw::Zlib::AUTOLOAD which was called 3 times, avg 51µs/call:
# once (53µs+28µs) by Archive::Zip::Member::rewindData at line 900 of Archive/Zip/Member.pm
# once (28µs+12µs) by Archive::Zip::Member::_inflateChunk at line 857 of Archive/Zip/Member.pm
# once (23µs+8µs) by Archive::Zip::Member::rewindData at line 905 of Archive/Zip/Member.pm | ||||
75 | 18 | 163µs | my($constname); | ||
76 | 3 | 22µs | ($constname = $AUTOLOAD) =~ s/.*:://; # spent 22µs making 3 calls to Compress::Raw::Zlib::CORE:subst, avg 7µs/call | ||
77 | 3 | 26µs | my ($error, $val) = constant($constname); # spent 26µs making 3 calls to Compress::Raw::Zlib::constant, avg 9µs/call | ||
78 | Carp::croak $error if $error; | ||||
79 | 2 | 140µs | 2 | 46µs | # spent 29µs (13+17) within Compress::Raw::Zlib::BEGIN@79 which was called:
# once (13µs+17µs) by Archive::Zip::BEGIN@12 at line 79 # spent 29µs making 1 call to Compress::Raw::Zlib::BEGIN@79
# spent 17µs making 1 call to strict::unimport |
80 | 71791 | 288ms | # spent 180ms within Compress::Raw::Zlib::__ANON__[/usr/lib/perl5/5.14/i686-cygwin-threads-64int/Compress/Raw/Zlib.pm:80] which was called 71791 times, avg 3µs/call:
# 18442 times (45.3ms+0s) by Archive::Zip::Member::_inflateChunk at line 857 of Archive/Zip/Member.pm, avg 2µs/call
# 10212 times (30.6ms+0s) by Archive::Zip::Member::_inflateChunk at line 856 of Archive/Zip/Member.pm, avg 3µs/call
# 10212 times (21.0ms+0s) by Archive::Zip::Member::_inflateChunk at line 858 of Archive/Zip/Member.pm, avg 2µs/call
# 8231 times (18.1ms+0s) by Compress::Raw::Zlib::Inflate::new at line 416, avg 2µs/call
# 8231 times (15.8ms+0s) by Compress::Raw::Zlib::Inflate::new at line 389, avg 2µs/call
# 8230 times (25.6ms+0s) by Archive::Zip::Member::rewindData at line 900 of Archive/Zip/Member.pm, avg 3µs/call
# 8230 times (23.5ms+0s) by Archive::Zip::Member::rewindData at line 905 of Archive/Zip/Member.pm, avg 3µs/call
# 3 times (9µs+0s) by Archive::Zip::Member::_inflateChunk or Archive::Zip::Member::rewindData at line 81, avg 3µs/call | ||
81 | 3 | 9µs | goto &{$AUTOLOAD}; # spent 9µs making 3 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:80], avg 3µs/call | ||
82 | } | ||||
83 | |||||
84 | 2 | 62µs | 2 | 114µs | # spent 63µs (12+51) within Compress::Raw::Zlib::BEGIN@84 which was called:
# once (12µs+51µs) by Archive::Zip::BEGIN@12 at line 84 # spent 63µs making 1 call to Compress::Raw::Zlib::BEGIN@84
# spent 51µs making 1 call to constant::import |
85 | 2 | 56µs | 2 | 112µs | # spent 62µs (13+49) within Compress::Raw::Zlib::BEGIN@85 which was called:
# once (13µs+49µs) by Archive::Zip::BEGIN@12 at line 85 # spent 62µs making 1 call to Compress::Raw::Zlib::BEGIN@85
# spent 49µs making 1 call to constant::import |
86 | 2 | 57µs | 2 | 117µs | # spent 65µs (12+53) within Compress::Raw::Zlib::BEGIN@86 which was called:
# once (12µs+53µs) by Archive::Zip::BEGIN@12 at line 86 # spent 65µs making 1 call to Compress::Raw::Zlib::BEGIN@86
# spent 53µs making 1 call to constant::import |
87 | 2 | 57µs | 2 | 108µs | # spent 60µs (12+48) within Compress::Raw::Zlib::BEGIN@87 which was called:
# once (12µs+48µs) by Archive::Zip::BEGIN@12 at line 87 # spent 60µs making 1 call to Compress::Raw::Zlib::BEGIN@87
# spent 48µs making 1 call to constant::import |
88 | 2 | 155µs | 2 | 112µs | # spent 62µs (13+49) within Compress::Raw::Zlib::BEGIN@88 which was called:
# once (13µs+49µs) by Archive::Zip::BEGIN@12 at line 88 # spent 62µs making 1 call to Compress::Raw::Zlib::BEGIN@88
# spent 49µs making 1 call to constant::import |
89 | |||||
90 | eval { | ||||
91 | require XSLoader; | ||||
92 | 1 | 1.62ms | XSLoader::load('Compress::Raw::Zlib', $XS_VERSION); # spent 1.62ms making 1 call to XSLoader::load | ||
93 | 1; | ||||
94 | } | ||||
95 | 4 | 1.64ms | or do { | ||
96 | require DynaLoader; | ||||
97 | local @ISA = qw(DynaLoader); | ||||
98 | bootstrap Compress::Raw::Zlib $XS_VERSION ; | ||||
99 | }; | ||||
100 | |||||
101 | |||||
102 | 2 | 56µs | 2 | 115µs | # spent 65µs (14+51) within Compress::Raw::Zlib::BEGIN@102 which was called:
# once (14µs+51µs) by Archive::Zip::BEGIN@12 at line 102 # spent 65µs making 1 call to Compress::Raw::Zlib::BEGIN@102
# spent 51µs making 1 call to constant::import |
103 | 2 | 56µs | 2 | 118µs | # spent 65µs (12+53) within Compress::Raw::Zlib::BEGIN@103 which was called:
# once (12µs+53µs) by Archive::Zip::BEGIN@12 at line 103 # spent 65µs making 1 call to Compress::Raw::Zlib::BEGIN@103
# spent 53µs making 1 call to constant::import |
104 | 2 | 58µs | 2 | 114µs | # spent 63µs (12+51) within Compress::Raw::Zlib::BEGIN@104 which was called:
# once (12µs+51µs) by Archive::Zip::BEGIN@12 at line 104 # spent 63µs making 1 call to Compress::Raw::Zlib::BEGIN@104
# spent 51µs making 1 call to constant::import |
105 | 2 | 54µs | 2 | 112µs | # spent 62µs (12+50) within Compress::Raw::Zlib::BEGIN@105 which was called:
# once (12µs+50µs) by Archive::Zip::BEGIN@12 at line 105 # spent 62µs making 1 call to Compress::Raw::Zlib::BEGIN@105
# spent 50µs making 1 call to constant::import |
106 | 2 | 55µs | 2 | 107µs | # spent 59µs (12+48) within Compress::Raw::Zlib::BEGIN@106 which was called:
# once (12µs+48µs) by Archive::Zip::BEGIN@12 at line 106 # spent 59µs making 1 call to Compress::Raw::Zlib::BEGIN@106
# spent 48µs making 1 call to constant::import |
107 | 2 | 61µs | 2 | 130µs | # spent 71µs (12+59) within Compress::Raw::Zlib::BEGIN@107 which was called:
# once (12µs+59µs) by Archive::Zip::BEGIN@12 at line 107 # spent 71µs making 1 call to Compress::Raw::Zlib::BEGIN@107
# spent 59µs making 1 call to constant::import |
108 | |||||
109 | 2 | 58µs | 2 | 110µs | # spent 62µs (13+49) within Compress::Raw::Zlib::BEGIN@109 which was called:
# once (13µs+49µs) by Archive::Zip::BEGIN@12 at line 109 # spent 62µs making 1 call to Compress::Raw::Zlib::BEGIN@109
# spent 49µs making 1 call to constant::import |
110 | |||||
111 | 2 | 55µs | 2 | 111µs | # spent 61µs (12+50) within Compress::Raw::Zlib::BEGIN@111 which was called:
# once (12µs+50µs) by Archive::Zip::BEGIN@12 at line 111 # spent 61µs making 1 call to Compress::Raw::Zlib::BEGIN@111
# spent 50µs making 1 call to constant::import |
112 | 2 | 55µs | 2 | 117µs | # spent 65µs (13+52) within Compress::Raw::Zlib::BEGIN@112 which was called:
# once (13µs+52µs) by Archive::Zip::BEGIN@12 at line 112 # spent 65µs making 1 call to Compress::Raw::Zlib::BEGIN@112
# spent 52µs making 1 call to constant::import |
113 | 2 | 54µs | 2 | 114µs | # spent 63µs (12+51) within Compress::Raw::Zlib::BEGIN@113 which was called:
# once (12µs+51µs) by Archive::Zip::BEGIN@12 at line 113 # spent 63µs making 1 call to Compress::Raw::Zlib::BEGIN@113
# spent 51µs making 1 call to constant::import |
114 | 2 | 60µs | 2 | 108µs | # spent 60µs (12+48) within Compress::Raw::Zlib::BEGIN@114 which was called:
# once (12µs+48µs) by Archive::Zip::BEGIN@12 at line 114 # spent 60µs making 1 call to Compress::Raw::Zlib::BEGIN@114
# spent 48µs making 1 call to constant::import |
115 | 2 | 57µs | 2 | 110µs | # spent 62µs (13+49) within Compress::Raw::Zlib::BEGIN@115 which was called:
# once (13µs+49µs) by Archive::Zip::BEGIN@12 at line 115 # spent 62µs making 1 call to Compress::Raw::Zlib::BEGIN@115
# spent 49µs making 1 call to constant::import |
116 | 2 | 4.81ms | 2 | 111µs | # spent 62µs (13+49) within Compress::Raw::Zlib::BEGIN@116 which was called:
# once (13µs+49µs) by Archive::Zip::BEGIN@12 at line 116 # spent 62µs making 1 call to Compress::Raw::Zlib::BEGIN@116
# spent 49µs making 1 call to constant::import |
117 | |||||
- - | |||||
120 | sub ParseParameters | ||||
121 | # spent 2.56s (200ms+2.36) within Compress::Raw::Zlib::ParseParameters which was called 8231 times, avg 311µs/call:
# 8231 times (200ms+2.36s) by Compress::Raw::Zlib::Inflate::new at line 389, avg 311µs/call | ||||
122 | 41155 | 179ms | my $level = shift || 0 ; | ||
123 | |||||
124 | my $sub = (caller($level + 1))[3] ; | ||||
125 | #local $Carp::CarpLevel = 1 ; | ||||
126 | 8231 | 57.9ms | my $p = new Compress::Raw::Zlib::Parameters() ; # spent 57.9ms making 8231 calls to Compress::Raw::Zlib::Parameters::new, avg 7µs/call | ||
127 | 8231 | 2.30s | $p->parse(@_) # spent 2.30s making 8231 calls to Compress::Raw::Zlib::Parameters::parse, avg 279µs/call | ||
128 | or croak "$sub: $p->{Error}" ; | ||||
129 | |||||
130 | return $p; | ||||
131 | } | ||||
132 | |||||
133 | |||||
134 | sub Compress::Raw::Zlib::Parameters::new | ||||
135 | # spent 57.9ms within Compress::Raw::Zlib::Parameters::new which was called 8231 times, avg 7µs/call:
# 8231 times (57.9ms+0s) by Compress::Raw::Zlib::ParseParameters at line 126, avg 7µs/call | ||||
136 | 24693 | 75.8ms | my $class = shift ; | ||
137 | |||||
138 | my $obj = { Error => '', | ||||
139 | Got => {}, | ||||
140 | } ; | ||||
141 | |||||
142 | #return bless $obj, ref($class) || $class || __PACKAGE__ ; | ||||
143 | return bless $obj, 'Compress::Raw::Zlib::Parameters' ; | ||||
144 | } | ||||
145 | |||||
146 | sub Compress::Raw::Zlib::Parameters::setError | ||||
147 | { | ||||
148 | my $self = shift ; | ||||
149 | my $error = shift ; | ||||
150 | my $retval = @_ ? shift : undef ; | ||||
151 | |||||
152 | $self->{Error} = $error ; | ||||
153 | return $retval; | ||||
154 | } | ||||
155 | |||||
156 | #sub getError | ||||
157 | #{ | ||||
158 | # my $self = shift ; | ||||
159 | # return $self->{Error} ; | ||||
160 | #} | ||||
161 | |||||
162 | sub Compress::Raw::Zlib::Parameters::parse | ||||
163 | # spent 2.30s (1.44+855ms) within Compress::Raw::Zlib::Parameters::parse which was called 8231 times, avg 279µs/call:
# 8231 times (1.44s+855ms) by Compress::Raw::Zlib::ParseParameters at line 127, avg 279µs/call | ||||
164 | 90541 | 295ms | my $self = shift ; | ||
165 | |||||
166 | my $default = shift ; | ||||
167 | |||||
168 | my $got = $self->{Got} ; | ||||
169 | my $firstTime = keys %{ $got } == 0 ; | ||||
170 | |||||
171 | my (@Bad) ; | ||||
172 | my @entered = () ; | ||||
173 | |||||
174 | # Allow the options to be passed as a hash reference or | ||||
175 | # as the complete hash. | ||||
176 | 24693 | 43.9ms | if (@_ == 0) { | ||
177 | @entered = () ; | ||||
178 | } | ||||
179 | elsif (@_ == 1) { | ||||
180 | my $href = $_[0] ; | ||||
181 | return $self->setError("Expected even number of parameters, got 1") | ||||
182 | if ! defined $href or ! ref $href or ref $href ne "HASH" ; | ||||
183 | |||||
184 | foreach my $key (keys %$href) { | ||||
185 | push @entered, $key ; | ||||
186 | push @entered, \$href->{$key} ; | ||||
187 | } | ||||
188 | } | ||||
189 | else { | ||||
190 | my $count = @_; | ||||
191 | return $self->setError("Expected even number of parameters, got $count") | ||||
192 | if $count % 2 != 0 ; | ||||
193 | |||||
194 | for my $i (0.. $count / 2 - 1) { | ||||
195 | 32924 | 56.3ms | push @entered, $_[2* $i] ; | ||
196 | push @entered, \$_[2* $i+1] ; | ||||
197 | } | ||||
198 | } | ||||
199 | |||||
200 | |||||
201 | 460936 | 636ms | while (my ($key, $v) = each %$default) | ||
202 | { | ||||
203 | croak "need 4 params [@$v]" | ||||
204 | if @$v != 4 ; | ||||
205 | |||||
206 | my ($first_only, $sticky, $type, $value) = @$v ; | ||||
207 | my $x ; | ||||
208 | 65848 | 556ms | $self->_checkType($key, \$value, $type, 0, \$x) # spent 556ms making 65848 calls to Compress::Raw::Zlib::Parameters::_checkType, avg 8µs/call | ||
209 | or return undef ; | ||||
210 | |||||
211 | $key = lc $key; | ||||
212 | |||||
213 | if ($firstTime || ! $sticky) { | ||||
214 | $got->{$key} = [0, $type, $value, $x, $first_only, $sticky] ; | ||||
215 | } | ||||
216 | |||||
217 | $got->{$key}[OFF_PARSED] = 0 ; | ||||
218 | } | ||||
219 | |||||
220 | for my $i (0.. @entered / 2 - 1) { | ||||
221 | 82310 | 203ms | my $key = $entered[2* $i] ; | ||
222 | my $value = $entered[2* $i+1] ; | ||||
223 | |||||
224 | #print "Key [$key] Value [$value]" ; | ||||
225 | #print defined $$value ? "[$$value]\n" : "[undef]\n"; | ||||
226 | |||||
227 | 16462 | 52.4ms | $key =~ s/^-// ; # spent 52.4ms making 16462 calls to Compress::Raw::Zlib::CORE:subst, avg 3µs/call | ||
228 | my $canonkey = lc $key; | ||||
229 | |||||
230 | 82310 | 118ms | if ($got->{$canonkey} && ($firstTime || | ||
231 | ! $got->{$canonkey}[OFF_FIRST_ONLY] )) | ||||
232 | { | ||||
233 | my $type = $got->{$canonkey}[OFF_TYPE] ; | ||||
234 | my $s ; | ||||
235 | 16462 | 246ms | $self->_checkType($key, $value, $type, 1, \$s) # spent 246ms making 16462 calls to Compress::Raw::Zlib::Parameters::_checkType, avg 15µs/call | ||
236 | or return undef ; | ||||
237 | #$value = $$value unless $type & Parse_store_ref ; | ||||
238 | $value = $$value ; | ||||
239 | $got->{$canonkey} = [1, $type, $value, $s] ; | ||||
240 | } | ||||
241 | else | ||||
242 | { push (@Bad, $key) } | ||||
243 | } | ||||
244 | |||||
245 | if (@Bad) { | ||||
246 | my ($bad) = join(", ", @Bad) ; | ||||
247 | return $self->setError("unknown key value(s) @Bad") ; | ||||
248 | } | ||||
249 | |||||
250 | return 1; | ||||
251 | } | ||||
252 | |||||
253 | sub Compress::Raw::Zlib::Parameters::_checkType | ||||
254 | # spent 802ms (750+52.5) within Compress::Raw::Zlib::Parameters::_checkType which was called 82310 times, avg 10µs/call:
# 65848 times (556ms+0s) by Compress::Raw::Zlib::Parameters::parse at line 208, avg 8µs/call
# 16462 times (194ms+52.5ms) by Compress::Raw::Zlib::Parameters::parse at line 235, avg 15µs/call | ||||
255 | 740790 | 383ms | my $self = shift ; | ||
256 | |||||
257 | my $key = shift ; | ||||
258 | my $value = shift ; | ||||
259 | my $type = shift ; | ||||
260 | my $validate = shift ; | ||||
261 | my $output = shift; | ||||
262 | |||||
263 | #local $Carp::CarpLevel = $level ; | ||||
264 | #print "PARSE $type $key $value $validate $sub\n" ; | ||||
265 | if ( $type & Parse_store_ref) | ||||
266 | { | ||||
267 | #$value = $$value | ||||
268 | # if ref ${ $value } ; | ||||
269 | |||||
270 | $$output = $value ; | ||||
271 | return 1; | ||||
272 | } | ||||
273 | |||||
274 | $value = $$value ; | ||||
275 | |||||
276 | 271623 | 577ms | if ($type & Parse_any) | ||
277 | { | ||||
278 | $$output = $value ; | ||||
279 | return 1; | ||||
280 | } | ||||
281 | elsif ($type & Parse_unsigned) | ||||
282 | { | ||||
283 | return $self->setError("Parameter '$key' must be an unsigned int, got 'undef'") | ||||
284 | if $validate && ! defined $value ; | ||||
285 | 8231 | 22.4ms | return $self->setError("Parameter '$key' must be an unsigned int, got '$value'") # spent 22.4ms making 8231 calls to Compress::Raw::Zlib::CORE:match, avg 3µs/call | ||
286 | if $validate && $value !~ /^\d+$/; | ||||
287 | |||||
288 | $$output = defined $value ? $value : 0 ; | ||||
289 | return 1; | ||||
290 | } | ||||
291 | elsif ($type & Parse_signed) | ||||
292 | { | ||||
293 | return $self->setError("Parameter '$key' must be a signed int, got 'undef'") | ||||
294 | if $validate && ! defined $value ; | ||||
295 | 8231 | 30.1ms | return $self->setError("Parameter '$key' must be a signed int, got '$value'") # spent 30.1ms making 8231 calls to Compress::Raw::Zlib::CORE:match, avg 4µs/call | ||
296 | if $validate && $value !~ /^-?\d+$/; | ||||
297 | |||||
298 | $$output = defined $value ? $value : 0 ; | ||||
299 | return 1 ; | ||||
300 | } | ||||
301 | elsif ($type & Parse_boolean) | ||||
302 | { | ||||
303 | return $self->setError("Parameter '$key' must be an int, got '$value'") | ||||
304 | if $validate && defined $value && $value !~ /^\d*$/; | ||||
305 | $$output = defined $value ? $value != 0 : 0 ; | ||||
306 | return 1; | ||||
307 | } | ||||
308 | elsif ($type & Parse_string) | ||||
309 | { | ||||
310 | $$output = defined $value ? $value : "" ; | ||||
311 | return 1; | ||||
312 | } | ||||
313 | |||||
314 | $$output = $value ; | ||||
315 | return 1; | ||||
316 | } | ||||
317 | |||||
- - | |||||
320 | sub Compress::Raw::Zlib::Parameters::parsed | ||||
321 | { | ||||
322 | my $self = shift ; | ||||
323 | my $name = shift ; | ||||
324 | |||||
325 | return $self->{Got}{lc $name}[OFF_PARSED] ; | ||||
326 | } | ||||
327 | |||||
328 | sub Compress::Raw::Zlib::Parameters::value | ||||
329 | # spent 336ms within Compress::Raw::Zlib::Parameters::value which was called 74079 times, avg 5µs/call:
# 16462 times (72.5ms+0s) by Compress::Raw::Zlib::Inflate::new at line 419, avg 4µs/call
# 8231 times (48.9ms+0s) by Compress::Raw::Zlib::Inflate::new at line 403, avg 6µs/call
# 8231 times (37.5ms+0s) by Compress::Raw::Zlib::Inflate::new at line 408, avg 5µs/call
# 8231 times (35.4ms+0s) by Compress::Raw::Zlib::Inflate::new at line 410, avg 4µs/call
# 8231 times (35.4ms+0s) by Compress::Raw::Zlib::Inflate::new at line 415, avg 4µs/call
# 8231 times (35.3ms+0s) by Compress::Raw::Zlib::Inflate::new at line 409, avg 4µs/call
# 8231 times (35.3ms+0s) by Compress::Raw::Zlib::Inflate::new at line 412, avg 4µs/call
# 8231 times (35.1ms+0s) by Compress::Raw::Zlib::Inflate::new at line 411, avg 4µs/call | ||||
330 | 296316 | 455ms | my $self = shift ; | ||
331 | my $name = shift ; | ||||
332 | |||||
333 | if (@_) | ||||
334 | { | ||||
335 | $self->{Got}{lc $name}[OFF_PARSED] = 1; | ||||
336 | $self->{Got}{lc $name}[OFF_DEFAULT] = $_[0] ; | ||||
337 | $self->{Got}{lc $name}[OFF_FIXED] = $_[0] ; | ||||
338 | } | ||||
339 | |||||
340 | return $self->{Got}{lc $name}[OFF_FIXED] ; | ||||
341 | } | ||||
342 | |||||
343 | sub Compress::Raw::Zlib::Deflate::new | ||||
344 | { | ||||
345 | my $pkg = shift ; | ||||
346 | my ($got) = ParseParameters(0, | ||||
347 | { | ||||
348 | 'AppendOutput' => [1, 1, Parse_boolean, 0], | ||||
349 | 'CRC32' => [1, 1, Parse_boolean, 0], | ||||
350 | 'ADLER32' => [1, 1, Parse_boolean, 0], | ||||
351 | 'Bufsize' => [1, 1, Parse_unsigned, 4096], | ||||
352 | |||||
353 | 'Level' => [1, 1, Parse_signed, Z_DEFAULT_COMPRESSION()], | ||||
354 | 'Method' => [1, 1, Parse_unsigned, Z_DEFLATED()], | ||||
355 | 'WindowBits' => [1, 1, Parse_signed, MAX_WBITS()], | ||||
356 | 'MemLevel' => [1, 1, Parse_unsigned, MAX_MEM_LEVEL()], | ||||
357 | 'Strategy' => [1, 1, Parse_unsigned, Z_DEFAULT_STRATEGY()], | ||||
358 | 'Dictionary' => [1, 1, Parse_any, ""], | ||||
359 | }, @_) ; | ||||
360 | |||||
361 | |||||
362 | croak "Compress::Raw::Zlib::Deflate::new: Bufsize must be >= 1, you specified " . | ||||
363 | $got->value('Bufsize') | ||||
364 | unless $got->value('Bufsize') >= 1; | ||||
365 | |||||
366 | my $flags = 0 ; | ||||
367 | $flags |= FLAG_APPEND if $got->value('AppendOutput') ; | ||||
368 | $flags |= FLAG_CRC if $got->value('CRC32') ; | ||||
369 | $flags |= FLAG_ADLER if $got->value('ADLER32') ; | ||||
370 | |||||
371 | my $windowBits = $got->value('WindowBits'); | ||||
372 | $windowBits += MAX_WBITS() | ||||
373 | if ($windowBits & MAX_WBITS()) == 0 ; | ||||
374 | |||||
375 | _deflateInit($flags, | ||||
376 | $got->value('Level'), | ||||
377 | $got->value('Method'), | ||||
378 | $windowBits, | ||||
379 | $got->value('MemLevel'), | ||||
380 | $got->value('Strategy'), | ||||
381 | $got->value('Bufsize'), | ||||
382 | $got->value('Dictionary')) ; | ||||
383 | |||||
384 | } | ||||
385 | |||||
386 | sub Compress::Raw::Zlib::Inflate::new | ||||
387 | # spent 3.76s (755ms+3.00) within Compress::Raw::Zlib::Inflate::new which was called 8231 times, avg 457µs/call:
# 8231 times (755ms+3.00s) by Archive::Zip::Member::rewindData at line 900 of Archive/Zip/Member.pm, avg 457µs/call | ||||
388 | 98772 | 682ms | my $pkg = shift ; | ||
389 | 16462 | 2.57s | my ($got) = ParseParameters(0, # spent 2.56s making 8231 calls to Compress::Raw::Zlib::ParseParameters, avg 311µs/call
# spent 15.8ms making 8231 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:80], avg 2µs/call | ||
390 | { | ||||
391 | 'AppendOutput' => [1, 1, Parse_boolean, 0], | ||||
392 | 'LimitOutput' => [1, 1, Parse_boolean, 0], | ||||
393 | 'CRC32' => [1, 1, Parse_boolean, 0], | ||||
394 | 'ADLER32' => [1, 1, Parse_boolean, 0], | ||||
395 | 'ConsumeInput' => [1, 1, Parse_boolean, 1], | ||||
396 | 'Bufsize' => [1, 1, Parse_unsigned, 4096], | ||||
397 | |||||
398 | 'WindowBits' => [1, 1, Parse_signed, MAX_WBITS()], | ||||
399 | 'Dictionary' => [1, 1, Parse_any, ""], | ||||
400 | }, @_) ; | ||||
401 | |||||
402 | |||||
403 | 8231 | 48.9ms | croak "Compress::Raw::Zlib::Inflate::new: Bufsize must be >= 1, you specified " . # spent 48.9ms making 8231 calls to Compress::Raw::Zlib::Parameters::value, avg 6µs/call | ||
404 | $got->value('Bufsize') | ||||
405 | unless $got->value('Bufsize') >= 1; | ||||
406 | |||||
407 | my $flags = 0 ; | ||||
408 | 8231 | 37.5ms | $flags |= FLAG_APPEND if $got->value('AppendOutput') ; # spent 37.5ms making 8231 calls to Compress::Raw::Zlib::Parameters::value, avg 5µs/call | ||
409 | 8231 | 35.3ms | $flags |= FLAG_CRC if $got->value('CRC32') ; # spent 35.3ms making 8231 calls to Compress::Raw::Zlib::Parameters::value, avg 4µs/call | ||
410 | 8231 | 35.4ms | $flags |= FLAG_ADLER if $got->value('ADLER32') ; # spent 35.4ms making 8231 calls to Compress::Raw::Zlib::Parameters::value, avg 4µs/call | ||
411 | 8231 | 35.1ms | $flags |= FLAG_CONSUME_INPUT if $got->value('ConsumeInput') ; # spent 35.1ms making 8231 calls to Compress::Raw::Zlib::Parameters::value, avg 4µs/call | ||
412 | 8231 | 35.3ms | $flags |= FLAG_LIMIT_OUTPUT if $got->value('LimitOutput') ; # spent 35.3ms making 8231 calls to Compress::Raw::Zlib::Parameters::value, avg 4µs/call | ||
413 | |||||
414 | |||||
415 | 8231 | 35.4ms | my $windowBits = $got->value('WindowBits'); # spent 35.4ms making 8231 calls to Compress::Raw::Zlib::Parameters::value, avg 4µs/call | ||
416 | 8231 | 18.1ms | $windowBits += MAX_WBITS() # spent 18.1ms making 8231 calls to Compress::Raw::Zlib::__ANON__[Compress/Raw/Zlib.pm:80], avg 2µs/call | ||
417 | if ($windowBits & MAX_WBITS()) == 0 ; | ||||
418 | |||||
419 | 24693 | 150ms | _inflateInit($flags, $windowBits, $got->value('Bufsize'), # spent 77.7ms making 8231 calls to Compress::Raw::Zlib::_inflateInit, avg 9µs/call
# spent 72.5ms making 16462 calls to Compress::Raw::Zlib::Parameters::value, avg 4µs/call | ||
420 | $got->value('Dictionary')) ; | ||||
421 | } | ||||
422 | |||||
423 | sub Compress::Raw::Zlib::InflateScan::new | ||||
424 | { | ||||
425 | my $pkg = shift ; | ||||
426 | my ($got) = ParseParameters(0, | ||||
427 | { | ||||
428 | 'CRC32' => [1, 1, Parse_boolean, 0], | ||||
429 | 'ADLER32' => [1, 1, Parse_boolean, 0], | ||||
430 | 'Bufsize' => [1, 1, Parse_unsigned, 4096], | ||||
431 | |||||
432 | 'WindowBits' => [1, 1, Parse_signed, -MAX_WBITS()], | ||||
433 | 'Dictionary' => [1, 1, Parse_any, ""], | ||||
434 | }, @_) ; | ||||
435 | |||||
436 | |||||
437 | croak "Compress::Raw::Zlib::InflateScan::new: Bufsize must be >= 1, you specified " . | ||||
438 | $got->value('Bufsize') | ||||
439 | unless $got->value('Bufsize') >= 1; | ||||
440 | |||||
441 | my $flags = 0 ; | ||||
442 | #$flags |= FLAG_APPEND if $got->value('AppendOutput') ; | ||||
443 | $flags |= FLAG_CRC if $got->value('CRC32') ; | ||||
444 | $flags |= FLAG_ADLER if $got->value('ADLER32') ; | ||||
445 | #$flags |= FLAG_CONSUME_INPUT if $got->value('ConsumeInput') ; | ||||
446 | |||||
447 | _inflateScanInit($flags, $got->value('WindowBits'), $got->value('Bufsize'), | ||||
448 | '') ; | ||||
449 | } | ||||
450 | |||||
451 | sub Compress::Raw::Zlib::inflateScanStream::createDeflateStream | ||||
452 | { | ||||
453 | my $pkg = shift ; | ||||
454 | my ($got) = ParseParameters(0, | ||||
455 | { | ||||
456 | 'AppendOutput' => [1, 1, Parse_boolean, 0], | ||||
457 | 'CRC32' => [1, 1, Parse_boolean, 0], | ||||
458 | 'ADLER32' => [1, 1, Parse_boolean, 0], | ||||
459 | 'Bufsize' => [1, 1, Parse_unsigned, 4096], | ||||
460 | |||||
461 | 'Level' => [1, 1, Parse_signed, Z_DEFAULT_COMPRESSION()], | ||||
462 | 'Method' => [1, 1, Parse_unsigned, Z_DEFLATED()], | ||||
463 | 'WindowBits' => [1, 1, Parse_signed, - MAX_WBITS()], | ||||
464 | 'MemLevel' => [1, 1, Parse_unsigned, MAX_MEM_LEVEL()], | ||||
465 | 'Strategy' => [1, 1, Parse_unsigned, Z_DEFAULT_STRATEGY()], | ||||
466 | }, @_) ; | ||||
467 | |||||
468 | croak "Compress::Raw::Zlib::InflateScan::createDeflateStream: Bufsize must be >= 1, you specified " . | ||||
469 | $got->value('Bufsize') | ||||
470 | unless $got->value('Bufsize') >= 1; | ||||
471 | |||||
472 | my $flags = 0 ; | ||||
473 | $flags |= FLAG_APPEND if $got->value('AppendOutput') ; | ||||
474 | $flags |= FLAG_CRC if $got->value('CRC32') ; | ||||
475 | $flags |= FLAG_ADLER if $got->value('ADLER32') ; | ||||
476 | |||||
477 | $pkg->_createDeflateStream($flags, | ||||
478 | $got->value('Level'), | ||||
479 | $got->value('Method'), | ||||
480 | $got->value('WindowBits'), | ||||
481 | $got->value('MemLevel'), | ||||
482 | $got->value('Strategy'), | ||||
483 | $got->value('Bufsize'), | ||||
484 | ) ; | ||||
485 | |||||
486 | } | ||||
487 | |||||
488 | sub Compress::Raw::Zlib::inflateScanStream::inflate | ||||
489 | { | ||||
490 | my $self = shift ; | ||||
491 | my $buffer = $_[1]; | ||||
492 | my $eof = $_[2]; | ||||
493 | |||||
494 | my $status = $self->scan(@_); | ||||
495 | |||||
496 | if ($status == Z_OK() && $_[2]) { | ||||
497 | my $byte = ' '; | ||||
498 | |||||
499 | $status = $self->scan(\$byte, $_[1]) ; | ||||
500 | } | ||||
501 | |||||
502 | return $status ; | ||||
503 | } | ||||
504 | |||||
505 | sub Compress::Raw::Zlib::deflateStream::deflateParams | ||||
506 | { | ||||
507 | my $self = shift ; | ||||
508 | my ($got) = ParseParameters(0, { | ||||
509 | 'Level' => [1, 1, Parse_signed, undef], | ||||
510 | 'Strategy' => [1, 1, Parse_unsigned, undef], | ||||
511 | 'Bufsize' => [1, 1, Parse_unsigned, undef], | ||||
512 | }, | ||||
513 | @_) ; | ||||
514 | |||||
515 | croak "Compress::Raw::Zlib::deflateParams needs Level and/or Strategy" | ||||
516 | unless $got->parsed('Level') + $got->parsed('Strategy') + | ||||
517 | $got->parsed('Bufsize'); | ||||
518 | |||||
519 | croak "Compress::Raw::Zlib::Inflate::deflateParams: Bufsize must be >= 1, you specified " . | ||||
520 | $got->value('Bufsize') | ||||
521 | if $got->parsed('Bufsize') && $got->value('Bufsize') <= 1; | ||||
522 | |||||
523 | my $flags = 0; | ||||
524 | $flags |= 1 if $got->parsed('Level') ; | ||||
525 | $flags |= 2 if $got->parsed('Strategy') ; | ||||
526 | $flags |= 4 if $got->parsed('Bufsize') ; | ||||
527 | |||||
528 | $self->_deflateParams($flags, $got->value('Level'), | ||||
529 | $got->value('Strategy'), $got->value('Bufsize')); | ||||
530 | |||||
531 | } | ||||
532 | |||||
533 | |||||
534 | # Autoload methods go after __END__, and are processed by the autosplit program. | ||||
535 | |||||
536 | 1 | 80µs | 1; | ||
537 | __END__ | ||||
sub Compress::Raw::Zlib::CORE:match; # opcode | |||||
sub Compress::Raw::Zlib::CORE:subst; # opcode | |||||
# spent 77.7ms within Compress::Raw::Zlib::_inflateInit which was called 8231 times, avg 9µs/call:
# 8231 times (77.7ms+0s) by Compress::Raw::Zlib::Inflate::new at line 419, avg 9µs/call | |||||
# spent 26µs within Compress::Raw::Zlib::constant which was called 3 times, avg 9µs/call:
# 3 times (26µs+0s) by Compress::Raw::Zlib::AUTOLOAD at line 77, avg 9µs/call | |||||
# spent 1.01ms within Compress::Raw::Zlib::crc32 which was called 137 times, avg 7µs/call:
# 137 times (1.01ms+0s) by Archive::Zip::computeCRC32 at line 303 of Archive/Zip.pm, avg 7µs/call |