Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
| ... | ... |
@@ -48,10 +48,10 @@ require ( |
| 48 | 48 |
github.com/hashicorp/serf v0.8.2 |
| 49 | 49 |
github.com/imdario/mergo v0.3.12 |
| 50 | 50 |
github.com/ishidawataru/sctp v0.0.0-20210226210310-f2269e66cdee |
| 51 |
- github.com/klauspost/compress v1.15.0 |
|
| 51 |
+ github.com/klauspost/compress v1.15.1 |
|
| 52 | 52 |
github.com/miekg/dns v1.1.27 |
| 53 | 53 |
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible |
| 54 |
- github.com/moby/buildkit v0.10.0 |
|
| 54 |
+ github.com/moby/buildkit v0.10.1-0.20220322023015-8d45bd661230 |
|
| 55 | 55 |
github.com/moby/ipvs v1.0.1 |
| 56 | 56 |
github.com/moby/locker v1.0.1 |
| 57 | 57 |
github.com/moby/sys/mount v0.3.1 |
| ... | ... |
@@ -83,7 +83,7 @@ require ( |
| 83 | 83 |
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 |
| 84 | 84 |
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 |
| 85 | 85 |
google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa |
| 86 |
- google.golang.org/grpc v1.44.0 |
|
| 86 |
+ google.golang.org/grpc v1.45.0 |
|
| 87 | 87 |
gotest.tools/v3 v3.1.0 |
| 88 | 88 |
) |
| 89 | 89 |
|
| ... | ... |
@@ -100,8 +100,8 @@ require ( |
| 100 | 100 |
github.com/container-storage-interface/spec v1.5.0 // indirect |
| 101 | 101 |
github.com/containerd/console v1.0.3 // indirect |
| 102 | 102 |
github.com/containerd/go-runc v1.0.0 // indirect |
| 103 |
- github.com/containerd/stargz-snapshotter v0.11.2 // indirect |
|
| 104 |
- github.com/containerd/stargz-snapshotter/estargz v0.11.2 // indirect |
|
| 103 |
+ github.com/containerd/stargz-snapshotter v0.11.3 // indirect |
|
| 104 |
+ github.com/containerd/stargz-snapshotter/estargz v0.11.3 // indirect |
|
| 105 | 105 |
github.com/containerd/ttrpc v1.1.0 // indirect |
| 106 | 106 |
github.com/cyphar/filepath-securejoin v0.2.3 // indirect |
| 107 | 107 |
github.com/dustin/go-humanize v1.0.0 // indirect |
| ... | ... |
@@ -106,6 +106,8 @@ github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdko |
| 106 | 106 |
github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91 h1:vX+gnvBc56EbWYrmlhYbFYRaeikAke1GL84N4BEYOFE= |
| 107 | 107 |
github.com/RackSec/srslog v0.0.0-20180709174129-a4725f04ec91/go.mod h1:cDLGBht23g0XQdLjzn6xOGXDkLK182YfINAaZEQLCHQ= |
| 108 | 108 |
github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= |
| 109 |
+github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= |
|
| 110 |
+github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= |
|
| 109 | 111 |
github.com/akutz/gosync v0.1.0 h1:naxPT/aDYDh79PMwM3XmencmNQeYmpNFSZy4ZE9zIW0= |
| 110 | 112 |
github.com/akutz/gosync v0.1.0/go.mod h1:I8I4aiqJI1nqaeYOOB1WS+CgRJVVPqhct9Y4njywM84= |
| 111 | 113 |
github.com/akutz/memconn v0.1.0 h1:NawI0TORU4hcOMsMr11g7vwlCdkYeLKXBcxWu2W/P8A= |
| ... | ... |
@@ -116,6 +118,8 @@ github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk5 |
| 116 | 116 |
github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= |
| 117 | 117 |
github.com/alexflint/go-filemutex v1.1.0/go.mod h1:7P4iRhttt/nUvUOrYIhcpMzv2G6CY9UnI16Z+UJqRyk= |
| 118 | 118 |
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= |
| 119 |
+github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs= |
|
| 120 |
+github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= |
|
| 119 | 121 |
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= |
| 120 | 122 |
github.com/armon/go-metrics v0.0.0-20150106224455-eb0af217e5e9 h1:j0r1R47jEcPk5M3GY3tFbv7q5J6j0Ppler3q4Guh6C0= |
| 121 | 123 |
github.com/armon/go-metrics v0.0.0-20150106224455-eb0af217e5e9/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= |
| ... | ... |
@@ -186,7 +190,6 @@ github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcK |
| 186 | 186 |
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= |
| 187 | 187 |
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= |
| 188 | 188 |
github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= |
| 189 |
-github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= |
|
| 190 | 189 |
github.com/container-storage-interface/spec v1.2.0/go.mod h1:6URME8mwIBbpVyZV93Ce5St17xBiQJQY67NDsuohiy4= |
| 191 | 190 |
github.com/container-storage-interface/spec v1.5.0 h1:lvKxe3uLgqQeVQcrnL2CPQKISoKjTJxojEs9cBk+HXo= |
| 192 | 191 |
github.com/container-storage-interface/spec v1.5.0/go.mod h1:8K96oQNkJ7pFcC2R9Z1ynGGBB1I93kcS6PGg3SsOk8s= |
| ... | ... |
@@ -227,7 +230,6 @@ github.com/containerd/containerd v1.5.0-beta.3/go.mod h1:/wr9AVtEM7x9c+n0+stptlo |
| 227 | 227 |
github.com/containerd/containerd v1.5.0-beta.4/go.mod h1:GmdgZd2zA2GYIBZ0w09ZvgqEq8EfBp/m3lcVZIvPHhI= |
| 228 | 228 |
github.com/containerd/containerd v1.5.0-rc.0/go.mod h1:V/IXoMqNGgBlabz3tHD2TWDoTJseu1FGOKuoA4nNb2s= |
| 229 | 229 |
github.com/containerd/containerd v1.5.1/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= |
| 230 |
-github.com/containerd/containerd v1.5.2/go.mod h1:0DOxVqwDy2iZvrZp2JUx/E+hS0UNTVn7dJnIOwtYR4g= |
|
| 231 | 230 |
github.com/containerd/containerd v1.5.7/go.mod h1:gyvv6+ugqY25TiXxcZC3L5yOeYgEw0QMhscqVp1AR9c= |
| 232 | 231 |
github.com/containerd/containerd v1.5.8/go.mod h1:YdFSv5bTFLpG2HIYmfqDpSYYTDX+mc5qtSuYx1YUb/s= |
| 233 | 232 |
github.com/containerd/containerd v1.6.1 h1:oa2uY0/0G+JX4X7hpGCYvkp9FjUancz56kSNnb1sG3o= |
| ... | ... |
@@ -248,7 +250,6 @@ github.com/containerd/fifo v0.0.0-20201026212402-0724c46b320c/go.mod h1:jPQ2IAeZ |
| 248 | 248 |
github.com/containerd/fifo v0.0.0-20210316144830-115abcc95a1d/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= |
| 249 | 249 |
github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= |
| 250 | 250 |
github.com/containerd/fifo v1.0.0/go.mod h1:ocF/ME1SX5b1AOlWi9r677YJmCPSwwWnQ9O123vzpE4= |
| 251 |
-github.com/containerd/fuse-overlayfs-snapshotter v1.0.2/go.mod h1:nRZceC8a7dRm3Ao6cJAwuJWPFiBPaibHiFntRUnzhwU= |
|
| 252 | 251 |
github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= |
| 253 | 252 |
github.com/containerd/go-cni v1.0.2/go.mod h1:nrNABBHzu0ZwCug9Ije8hL2xBCYh/pjfMb1aZGrrohk= |
| 254 | 253 |
github.com/containerd/go-cni v1.1.0/go.mod h1:Rflh2EJ/++BA2/vY5ao3K6WJRR/bZKsX123aPk+kUtA= |
| ... | ... |
@@ -267,9 +268,11 @@ github.com/containerd/imgcrypt v1.1.3/go.mod h1:/TPA1GIDXMzbj01yd8pIbQiLdQxed5ue |
| 267 | 267 |
github.com/containerd/nri v0.0.0-20201007170849-eb1350a75164/go.mod h1:+2wGSDGFYfE5+So4M5syatU0N0f0LbWpuqyMi4/BE8c= |
| 268 | 268 |
github.com/containerd/nri v0.0.0-20210316161719-dbaa18c31c14/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= |
| 269 | 269 |
github.com/containerd/nri v0.1.0/go.mod h1:lmxnXF6oMkbqs39FiCt1s0R2HSMhcLel9vNL3m4AaeY= |
| 270 |
-github.com/containerd/stargz-snapshotter v0.6.4/go.mod h1:1t0SF1gAHJhCSftWKDLVitvfF3c2qhL5hymG7C50wto= |
|
| 270 |
+github.com/containerd/stargz-snapshotter v0.11.3 h1:D3PoF563XmOBdtfx2G6AkhbHueqwIVPBFn2mrsWLa3w= |
|
| 271 |
+github.com/containerd/stargz-snapshotter v0.11.3/go.mod h1:2j2EAUyvrLU4D9unYlTIwGhDKQIk74KJ9E71lJsQCVM= |
|
| 271 | 272 |
github.com/containerd/stargz-snapshotter/estargz v0.4.1/go.mod h1:x7Q9dg9QYb4+ELgxmo4gBUeJB0tl5dqH1Sdz0nJU1QM= |
| 272 |
-github.com/containerd/stargz-snapshotter/estargz v0.6.4/go.mod h1:83VWDqHnurTKliEB0YvWMiCfLDwv4Cjj1X9Vk98GJZw= |
|
| 273 |
+github.com/containerd/stargz-snapshotter/estargz v0.11.3 h1:k2kN16Px6LYuv++qFqK+JTcYqc8bEVxzGpf8/gFBL5M= |
|
| 274 |
+github.com/containerd/stargz-snapshotter/estargz v0.11.3/go.mod h1:7vRJIcImfY8bpifnMjt+HTJoQxASq7T28MYbP15/Nf0= |
|
| 273 | 275 |
github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= |
| 274 | 276 |
github.com/containerd/ttrpc v0.0.0-20190828172938-92c8520ef9f8/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= |
| 275 | 277 |
github.com/containerd/ttrpc v0.0.0-20191028202541-4f1b8fe65a5c/go.mod h1:LPm1u0xBw8r8NOKoOdNMeVHSawSsltak+Ihv+etqsE8= |
| ... | ... |
@@ -326,6 +329,7 @@ github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1S |
| 326 | 326 |
github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= |
| 327 | 327 |
github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= |
| 328 | 328 |
github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= |
| 329 |
+github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= |
|
| 329 | 330 |
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
| 330 | 331 |
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= |
| 331 | 332 |
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= |
| ... | ... |
@@ -336,19 +340,17 @@ github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11 |
| 336 | 336 |
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= |
| 337 | 337 |
github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= |
| 338 | 338 |
github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= |
| 339 |
-github.com/docker/cli v20.10.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= |
|
| 340 |
-github.com/docker/cli v20.10.7+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= |
|
| 339 |
+github.com/docker/cli v20.10.13+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= |
|
| 341 | 340 |
github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= |
| 342 | 341 |
github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= |
| 343 | 342 |
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= |
| 344 | 343 |
github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= |
| 345 | 344 |
github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= |
| 346 | 345 |
github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= |
| 347 |
-github.com/docker/docker v20.10.3-0.20210609071616-4c2ec79bf2a8+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= |
|
| 348 | 346 |
github.com/docker/docker v20.10.3-0.20211208011758-87521affb077+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= |
| 349 |
-github.com/docker/docker v20.10.6+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= |
|
| 350 | 347 |
github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= |
| 351 | 348 |
github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= |
| 349 |
+github.com/docker/docker-credential-helpers v0.6.4/go.mod h1:ofX3UI0Gz1TteYBjtgs07O36Pyasyp66D2uKT7H8W1c= |
|
| 352 | 350 |
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= |
| 353 | 351 |
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= |
| 354 | 352 |
github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= |
| ... | ... |
@@ -387,9 +389,12 @@ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go. |
| 387 | 387 |
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= |
| 388 | 388 |
github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= |
| 389 | 389 |
github.com/evanphx/json-patch v4.11.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= |
| 390 |
+github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= |
|
| 390 | 391 |
github.com/fanliao/go-promise v0.0.0-20141029170127-1890db352a72/go.mod h1:PjfxuH4FZdUyfMdtBio2lsRr1AKEaVPwelzuHuh8Lqc= |
| 391 | 392 |
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= |
| 392 | 393 |
github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= |
| 394 |
+github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= |
|
| 395 |
+github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= |
|
| 393 | 396 |
github.com/fernet/fernet-go v0.0.0-20180830025343-9eac43b88a5e h1:P10tZmVD2XclAaT9l7OduMH1OLFzTa1wUuUqHZnEdI0= |
| 394 | 397 |
github.com/fernet/fernet-go v0.0.0-20180830025343-9eac43b88a5e/go.mod h1:2H9hjfbpSMHwY503FclkV/lZTBh2YlOmLLSda12uL8c= |
| 395 | 398 |
github.com/fluent/fluent-logger-golang v1.9.0 h1:zUdY44CHX2oIUc7VTNZc+4m+ORuO/mldQDA7czhWXEg= |
| ... | ... |
@@ -404,6 +409,7 @@ github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWp |
| 404 | 404 |
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= |
| 405 | 405 |
github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= |
| 406 | 406 |
github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= |
| 407 |
+github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= |
|
| 407 | 408 |
github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= |
| 408 | 409 |
github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= |
| 409 | 410 |
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= |
| ... | ... |
@@ -421,8 +427,10 @@ github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTg |
| 421 | 421 |
github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= |
| 422 | 422 |
github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= |
| 423 | 423 |
github.com/go-logr/logr v1.2.1/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= |
| 424 |
+github.com/go-logr/logr v1.2.2 h1:ahHml/yUpnlb96Rp8HCvtYVPY8ZYpxq3g7UYchIYwbs= |
|
| 424 | 425 |
github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= |
| 425 | 426 |
github.com/go-logr/stdr v1.2.0/go.mod h1:YkVgnZu1ZjjL7xTxrfm/LLZBfkhTqSR1ydtm6jTKKwI= |
| 427 |
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= |
|
| 426 | 428 |
github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= |
| 427 | 429 |
github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= |
| 428 | 430 |
github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= |
| ... | ... |
@@ -448,11 +456,12 @@ github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x |
| 448 | 448 |
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= |
| 449 | 449 |
github.com/godbus/dbus/v5 v5.0.6 h1:mkgN1ofwASrYnJ5W6U/BxG15eXXXjirgZc7CLqkcaro= |
| 450 | 450 |
github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= |
| 451 |
-github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= |
|
| 452 | 451 |
github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= |
| 453 | 452 |
github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= |
| 454 |
-github.com/gogo/googleapis v1.3.2 h1:kX1es4djPJrsDhY7aZKJy7aZasdcB5oSOEphMjSB53c= |
|
| 455 |
-github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= |
|
| 453 |
+github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= |
|
| 454 |
+github.com/gogo/googleapis v1.4.0/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= |
|
| 455 |
+github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= |
|
| 456 |
+github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= |
|
| 456 | 457 |
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= |
| 457 | 458 |
github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= |
| 458 | 459 |
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= |
| ... | ... |
@@ -566,18 +575,15 @@ github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/ad |
| 566 | 566 |
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= |
| 567 | 567 |
github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= |
| 568 | 568 |
github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= |
| 569 |
-github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= |
|
| 570 | 569 |
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= |
| 571 | 570 |
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= |
| 572 | 571 |
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= |
| 573 | 572 |
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= |
| 574 | 573 |
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= |
| 575 | 574 |
github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= |
| 575 |
+github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= |
|
| 576 | 576 |
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= |
| 577 |
-github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645 h1:MJG/KsmcqMwFAkh8mTnAwhyKoB+sTAnY4CACC110tbU= |
|
| 578 |
-github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= |
|
| 579 |
-github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= |
|
| 580 |
-github.com/hanwen/go-fuse/v2 v2.1.0/go.mod h1:oRyA5eK+pvJyv5otpO/DgccS8y/RvYMaO00GgRLGryc= |
|
| 577 |
+github.com/hanwen/go-fuse/v2 v2.1.1-0.20220112183258-f57e95bda82d/go.mod h1:B1nGE/6RBFyBRC1RRnf23UpwCdyJ31eukw34oAKukAc= |
|
| 581 | 578 |
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= |
| 582 | 579 |
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= |
| 583 | 580 |
github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= |
| ... | ... |
@@ -585,17 +591,25 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv |
| 585 | 585 |
github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= |
| 586 | 586 |
github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= |
| 587 | 587 |
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= |
| 588 |
+github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= |
|
| 589 |
+github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= |
|
| 590 |
+github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= |
|
| 591 |
+github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= |
|
| 588 | 592 |
github.com/hashicorp/go-memdb v0.0.0-20161216180745-cb9a474f84cc h1:+a6OGop8lqksGF5BgpRVghkeR3vy2HDa7lDKx6UvSRE= |
| 589 | 593 |
github.com/hashicorp/go-memdb v0.0.0-20161216180745-cb9a474f84cc/go.mod h1:kbfItVoBJwCfKXDXN4YoAXjxcFVZ7MRrJzyTX6H4giE= |
| 590 | 594 |
github.com/hashicorp/go-msgpack v0.0.0-20140221154404-71c2886f5a67 h1:uUGuA3Cnfp7qbFpIMOCDVz3TaWIF4lLYM8PE3YHpoA4= |
| 591 | 595 |
github.com/hashicorp/go-msgpack v0.0.0-20140221154404-71c2886f5a67/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= |
| 592 | 596 |
github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= |
| 593 | 597 |
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= |
| 598 |
+github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= |
|
| 594 | 599 |
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= |
| 595 | 600 |
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= |
| 596 | 601 |
github.com/hashicorp/go-sockaddr v1.0.2 h1:ztczhD1jLxIRjVejw8gFomI1BQZOe2WoVOu0SyteCQc= |
| 597 | 602 |
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A= |
| 603 |
+github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= |
|
| 604 |
+github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= |
|
| 598 | 605 |
github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= |
| 606 |
+github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= |
|
| 599 | 607 |
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= |
| 600 | 608 |
github.com/hashicorp/golang-lru v0.5.3 h1:YPkqC67at8FYaadspW/6uE0COsBxS2656RLEr8Bppgk= |
| 601 | 609 |
github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= |
| ... | ... |
@@ -604,8 +618,6 @@ github.com/hashicorp/memberlist v0.2.4 h1:OOhYzSvFnkFQXm1ysE8RjXTHsqSRDyP4emusC9 |
| 604 | 604 |
github.com/hashicorp/memberlist v0.2.4/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= |
| 605 | 605 |
github.com/hashicorp/serf v0.7.1-0.20160317193612-598c54895cc5 h1:c0ibg28HTeX1LYjzYBkMzdnXuPn+iGx3huEB//PkB08= |
| 606 | 606 |
github.com/hashicorp/serf v0.7.1-0.20160317193612-598c54895cc5/go.mod h1:h/Ru6tmZazX7WO/GDmwdpS975F019L4t5ng5IgwbNrE= |
| 607 |
-github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c h1:nQcv325vxv2fFHJsOt53eSRf1eINt6vOdYUFfXs4rgk= |
|
| 608 |
-github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c/go.mod h1:fHzc09UnyJyqyW+bFuq864eh+wC7dj65aXmXLRe5to0= |
|
| 609 | 607 |
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= |
| 610 | 608 |
github.com/hugelgupf/socketpair v0.0.0-20190730060125-05d35a94e714/go.mod h1:2Goc3h8EklBH5mspfHFxBnEoURQCGzQQH1ga9Myjvis= |
| 611 | 609 |
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= |
| ... | ... |
@@ -624,7 +636,6 @@ github.com/ishidawataru/sctp v0.0.0-20210226210310-f2269e66cdee h1:PAXLXk1heNZ5y |
| 624 | 624 |
github.com/ishidawataru/sctp v0.0.0-20210226210310-f2269e66cdee/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= |
| 625 | 625 |
github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= |
| 626 | 626 |
github.com/j-keck/arping v1.0.2/go.mod h1:aJbELhR92bSk7tp79AWM/ftfc90EfEi2bQJrbBFOsPw= |
| 627 |
-github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea/go.mod h1:QMdK4dGB3YhEW2BmA1wgGpPYI3HZy/5gD705PXKUVSg= |
|
| 628 | 627 |
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= |
| 629 | 628 |
github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= |
| 630 | 629 |
github.com/jmespath/go-jmespath v0.3.0 h1:OS12ieG61fsCg5+qLJ+SsW9NicxNkg3b25OyT2yCeUc= |
| ... | ... |
@@ -655,9 +666,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI |
| 655 | 655 |
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= |
| 656 | 656 |
github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= |
| 657 | 657 |
github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= |
| 658 |
-github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= |
|
| 659 |
-github.com/klauspost/compress v1.14.3 h1:DQv1WP+iS4srNjibdnHtqu8JNWCDMluj5NzPnFJsnvk= |
|
| 660 |
-github.com/klauspost/compress v1.14.3/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= |
|
| 658 |
+github.com/klauspost/compress v1.15.1 h1:y9FcTHGyrebwfP0ZZqFiaxTaiDnUrGkJkI+f583BL1A= |
|
| 659 |
+github.com/klauspost/compress v1.15.1/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= |
|
| 661 | 660 |
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
| 662 | 661 |
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
| 663 | 662 |
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= |
| ... | ... |
@@ -709,18 +719,17 @@ github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk |
| 709 | 709 |
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= |
| 710 | 710 |
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= |
| 711 | 711 |
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= |
| 712 |
-github.com/mitchellh/hashstructure v1.0.0 h1:ZkRJX1CyOoTkar7p/mLS5TZU4nJ1Rn/F8u9dGS02Q3Y= |
|
| 713 |
-github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= |
|
| 712 |
+github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= |
|
| 713 |
+github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= |
|
| 714 | 714 |
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= |
| 715 | 715 |
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= |
| 716 |
-github.com/moby/buildkit v0.8.2-0.20210615162540-9f254e18360a h1:1KdH8CRFygJ8oj8l8wD2TUy3hGaGUzXO2h6gyQKg780= |
|
| 717 |
-github.com/moby/buildkit v0.8.2-0.20210615162540-9f254e18360a/go.mod h1:OieevFziOisPBM43fLKG+lPcVp9XW+BlUiws8VIpG6k= |
|
| 716 |
+github.com/moby/buildkit v0.10.1-0.20220322023015-8d45bd661230 h1:BCtLnSm75URTY0vJCoYbbWOlyLZyva/h+TWnlah6DlI= |
|
| 717 |
+github.com/moby/buildkit v0.10.1-0.20220322023015-8d45bd661230/go.mod h1:6LE3enqzsRxy9K5oi5rV9UCrQZ834zGToFwGDZhAF3A= |
|
| 718 | 718 |
github.com/moby/ipvs v1.0.1 h1:aoZ7fhLTXgDbzVrAnvV+XbKOU8kOET7B3+xULDF/1o0= |
| 719 | 719 |
github.com/moby/ipvs v1.0.1/go.mod h1:2pngiyseZbIKXNv7hsKj3O9UEz30c53MT9005gt2hxQ= |
| 720 | 720 |
github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= |
| 721 | 721 |
github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= |
| 722 | 722 |
github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= |
| 723 |
-github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM= |
|
| 724 | 723 |
github.com/moby/sys/mount v0.3.1 h1:RX1K0x95oR8j5P1YefKDt7tE1C2kCCixV0H8Aza3GaI= |
| 725 | 724 |
github.com/moby/sys/mount v0.3.1/go.mod h1:6IZknFQiqjLpwuYJD5Zk0qYEuJiws36M88MIXnZHya0= |
| 726 | 725 |
github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= |
| ... | ... |
@@ -735,7 +744,6 @@ github.com/moby/sys/symlink v0.1.0/go.mod h1:GGDODQmbFOjFsXvfLVn3+ZRxkch54RkSiGq |
| 735 | 735 |
github.com/moby/sys/symlink v0.2.0 h1:tk1rOM+Ljp0nFmfOIBtlV3rTDlWOwFRhjEeAhZB0nZc= |
| 736 | 736 |
github.com/moby/sys/symlink v0.2.0/go.mod h1:7uZVF2dqJjG/NsClqul95CqKOBRQyYSNnJ6BMgR/gFs= |
| 737 | 737 |
github.com/moby/term v0.0.0-20200312100748-672ec06f55cd/go.mod h1:DdlQx2hp0Ss5/fLikoLlEeIYiATotOjgB//nb973jeo= |
| 738 |
-github.com/moby/term v0.0.0-20201110203204-bea5bbe245bf/go.mod h1:FBS0z0QWA44HXygs7VXDUOGoN/1TV3RuWkLO04am3wc= |
|
| 739 | 738 |
github.com/moby/term v0.0.0-20210610120745-9d4ed1856297/go.mod h1:vgPCkQMyxTZ7IDy8SXRufE172gr8+K/JE/7hHFxHW3A= |
| 740 | 739 |
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 h1:dcztxKSvZ4Id8iPpHERQBbIJfabdt4wUm5qy3wOL2Zc= |
| 741 | 740 |
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6/go.mod h1:E2VnQOmVuvZB6UYnnDB0qG5Nq/1tD9acaOpo6xmt0Kw= |
| ... | ... |
@@ -792,9 +800,8 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 |
| 792 | 792 |
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= |
| 793 | 793 |
github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= |
| 794 | 794 |
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= |
| 795 |
+github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5 h1:q37d91F6BO4Jp1UqWiun0dUFYaqv6WsKTLTCaWv+8LY= |
|
| 795 | 796 |
github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= |
| 796 |
-github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= |
|
| 797 |
-github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= |
|
| 798 | 797 |
github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= |
| 799 | 798 |
github.com/opencontainers/runc v0.1.1/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= |
| 800 | 799 |
github.com/opencontainers/runc v1.0.0-rc8.0.20190926000215-3e425f80a8c9/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= |
| ... | ... |
@@ -816,15 +823,10 @@ github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3 |
| 816 | 816 |
github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= |
| 817 | 817 |
github.com/opencontainers/selinux v1.10.0 h1:rAiKF8hTcgLI3w0DHm6i0ylVVcOrlgR1kK99DRLDhyU= |
| 818 | 818 |
github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= |
| 819 |
-github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w= |
|
| 820 |
-github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= |
|
| 821 | 819 |
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= |
| 822 |
-github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= |
|
| 823 |
-github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= |
|
| 824 | 820 |
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= |
| 825 | 821 |
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= |
| 826 | 822 |
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= |
| 827 |
-github.com/pelletier/go-toml v1.9.1/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= |
|
| 828 | 823 |
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= |
| 829 | 824 |
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= |
| 830 | 825 |
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= |
| ... | ... |
@@ -837,7 +839,6 @@ github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV |
| 837 | 837 |
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
| 838 | 838 |
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= |
| 839 | 839 |
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= |
| 840 |
-github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= |
|
| 841 | 840 |
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= |
| 842 | 841 |
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= |
| 843 | 842 |
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= |
| ... | ... |
@@ -852,8 +853,9 @@ github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7q |
| 852 | 852 |
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= |
| 853 | 853 |
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= |
| 854 | 854 |
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= |
| 855 |
-github.com/prometheus/common v0.30.0 h1:JEkYlQnpzrzQFxi6gnukFPdQ+ac82oRhzMcIduJu/Ug= |
|
| 856 | 855 |
github.com/prometheus/common v0.30.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= |
| 856 |
+github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= |
|
| 857 |
+github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= |
|
| 857 | 858 |
github.com/prometheus/procfs v0.0.11 h1:DhHlBtkHWPYi8O2y31JkK0TF+DGM+51OopZjH/Ia5qI= |
| 858 | 859 |
github.com/prometheus/procfs v0.0.11/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= |
| 859 | 860 |
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= |
| ... | ... |
@@ -861,7 +863,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L |
| 861 | 861 |
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= |
| 862 | 862 |
github.com/rootless-containers/rootlesskit v0.14.6 h1:5kvJK6eeUtWZz1mYegu5S7DHOahq93K+jbc/mz+hbFQ= |
| 863 | 863 |
github.com/rootless-containers/rootlesskit v0.14.6/go.mod h1:uHPTRoPO6ZdOl2q99ZKOK14PJAwepfNKh6hV57AOZYQ= |
| 864 |
-github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= |
|
| 864 |
+github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= |
|
| 865 | 865 |
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= |
| 866 | 866 |
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= |
| 867 | 867 |
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= |
| ... | ... |
@@ -874,7 +876,6 @@ github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUt |
| 874 | 874 |
github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= |
| 875 | 875 |
github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= |
| 876 | 876 |
github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= |
| 877 |
-github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= |
|
| 878 | 877 |
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= |
| 879 | 878 |
github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= |
| 880 | 879 |
github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= |
| ... | ... |
@@ -938,17 +939,14 @@ github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW |
| 938 | 938 |
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= |
| 939 | 939 |
github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= |
| 940 | 940 |
github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= |
| 941 |
-github.com/tonistiigi/fsutil v0.0.0-20210609172227-d72af97c0eaf/go.mod h1:lJAxK//iyZ3yGbQswdrPTxugZIDM7sd4bEsD0x3XMHk= |
|
| 942 | 941 |
github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274 h1:wbyZxD6IPFp0sl5uscMOJRsz5UKGFiNiD16e+MVfKZY= |
| 943 | 942 |
github.com/tonistiigi/fsutil v0.0.0-20220115021204-b19f7f9cb274/go.mod h1:oPAfvw32vlUJSjyDcQ3Bu0nb2ON2B+G0dtVN/SZNJiA= |
| 944 |
-github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe h1:pd7hrFSqUPxYS9IB+UMG1AB/8EXGXo17ssx0bSQ5L6Y= |
|
| 945 |
-github.com/tonistiigi/go-immutable-radix v0.0.0-20170803185627-826af9ccf0fe/go.mod h1:/+MCh11CJf2oz0BXmlmqyopK/ad1rKkcOXPoYuPCJYU= |
|
| 943 |
+github.com/tonistiigi/go-archvariant v1.0.0 h1:5LC1eDWiBNflnTF1prCiX09yfNHIxDC/aukdhCdTyb0= |
|
| 944 |
+github.com/tonistiigi/go-archvariant v1.0.0/go.mod h1:TxFmO5VS6vMq2kvs3ht04iPXtu2rUT/erOnGFYfk5Ho= |
|
| 946 | 945 |
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= |
| 947 | 946 |
github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= |
| 948 | 947 |
github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM= |
| 949 | 948 |
github.com/u-root/uio v0.0.0-20210528114334-82958018845c/go.mod h1:LpEX5FO/cB+WF4TYGY1V5qktpaZLkKkSegbr0V4eYXA= |
| 950 |
-github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= |
|
| 951 |
-github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= |
|
| 952 | 949 |
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= |
| 953 | 950 |
github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= |
| 954 | 951 |
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= |
| ... | ... |
@@ -1012,24 +1010,47 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= |
| 1012 | 1012 |
go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= |
| 1013 | 1013 |
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= |
| 1014 | 1014 |
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= |
| 1015 |
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0 h1:n9b7AAdbQtQ0k9dm0Dm2/KUcUqtG8i2O15KzNaDze8c= |
|
| 1016 |
+go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.29.0/go.mod h1:LsankqVDx4W+RhZNA5uWarULII/MBhF5qwCYxTuyXjs= |
|
| 1017 |
+go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0 h1:Wjp9vsVSIEyvdiaECfqxY9xBqQ7JaSCGtvHgR4doXZk= |
|
| 1018 |
+go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.29.0/go.mod h1:vHItvsnJtp7ES++nFLLFBzUWny7fJQSvTlxFcqQGUr4= |
|
| 1015 | 1019 |
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= |
| 1020 |
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0 h1:SLme4Porm+UwX0DdHMxlwRt7FzPSE0sys81bet2o0pU= |
|
| 1021 |
+go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.29.0/go.mod h1:tLYsuf2v8fZreBVwp9gVMhefZlLFZaUiNVSq8QxXRII= |
|
| 1016 | 1022 |
go.opentelemetry.io/otel v0.20.0/go.mod h1:Y3ugLH2oa81t5QO+Lty+zXf8zC9L26ax4Nzoxm/dooo= |
| 1017 | 1023 |
go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= |
| 1024 |
+go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= |
|
| 1025 |
+go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= |
|
| 1026 |
+go.opentelemetry.io/otel v1.4.1/go.mod h1:StM6F/0fSwpd8dKWDCdRr7uRvEPYdW0hBSlbdTiUde4= |
|
| 1018 | 1027 |
go.opentelemetry.io/otel/exporters/otlp v0.20.0/go.mod h1:YIieizyaN77rtLJra0buKiNBOm9XQfkPEKBeuhoMwAM= |
| 1019 | 1028 |
go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.3.0/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= |
| 1029 |
+go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= |
|
| 1020 | 1030 |
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.3.0/go.mod h1:hO1KLR7jcKaDDKDkvI9dP/FIhpmna5lkqPUQdEjFAM8= |
| 1031 |
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 h1:WPpPsAAs8I2rA47v5u0558meKmmwm1Dj99ZbqCV8sZ8= |
|
| 1032 |
+go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1/go.mod h1:o5RW5o2pKpJLD5dNTCmjF1DorYwMeFJmb/rKr5sLaa8= |
|
| 1021 | 1033 |
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.3.0/go.mod h1:keUU7UfnwWTWpJ+FWnyqmogPa82nuU5VUANFq49hlMY= |
| 1022 | 1034 |
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.3.0/go.mod h1:QNX1aly8ehqqX1LEa6YniTU7VY9I6R3X/oPxhGdTceE= |
| 1035 |
+go.opentelemetry.io/otel/internal/metric v0.27.0 h1:9dAVGAfFiiEq5NVB9FUJ5et+btbDQAUIJehJ+ikyryk= |
|
| 1036 |
+go.opentelemetry.io/otel/internal/metric v0.27.0/go.mod h1:n1CVxRqKqYZtqyTh9U/onvKapPGv7y/rpyOTI+LFNzw= |
|
| 1023 | 1037 |
go.opentelemetry.io/otel/metric v0.20.0/go.mod h1:598I5tYlH1vzBjn+BTuhzTCSb/9debfNp6R3s7Pr1eU= |
| 1038 |
+go.opentelemetry.io/otel/metric v0.27.0 h1:HhJPsGhJoKRSegPQILFbODU56NS/L1UE4fS1sC5kIwQ= |
|
| 1039 |
+go.opentelemetry.io/otel/metric v0.27.0/go.mod h1:raXDJ7uP2/Jc0nVZWQjJtzoyssOYWu/+pjZqRzfvZ7g= |
|
| 1024 | 1040 |
go.opentelemetry.io/otel/oteltest v0.20.0/go.mod h1:L7bgKf9ZB7qCwT9Up7i9/pn0PWIa9FqQ2IQ8LoxiGnw= |
| 1025 | 1041 |
go.opentelemetry.io/otel/sdk v0.20.0/go.mod h1:g/IcepuwNsoiX5Byy2nNV0ySUF1em498m7hBWC279Yc= |
| 1026 | 1042 |
go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= |
| 1043 |
+go.opentelemetry.io/otel/sdk v1.4.1 h1:J7EaW71E0v87qflB4cDolaqq3AcujGrtyIPGQoZOB0Y= |
|
| 1044 |
+go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= |
|
| 1027 | 1045 |
go.opentelemetry.io/otel/sdk/export/metric v0.20.0/go.mod h1:h7RBNMsDJ5pmI1zExLi+bJK+Dr8NQCh0qGhm1KDnNlE= |
| 1028 | 1046 |
go.opentelemetry.io/otel/sdk/metric v0.20.0/go.mod h1:knxiS8Xd4E/N+ZqKmUPf3gTTZ4/0TjTXukfxjzSTpHE= |
| 1029 | 1047 |
go.opentelemetry.io/otel/trace v0.20.0/go.mod h1:6GjCW8zgDjwGHGa6GkyeB8+/5vjT16gUEi0Nf1iBdgw= |
| 1030 | 1048 |
go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= |
| 1049 |
+go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= |
|
| 1050 |
+go.opentelemetry.io/otel/trace v1.4.1 h1:O+16qcdTrT7zxv2J6GejTPFinSwA++cYerC5iSiF8EQ= |
|
| 1051 |
+go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= |
|
| 1031 | 1052 |
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= |
| 1032 | 1053 |
go.opentelemetry.io/proto/otlp v0.11.0/go.mod h1:QpEjXPrNQzrFDZgoTo49dgHR9RYRSrg3NAKnUGl9YpQ= |
| 1054 |
+go.opentelemetry.io/proto/otlp v0.12.0 h1:CMJ/3Wp7iOWES+CYLfnBv+DVmPbB+kmy9PJ92XvlR6c= |
|
| 1055 |
+go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= |
|
| 1033 | 1056 |
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= |
| 1034 | 1057 |
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= |
| 1035 | 1058 |
go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= |
| ... | ... |
@@ -1522,8 +1543,10 @@ google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD |
| 1522 | 1522 |
google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= |
| 1523 | 1523 |
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= |
| 1524 | 1524 |
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= |
| 1525 |
-google.golang.org/grpc v1.43.0 h1:Eeu7bZtDZ2DpRCsLhUlcrLnvYaMK1Gz86a+hMVvELmM= |
|
| 1526 | 1525 |
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= |
| 1526 |
+google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= |
|
| 1527 |
+google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= |
|
| 1528 |
+google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= |
|
| 1527 | 1529 |
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= |
| 1528 | 1530 |
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= |
| 1529 | 1531 |
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= |
| ... | ... |
@@ -1591,11 +1614,13 @@ k8s.io/api v0.20.1/go.mod h1:KqwcCVogGxQY3nBlRpwt+wpAMF/KjaCc7RpywacvqUo= |
| 1591 | 1591 |
k8s.io/api v0.20.4/go.mod h1:++lNL1AJMkDymriNniQsWRkMDzRaX2Y/POTUi8yvqYQ= |
| 1592 | 1592 |
k8s.io/api v0.20.6/go.mod h1:X9e8Qag6JV/bL5G6bU8sdVRltWKmdHsFUGS3eVndqE8= |
| 1593 | 1593 |
k8s.io/api v0.22.5/go.mod h1:mEhXyLaSD1qTOf40rRiKXkc+2iCem09rWLlFwhCEiAs= |
| 1594 |
+k8s.io/api v0.23.4/go.mod h1:i77F4JfyNNrhOjZF7OwwNJS5Y1S9dpwvb9iYRYRczfI= |
|
| 1594 | 1595 |
k8s.io/apimachinery v0.20.1/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= |
| 1595 | 1596 |
k8s.io/apimachinery v0.20.4/go.mod h1:WlLqWAHZGg07AeltaI0MV5uk1Omp8xaN0JGLY6gkRpU= |
| 1596 | 1597 |
k8s.io/apimachinery v0.20.6/go.mod h1:ejZXtW1Ra6V1O5H8xPBGz+T3+4gfkTCeExAHKU57MAc= |
| 1597 | 1598 |
k8s.io/apimachinery v0.22.1/go.mod h1:O3oNtNadZdeOMxHFVxOreoznohCpy0z6mocxbZr7oJ0= |
| 1598 | 1599 |
k8s.io/apimachinery v0.22.5/go.mod h1:xziclGKwuuJ2RM5/rSFQSYAj0zdbci3DH8kj+WvyN0U= |
| 1600 |
+k8s.io/apimachinery v0.23.4/go.mod h1:BEuFMMBaIbcOqVIJqNZJXGFTP4W6AycEpb5+m/97hrM= |
|
| 1599 | 1601 |
k8s.io/apiserver v0.20.1/go.mod h1:ro5QHeQkgMS7ZGpvf4tSMx6bBOgPfE+f52KwvXfScaU= |
| 1600 | 1602 |
k8s.io/apiserver v0.20.4/go.mod h1:Mc80thBKOyy7tbvFtB4kJv1kbdD0eIH8k8vianJcbFM= |
| 1601 | 1603 |
k8s.io/apiserver v0.20.6/go.mod h1:QIJXNt6i6JB+0YQRNcS0hdRHJlMhflFmsBDeSgT1r8Q= |
| ... | ... |
@@ -1604,6 +1629,7 @@ k8s.io/client-go v0.20.1/go.mod h1:/zcHdt1TeWSd5HoUe6elJmHSQ6uLLgp4bIJHVEuy+/Y= |
| 1604 | 1604 |
k8s.io/client-go v0.20.4/go.mod h1:LiMv25ND1gLUdBeYxBIwKpkSC5IsozMMmOOeSJboP+k= |
| 1605 | 1605 |
k8s.io/client-go v0.20.6/go.mod h1:nNQMnOvEUEsOzRRFIIkdmYOjAZrC8bgq0ExboWSU1I0= |
| 1606 | 1606 |
k8s.io/client-go v0.22.5/go.mod h1:cs6yf/61q2T1SdQL5Rdcjg9J1ElXSwbjSrW2vFImM4Y= |
| 1607 |
+k8s.io/client-go v0.23.4/go.mod h1:PKnIL4pqLuvYUK1WU7RLTMYKPiIh7MYShLshtRY9cj0= |
|
| 1607 | 1608 |
k8s.io/code-generator v0.19.7/go.mod h1:lwEq3YnLYb/7uVXLorOJfxg+cUu2oihFhHZ0n9NIla0= |
| 1608 | 1609 |
k8s.io/component-base v0.20.1/go.mod h1:guxkoJnNoh8LNrbtiQOlyp2Y2XFCZQmrcg2n/DeYNLk= |
| 1609 | 1610 |
k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGwgjI= |
| ... | ... |
@@ -1614,9 +1640,11 @@ k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= |
| 1614 | 1614 |
k8s.io/cri-api v0.20.4/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= |
| 1615 | 1615 |
k8s.io/cri-api v0.20.6/go.mod h1:ew44AjNXwyn1s0U4xCKGodU7J1HzBeZ1MpGrpa5r8Yc= |
| 1616 | 1616 |
k8s.io/cri-api v0.23.1/go.mod h1:REJE3PSU0h/LOV1APBrupxrEJqnoxZC8KWzkBUHwrK4= |
| 1617 |
+k8s.io/cri-api v0.24.0-alpha.3/go.mod h1:c/NLI5Zdyup5+oEYqFO2IE32ptofNiZpS1nL2y51gAg= |
|
| 1617 | 1618 |
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= |
| 1618 | 1619 |
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= |
| 1619 | 1620 |
k8s.io/gengo v0.0.0-20201113003025-83324d819ded/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= |
| 1621 |
+k8s.io/gengo v0.0.0-20210813121822-485abfe95c7c/go.mod h1:FiNAH4ZV3gBg2Kwh89tzAEV2be7d5xI0vBa/VySYy3E= |
|
| 1620 | 1622 |
k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= |
| 1621 | 1623 |
k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= |
| 1622 | 1624 |
k8s.io/klog/v2 v2.4.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= |
| ... | ... |
@@ -1626,10 +1654,13 @@ k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H |
| 1626 | 1626 |
k8s.io/kube-openapi v0.0.0-20201113171705-d219536bb9fd/go.mod h1:WOJ3KddDSol4tAGcJo0Tvi+dK12EcqSLqcWsryKMpfM= |
| 1627 | 1627 |
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= |
| 1628 | 1628 |
k8s.io/kube-openapi v0.0.0-20211109043538-20434351676c/go.mod h1:vHXdDvt9+2spS2Rx9ql3I8tycm3H9FDfdUoIuKCefvw= |
| 1629 |
+k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65/go.mod h1:sX9MT8g7NVZM5lVL/j8QyCCJe8YSMW30QvGZWaCIDIk= |
|
| 1629 | 1630 |
k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= |
| 1630 | 1631 |
k8s.io/utils v0.0.0-20201110183641-67b214c5f920/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= |
| 1632 |
+k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= |
|
| 1631 | 1633 |
k8s.io/utils v0.0.0-20210819203725-bdf08cb9a70a/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= |
| 1632 | 1634 |
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= |
| 1635 |
+k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= |
|
| 1633 | 1636 |
labix.org/v2/mgo v0.0.0-20140701140051-000000000287 h1:L0cnkNl4TfAXzvdrqsYEmxOHOCv2p5I3taaReO8BWFs= |
| 1634 | 1637 |
labix.org/v2/mgo v0.0.0-20140701140051-000000000287/go.mod h1:Lg7AYkt1uXJoR9oeSZ3W/8IXLdvOfIITgZnommstyz4= |
| 1635 | 1638 |
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= |
| ... | ... |
@@ -1638,9 +1669,11 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= |
| 1638 | 1638 |
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.14/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= |
| 1639 | 1639 |
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.15/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= |
| 1640 | 1640 |
sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.0.22/go.mod h1:LEScyzhFmoF5pso/YSeBstl57mOzx9xlU9n85RGrDQg= |
| 1641 |
+sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= |
|
| 1641 | 1642 |
sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= |
| 1642 | 1643 |
sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= |
| 1643 | 1644 |
sigs.k8s.io/structured-merge-diff/v4 v4.0.3/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= |
| 1644 | 1645 |
sigs.k8s.io/structured-merge-diff/v4 v4.1.2/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= |
| 1646 |
+sigs.k8s.io/structured-merge-diff/v4 v4.2.1/go.mod h1:j/nl6xW8vLS49O8YvXW1ocPhZawJtm+Yrr7PPRQ0Vg4= |
|
| 1645 | 1647 |
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= |
| 1646 | 1648 |
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= |
| ... | ... |
@@ -17,6 +17,23 @@ This package provides various compression algorithms. |
| 17 | 17 |
|
| 18 | 18 |
# changelog |
| 19 | 19 |
|
| 20 |
+* Mar 3, 2022 (v1.15.0) |
|
| 21 |
+ * zstd: Refactor decoder by @klauspost in [#498](https://github.com/klauspost/compress/pull/498) |
|
| 22 |
+ * zstd: Add stream encoding without goroutines by @klauspost in [#505](https://github.com/klauspost/compress/pull/505) |
|
| 23 |
+ * huff0: Prevent single blocks exceeding 16 bits by @klauspost in[#507](https://github.com/klauspost/compress/pull/507) |
|
| 24 |
+ * flate: Inline literal emission by @klauspost in [#509](https://github.com/klauspost/compress/pull/509) |
|
| 25 |
+ * gzhttp: Add zstd to transport by @klauspost in [#400](https://github.com/klauspost/compress/pull/400) |
|
| 26 |
+ * gzhttp: Make content-type optional by @klauspost in [#510](https://github.com/klauspost/compress/pull/510) |
|
| 27 |
+ |
|
| 28 |
+<details> |
|
| 29 |
+ <summary>See Details</summary> |
|
| 30 |
+Both compression and decompression now supports "synchronous" stream operations. This means that whenever "concurrency" is set to 1, they will operate without spawning goroutines. |
|
| 31 |
+ |
|
| 32 |
+Stream decompression is now faster on asynchronous, since the goroutine allocation much more effectively splits the workload. On typical streams this will typically use 2 cores fully for decompression. When a stream has finished decoding no goroutines will be left over, so decoders can now safely be pooled and still be garbage collected. |
|
| 33 |
+ |
|
| 34 |
+While the release has been extensively tested, it is recommended to testing when upgrading. |
|
| 35 |
+</details> |
|
| 36 |
+ |
|
| 20 | 37 |
* Feb 22, 2022 (v1.14.4) |
| 21 | 38 |
* flate: Fix rare huffman only (-2) corruption. [#503](https://github.com/klauspost/compress/pull/503) |
| 22 | 39 |
* zip: Update deprecated CreateHeaderRaw to correctly call CreateRaw by @saracen in [#502](https://github.com/klauspost/compress/pull/502) |
| ... | ... |
@@ -165,6 +165,11 @@ func (b *bitReaderShifted) peekBitsFast(n uint8) uint16 {
|
| 165 | 165 |
return uint16(b.value >> ((64 - n) & 63)) |
| 166 | 166 |
} |
| 167 | 167 |
|
| 168 |
+// peekTopBits(n) is equvialent to peekBitFast(64 - n) |
|
| 169 |
+func (b *bitReaderShifted) peekTopBits(n uint8) uint16 {
|
|
| 170 |
+ return uint16(b.value >> n) |
|
| 171 |
+} |
|
| 172 |
+ |
|
| 168 | 173 |
func (b *bitReaderShifted) advance(n uint8) {
|
| 169 | 174 |
b.bitsRead += n |
| 170 | 175 |
b.value <<= n & 63 |
| ... | ... |
@@ -729,189 +729,6 @@ func (d *Decoder) decompress1X8BitExactly(dst, src []byte) ([]byte, error) {
|
| 729 | 729 |
// The length of the supplied input must match the end of a block exactly. |
| 730 | 730 |
// The *capacity* of the dst slice must match the destination size of |
| 731 | 731 |
// the uncompressed data exactly. |
| 732 |
-func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {
|
|
| 733 |
- if len(d.dt.single) == 0 {
|
|
| 734 |
- return nil, errors.New("no table loaded")
|
|
| 735 |
- } |
|
| 736 |
- if len(src) < 6+(4*1) {
|
|
| 737 |
- return nil, errors.New("input too small")
|
|
| 738 |
- } |
|
| 739 |
- if use8BitTables && d.actualTableLog <= 8 {
|
|
| 740 |
- return d.decompress4X8bit(dst, src) |
|
| 741 |
- } |
|
| 742 |
- |
|
| 743 |
- var br [4]bitReaderShifted |
|
| 744 |
- // Decode "jump table" |
|
| 745 |
- start := 6 |
|
| 746 |
- for i := 0; i < 3; i++ {
|
|
| 747 |
- length := int(src[i*2]) | (int(src[i*2+1]) << 8) |
|
| 748 |
- if start+length >= len(src) {
|
|
| 749 |
- return nil, errors.New("truncated input (or invalid offset)")
|
|
| 750 |
- } |
|
| 751 |
- err := br[i].init(src[start : start+length]) |
|
| 752 |
- if err != nil {
|
|
| 753 |
- return nil, err |
|
| 754 |
- } |
|
| 755 |
- start += length |
|
| 756 |
- } |
|
| 757 |
- err := br[3].init(src[start:]) |
|
| 758 |
- if err != nil {
|
|
| 759 |
- return nil, err |
|
| 760 |
- } |
|
| 761 |
- |
|
| 762 |
- // destination, offset to match first output |
|
| 763 |
- dstSize := cap(dst) |
|
| 764 |
- dst = dst[:dstSize] |
|
| 765 |
- out := dst |
|
| 766 |
- dstEvery := (dstSize + 3) / 4 |
|
| 767 |
- |
|
| 768 |
- const tlSize = 1 << tableLogMax |
|
| 769 |
- const tlMask = tlSize - 1 |
|
| 770 |
- single := d.dt.single[:tlSize] |
|
| 771 |
- |
|
| 772 |
- // Use temp table to avoid bound checks/append penalty. |
|
| 773 |
- buf := d.buffer() |
|
| 774 |
- var off uint8 |
|
| 775 |
- var decoded int |
|
| 776 |
- |
|
| 777 |
- // Decode 2 values from each decoder/loop. |
|
| 778 |
- const bufoff = 256 |
|
| 779 |
- for {
|
|
| 780 |
- if br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 {
|
|
| 781 |
- break |
|
| 782 |
- } |
|
| 783 |
- |
|
| 784 |
- {
|
|
| 785 |
- const stream = 0 |
|
| 786 |
- const stream2 = 1 |
|
| 787 |
- br[stream].fillFast() |
|
| 788 |
- br[stream2].fillFast() |
|
| 789 |
- |
|
| 790 |
- val := br[stream].peekBitsFast(d.actualTableLog) |
|
| 791 |
- val2 := br[stream2].peekBitsFast(d.actualTableLog) |
|
| 792 |
- v := single[val&tlMask] |
|
| 793 |
- v2 := single[val2&tlMask] |
|
| 794 |
- br[stream].advance(uint8(v.entry)) |
|
| 795 |
- br[stream2].advance(uint8(v2.entry)) |
|
| 796 |
- buf[stream][off] = uint8(v.entry >> 8) |
|
| 797 |
- buf[stream2][off] = uint8(v2.entry >> 8) |
|
| 798 |
- |
|
| 799 |
- val = br[stream].peekBitsFast(d.actualTableLog) |
|
| 800 |
- val2 = br[stream2].peekBitsFast(d.actualTableLog) |
|
| 801 |
- v = single[val&tlMask] |
|
| 802 |
- v2 = single[val2&tlMask] |
|
| 803 |
- br[stream].advance(uint8(v.entry)) |
|
| 804 |
- br[stream2].advance(uint8(v2.entry)) |
|
| 805 |
- buf[stream][off+1] = uint8(v.entry >> 8) |
|
| 806 |
- buf[stream2][off+1] = uint8(v2.entry >> 8) |
|
| 807 |
- } |
|
| 808 |
- |
|
| 809 |
- {
|
|
| 810 |
- const stream = 2 |
|
| 811 |
- const stream2 = 3 |
|
| 812 |
- br[stream].fillFast() |
|
| 813 |
- br[stream2].fillFast() |
|
| 814 |
- |
|
| 815 |
- val := br[stream].peekBitsFast(d.actualTableLog) |
|
| 816 |
- val2 := br[stream2].peekBitsFast(d.actualTableLog) |
|
| 817 |
- v := single[val&tlMask] |
|
| 818 |
- v2 := single[val2&tlMask] |
|
| 819 |
- br[stream].advance(uint8(v.entry)) |
|
| 820 |
- br[stream2].advance(uint8(v2.entry)) |
|
| 821 |
- buf[stream][off] = uint8(v.entry >> 8) |
|
| 822 |
- buf[stream2][off] = uint8(v2.entry >> 8) |
|
| 823 |
- |
|
| 824 |
- val = br[stream].peekBitsFast(d.actualTableLog) |
|
| 825 |
- val2 = br[stream2].peekBitsFast(d.actualTableLog) |
|
| 826 |
- v = single[val&tlMask] |
|
| 827 |
- v2 = single[val2&tlMask] |
|
| 828 |
- br[stream].advance(uint8(v.entry)) |
|
| 829 |
- br[stream2].advance(uint8(v2.entry)) |
|
| 830 |
- buf[stream][off+1] = uint8(v.entry >> 8) |
|
| 831 |
- buf[stream2][off+1] = uint8(v2.entry >> 8) |
|
| 832 |
- } |
|
| 833 |
- |
|
| 834 |
- off += 2 |
|
| 835 |
- |
|
| 836 |
- if off == 0 {
|
|
| 837 |
- if bufoff > dstEvery {
|
|
| 838 |
- d.bufs.Put(buf) |
|
| 839 |
- return nil, errors.New("corruption detected: stream overrun 1")
|
|
| 840 |
- } |
|
| 841 |
- copy(out, buf[0][:]) |
|
| 842 |
- copy(out[dstEvery:], buf[1][:]) |
|
| 843 |
- copy(out[dstEvery*2:], buf[2][:]) |
|
| 844 |
- copy(out[dstEvery*3:], buf[3][:]) |
|
| 845 |
- out = out[bufoff:] |
|
| 846 |
- decoded += bufoff * 4 |
|
| 847 |
- // There must at least be 3 buffers left. |
|
| 848 |
- if len(out) < dstEvery*3 {
|
|
| 849 |
- d.bufs.Put(buf) |
|
| 850 |
- return nil, errors.New("corruption detected: stream overrun 2")
|
|
| 851 |
- } |
|
| 852 |
- } |
|
| 853 |
- } |
|
| 854 |
- if off > 0 {
|
|
| 855 |
- ioff := int(off) |
|
| 856 |
- if len(out) < dstEvery*3+ioff {
|
|
| 857 |
- d.bufs.Put(buf) |
|
| 858 |
- return nil, errors.New("corruption detected: stream overrun 3")
|
|
| 859 |
- } |
|
| 860 |
- copy(out, buf[0][:off]) |
|
| 861 |
- copy(out[dstEvery:], buf[1][:off]) |
|
| 862 |
- copy(out[dstEvery*2:], buf[2][:off]) |
|
| 863 |
- copy(out[dstEvery*3:], buf[3][:off]) |
|
| 864 |
- decoded += int(off) * 4 |
|
| 865 |
- out = out[off:] |
|
| 866 |
- } |
|
| 867 |
- |
|
| 868 |
- // Decode remaining. |
|
| 869 |
- remainBytes := dstEvery - (decoded / 4) |
|
| 870 |
- for i := range br {
|
|
| 871 |
- offset := dstEvery * i |
|
| 872 |
- endsAt := offset + remainBytes |
|
| 873 |
- if endsAt > len(out) {
|
|
| 874 |
- endsAt = len(out) |
|
| 875 |
- } |
|
| 876 |
- br := &br[i] |
|
| 877 |
- bitsLeft := br.remaining() |
|
| 878 |
- for bitsLeft > 0 {
|
|
| 879 |
- br.fill() |
|
| 880 |
- if offset >= endsAt {
|
|
| 881 |
- d.bufs.Put(buf) |
|
| 882 |
- return nil, errors.New("corruption detected: stream overrun 4")
|
|
| 883 |
- } |
|
| 884 |
- |
|
| 885 |
- // Read value and increment offset. |
|
| 886 |
- val := br.peekBitsFast(d.actualTableLog) |
|
| 887 |
- v := single[val&tlMask].entry |
|
| 888 |
- nBits := uint8(v) |
|
| 889 |
- br.advance(nBits) |
|
| 890 |
- bitsLeft -= uint(nBits) |
|
| 891 |
- out[offset] = uint8(v >> 8) |
|
| 892 |
- offset++ |
|
| 893 |
- } |
|
| 894 |
- if offset != endsAt {
|
|
| 895 |
- d.bufs.Put(buf) |
|
| 896 |
- return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt)
|
|
| 897 |
- } |
|
| 898 |
- decoded += offset - dstEvery*i |
|
| 899 |
- err = br.close() |
|
| 900 |
- if err != nil {
|
|
| 901 |
- return nil, err |
|
| 902 |
- } |
|
| 903 |
- } |
|
| 904 |
- d.bufs.Put(buf) |
|
| 905 |
- if dstSize != decoded {
|
|
| 906 |
- return nil, errors.New("corruption detected: short output block")
|
|
| 907 |
- } |
|
| 908 |
- return dst, nil |
|
| 909 |
-} |
|
| 910 |
- |
|
| 911 |
-// Decompress4X will decompress a 4X encoded stream. |
|
| 912 |
-// The length of the supplied input must match the end of a block exactly. |
|
| 913 |
-// The *capacity* of the dst slice must match the destination size of |
|
| 914 |
-// the uncompressed data exactly. |
|
| 915 | 732 |
func (d *Decoder) decompress4X8bit(dst, src []byte) ([]byte, error) {
|
| 916 | 733 |
if d.actualTableLog == 8 {
|
| 917 | 734 |
return d.decompress4X8bitExactly(dst, src) |
| 918 | 735 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,488 @@ |
| 0 |
+// +build !appengine |
|
| 1 |
+// +build gc |
|
| 2 |
+// +build !noasm |
|
| 3 |
+ |
|
| 4 |
+#include "textflag.h" |
|
| 5 |
+#include "funcdata.h" |
|
| 6 |
+#include "go_asm.h" |
|
| 7 |
+ |
|
| 8 |
+#define bufoff 256 // see decompress.go, we're using [4][256]byte table |
|
| 9 |
+ |
|
| 10 |
+// func decompress4x_main_loop_x86(pbr0, pbr1, pbr2, pbr3 *bitReaderShifted, |
|
| 11 |
+// peekBits uint8, buf *byte, tbl *dEntrySingle) (int, bool) |
|
| 12 |
+TEXT ·decompress4x_8b_loop_x86(SB), NOSPLIT, $8 |
|
| 13 |
+#define off R8 |
|
| 14 |
+#define buffer DI |
|
| 15 |
+#define table SI |
|
| 16 |
+ |
|
| 17 |
+#define br_bits_read R9 |
|
| 18 |
+#define br_value R10 |
|
| 19 |
+#define br_offset R11 |
|
| 20 |
+#define peek_bits R12 |
|
| 21 |
+#define exhausted DX |
|
| 22 |
+ |
|
| 23 |
+#define br0 R13 |
|
| 24 |
+#define br1 R14 |
|
| 25 |
+#define br2 R15 |
|
| 26 |
+#define br3 BP |
|
| 27 |
+ |
|
| 28 |
+ MOVQ BP, 0(SP) |
|
| 29 |
+ |
|
| 30 |
+ XORQ exhausted, exhausted // exhausted = false |
|
| 31 |
+ XORQ off, off // off = 0 |
|
| 32 |
+ |
|
| 33 |
+ MOVBQZX peekBits+32(FP), peek_bits |
|
| 34 |
+ MOVQ buf+40(FP), buffer |
|
| 35 |
+ MOVQ tbl+48(FP), table |
|
| 36 |
+ |
|
| 37 |
+ MOVQ pbr0+0(FP), br0 |
|
| 38 |
+ MOVQ pbr1+8(FP), br1 |
|
| 39 |
+ MOVQ pbr2+16(FP), br2 |
|
| 40 |
+ MOVQ pbr3+24(FP), br3 |
|
| 41 |
+ |
|
| 42 |
+main_loop: |
|
| 43 |
+ |
|
| 44 |
+ // const stream = 0 |
|
| 45 |
+ // br0.fillFast() |
|
| 46 |
+ MOVBQZX bitReaderShifted_bitsRead(br0), br_bits_read |
|
| 47 |
+ MOVQ bitReaderShifted_value(br0), br_value |
|
| 48 |
+ MOVQ bitReaderShifted_off(br0), br_offset |
|
| 49 |
+ |
|
| 50 |
+ // if b.bitsRead >= 32 {
|
|
| 51 |
+ CMPQ br_bits_read, $32 |
|
| 52 |
+ JB skip_fill0 |
|
| 53 |
+ |
|
| 54 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 55 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 56 |
+ |
|
| 57 |
+ // v := b.in[b.off-4 : b.off] |
|
| 58 |
+ // v = v[:4] |
|
| 59 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 60 |
+ MOVQ bitReaderShifted_in(br0), AX |
|
| 61 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 62 |
+ |
|
| 63 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 64 |
+ MOVQ br_bits_read, CX |
|
| 65 |
+ SHLQ CL, AX |
|
| 66 |
+ ORQ AX, br_value |
|
| 67 |
+ |
|
| 68 |
+ // exhausted = exhausted || (br0.off < 4) |
|
| 69 |
+ CMPQ br_offset, $4 |
|
| 70 |
+ SETLT DL |
|
| 71 |
+ ORB DL, DH |
|
| 72 |
+ |
|
| 73 |
+ // } |
|
| 74 |
+skip_fill0: |
|
| 75 |
+ |
|
| 76 |
+ // val0 := br0.peekTopBits(peekBits) |
|
| 77 |
+ MOVQ br_value, AX |
|
| 78 |
+ MOVQ peek_bits, CX |
|
| 79 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 80 |
+ |
|
| 81 |
+ // v0 := table[val0&mask] |
|
| 82 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 83 |
+ |
|
| 84 |
+ // br0.advance(uint8(v0.entry)) |
|
| 85 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 86 |
+ MOVBQZX AL, CX |
|
| 87 |
+ SHLQ CL, br_value // value <<= n |
|
| 88 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 89 |
+ |
|
| 90 |
+ // val1 := br0.peekTopBits(peekBits) |
|
| 91 |
+ MOVQ peek_bits, CX |
|
| 92 |
+ MOVQ br_value, AX |
|
| 93 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 94 |
+ |
|
| 95 |
+ // v1 := table[val1&mask] |
|
| 96 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 97 |
+ |
|
| 98 |
+ // br0.advance(uint8(v1.entry)) |
|
| 99 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 100 |
+ MOVBQZX AL, CX |
|
| 101 |
+ SHLQ CX, br_value // value <<= n |
|
| 102 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 103 |
+ |
|
| 104 |
+ // these two writes get coalesced |
|
| 105 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 106 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 107 |
+ MOVW BX, 0(buffer)(off*1) |
|
| 108 |
+ |
|
| 109 |
+ // SECOND PART: |
|
| 110 |
+ // val2 := br0.peekTopBits(peekBits) |
|
| 111 |
+ MOVQ br_value, AX |
|
| 112 |
+ MOVQ peek_bits, CX |
|
| 113 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 114 |
+ |
|
| 115 |
+ // v2 := table[val0&mask] |
|
| 116 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 117 |
+ |
|
| 118 |
+ // br0.advance(uint8(v0.entry)) |
|
| 119 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 120 |
+ MOVBQZX AL, CX |
|
| 121 |
+ SHLQ CL, br_value // value <<= n |
|
| 122 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 123 |
+ |
|
| 124 |
+ // val3 := br0.peekTopBits(peekBits) |
|
| 125 |
+ MOVQ peek_bits, CX |
|
| 126 |
+ MOVQ br_value, AX |
|
| 127 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 128 |
+ |
|
| 129 |
+ // v3 := table[val1&mask] |
|
| 130 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 131 |
+ |
|
| 132 |
+ // br0.advance(uint8(v1.entry)) |
|
| 133 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 134 |
+ MOVBQZX AL, CX |
|
| 135 |
+ SHLQ CX, br_value // value <<= n |
|
| 136 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 137 |
+ |
|
| 138 |
+ // these two writes get coalesced |
|
| 139 |
+ // buf[stream][off+2] = uint8(v2.entry >> 8) |
|
| 140 |
+ // buf[stream][off+3] = uint8(v3.entry >> 8) |
|
| 141 |
+ MOVW BX, 0+2(buffer)(off*1) |
|
| 142 |
+ |
|
| 143 |
+ // update the bitrader reader structure |
|
| 144 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br0) |
|
| 145 |
+ MOVQ br_value, bitReaderShifted_value(br0) |
|
| 146 |
+ MOVQ br_offset, bitReaderShifted_off(br0) |
|
| 147 |
+ |
|
| 148 |
+ // const stream = 1 |
|
| 149 |
+ // br1.fillFast() |
|
| 150 |
+ MOVBQZX bitReaderShifted_bitsRead(br1), br_bits_read |
|
| 151 |
+ MOVQ bitReaderShifted_value(br1), br_value |
|
| 152 |
+ MOVQ bitReaderShifted_off(br1), br_offset |
|
| 153 |
+ |
|
| 154 |
+ // if b.bitsRead >= 32 {
|
|
| 155 |
+ CMPQ br_bits_read, $32 |
|
| 156 |
+ JB skip_fill1 |
|
| 157 |
+ |
|
| 158 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 159 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 160 |
+ |
|
| 161 |
+ // v := b.in[b.off-4 : b.off] |
|
| 162 |
+ // v = v[:4] |
|
| 163 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 164 |
+ MOVQ bitReaderShifted_in(br1), AX |
|
| 165 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 166 |
+ |
|
| 167 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 168 |
+ MOVQ br_bits_read, CX |
|
| 169 |
+ SHLQ CL, AX |
|
| 170 |
+ ORQ AX, br_value |
|
| 171 |
+ |
|
| 172 |
+ // exhausted = exhausted || (br1.off < 4) |
|
| 173 |
+ CMPQ br_offset, $4 |
|
| 174 |
+ SETLT DL |
|
| 175 |
+ ORB DL, DH |
|
| 176 |
+ |
|
| 177 |
+ // } |
|
| 178 |
+skip_fill1: |
|
| 179 |
+ |
|
| 180 |
+ // val0 := br1.peekTopBits(peekBits) |
|
| 181 |
+ MOVQ br_value, AX |
|
| 182 |
+ MOVQ peek_bits, CX |
|
| 183 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 184 |
+ |
|
| 185 |
+ // v0 := table[val0&mask] |
|
| 186 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 187 |
+ |
|
| 188 |
+ // br1.advance(uint8(v0.entry)) |
|
| 189 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 190 |
+ MOVBQZX AL, CX |
|
| 191 |
+ SHLQ CL, br_value // value <<= n |
|
| 192 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 193 |
+ |
|
| 194 |
+ // val1 := br1.peekTopBits(peekBits) |
|
| 195 |
+ MOVQ peek_bits, CX |
|
| 196 |
+ MOVQ br_value, AX |
|
| 197 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 198 |
+ |
|
| 199 |
+ // v1 := table[val1&mask] |
|
| 200 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 201 |
+ |
|
| 202 |
+ // br1.advance(uint8(v1.entry)) |
|
| 203 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 204 |
+ MOVBQZX AL, CX |
|
| 205 |
+ SHLQ CX, br_value // value <<= n |
|
| 206 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 207 |
+ |
|
| 208 |
+ // these two writes get coalesced |
|
| 209 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 210 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 211 |
+ MOVW BX, 256(buffer)(off*1) |
|
| 212 |
+ |
|
| 213 |
+ // SECOND PART: |
|
| 214 |
+ // val2 := br1.peekTopBits(peekBits) |
|
| 215 |
+ MOVQ br_value, AX |
|
| 216 |
+ MOVQ peek_bits, CX |
|
| 217 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 218 |
+ |
|
| 219 |
+ // v2 := table[val0&mask] |
|
| 220 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 221 |
+ |
|
| 222 |
+ // br1.advance(uint8(v0.entry)) |
|
| 223 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 224 |
+ MOVBQZX AL, CX |
|
| 225 |
+ SHLQ CL, br_value // value <<= n |
|
| 226 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 227 |
+ |
|
| 228 |
+ // val3 := br1.peekTopBits(peekBits) |
|
| 229 |
+ MOVQ peek_bits, CX |
|
| 230 |
+ MOVQ br_value, AX |
|
| 231 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 232 |
+ |
|
| 233 |
+ // v3 := table[val1&mask] |
|
| 234 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 235 |
+ |
|
| 236 |
+ // br1.advance(uint8(v1.entry)) |
|
| 237 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 238 |
+ MOVBQZX AL, CX |
|
| 239 |
+ SHLQ CX, br_value // value <<= n |
|
| 240 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 241 |
+ |
|
| 242 |
+ // these two writes get coalesced |
|
| 243 |
+ // buf[stream][off+2] = uint8(v2.entry >> 8) |
|
| 244 |
+ // buf[stream][off+3] = uint8(v3.entry >> 8) |
|
| 245 |
+ MOVW BX, 256+2(buffer)(off*1) |
|
| 246 |
+ |
|
| 247 |
+ // update the bitrader reader structure |
|
| 248 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br1) |
|
| 249 |
+ MOVQ br_value, bitReaderShifted_value(br1) |
|
| 250 |
+ MOVQ br_offset, bitReaderShifted_off(br1) |
|
| 251 |
+ |
|
| 252 |
+ // const stream = 2 |
|
| 253 |
+ // br2.fillFast() |
|
| 254 |
+ MOVBQZX bitReaderShifted_bitsRead(br2), br_bits_read |
|
| 255 |
+ MOVQ bitReaderShifted_value(br2), br_value |
|
| 256 |
+ MOVQ bitReaderShifted_off(br2), br_offset |
|
| 257 |
+ |
|
| 258 |
+ // if b.bitsRead >= 32 {
|
|
| 259 |
+ CMPQ br_bits_read, $32 |
|
| 260 |
+ JB skip_fill2 |
|
| 261 |
+ |
|
| 262 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 263 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 264 |
+ |
|
| 265 |
+ // v := b.in[b.off-4 : b.off] |
|
| 266 |
+ // v = v[:4] |
|
| 267 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 268 |
+ MOVQ bitReaderShifted_in(br2), AX |
|
| 269 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 270 |
+ |
|
| 271 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 272 |
+ MOVQ br_bits_read, CX |
|
| 273 |
+ SHLQ CL, AX |
|
| 274 |
+ ORQ AX, br_value |
|
| 275 |
+ |
|
| 276 |
+ // exhausted = exhausted || (br2.off < 4) |
|
| 277 |
+ CMPQ br_offset, $4 |
|
| 278 |
+ SETLT DL |
|
| 279 |
+ ORB DL, DH |
|
| 280 |
+ |
|
| 281 |
+ // } |
|
| 282 |
+skip_fill2: |
|
| 283 |
+ |
|
| 284 |
+ // val0 := br2.peekTopBits(peekBits) |
|
| 285 |
+ MOVQ br_value, AX |
|
| 286 |
+ MOVQ peek_bits, CX |
|
| 287 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 288 |
+ |
|
| 289 |
+ // v0 := table[val0&mask] |
|
| 290 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 291 |
+ |
|
| 292 |
+ // br2.advance(uint8(v0.entry)) |
|
| 293 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 294 |
+ MOVBQZX AL, CX |
|
| 295 |
+ SHLQ CL, br_value // value <<= n |
|
| 296 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 297 |
+ |
|
| 298 |
+ // val1 := br2.peekTopBits(peekBits) |
|
| 299 |
+ MOVQ peek_bits, CX |
|
| 300 |
+ MOVQ br_value, AX |
|
| 301 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 302 |
+ |
|
| 303 |
+ // v1 := table[val1&mask] |
|
| 304 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 305 |
+ |
|
| 306 |
+ // br2.advance(uint8(v1.entry)) |
|
| 307 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 308 |
+ MOVBQZX AL, CX |
|
| 309 |
+ SHLQ CX, br_value // value <<= n |
|
| 310 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 311 |
+ |
|
| 312 |
+ // these two writes get coalesced |
|
| 313 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 314 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 315 |
+ MOVW BX, 512(buffer)(off*1) |
|
| 316 |
+ |
|
| 317 |
+ // SECOND PART: |
|
| 318 |
+ // val2 := br2.peekTopBits(peekBits) |
|
| 319 |
+ MOVQ br_value, AX |
|
| 320 |
+ MOVQ peek_bits, CX |
|
| 321 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 322 |
+ |
|
| 323 |
+ // v2 := table[val0&mask] |
|
| 324 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 325 |
+ |
|
| 326 |
+ // br2.advance(uint8(v0.entry)) |
|
| 327 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 328 |
+ MOVBQZX AL, CX |
|
| 329 |
+ SHLQ CL, br_value // value <<= n |
|
| 330 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 331 |
+ |
|
| 332 |
+ // val3 := br2.peekTopBits(peekBits) |
|
| 333 |
+ MOVQ peek_bits, CX |
|
| 334 |
+ MOVQ br_value, AX |
|
| 335 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 336 |
+ |
|
| 337 |
+ // v3 := table[val1&mask] |
|
| 338 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 339 |
+ |
|
| 340 |
+ // br2.advance(uint8(v1.entry)) |
|
| 341 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 342 |
+ MOVBQZX AL, CX |
|
| 343 |
+ SHLQ CX, br_value // value <<= n |
|
| 344 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 345 |
+ |
|
| 346 |
+ // these two writes get coalesced |
|
| 347 |
+ // buf[stream][off+2] = uint8(v2.entry >> 8) |
|
| 348 |
+ // buf[stream][off+3] = uint8(v3.entry >> 8) |
|
| 349 |
+ MOVW BX, 512+2(buffer)(off*1) |
|
| 350 |
+ |
|
| 351 |
+ // update the bitrader reader structure |
|
| 352 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br2) |
|
| 353 |
+ MOVQ br_value, bitReaderShifted_value(br2) |
|
| 354 |
+ MOVQ br_offset, bitReaderShifted_off(br2) |
|
| 355 |
+ |
|
| 356 |
+ // const stream = 3 |
|
| 357 |
+ // br3.fillFast() |
|
| 358 |
+ MOVBQZX bitReaderShifted_bitsRead(br3), br_bits_read |
|
| 359 |
+ MOVQ bitReaderShifted_value(br3), br_value |
|
| 360 |
+ MOVQ bitReaderShifted_off(br3), br_offset |
|
| 361 |
+ |
|
| 362 |
+ // if b.bitsRead >= 32 {
|
|
| 363 |
+ CMPQ br_bits_read, $32 |
|
| 364 |
+ JB skip_fill3 |
|
| 365 |
+ |
|
| 366 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 367 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 368 |
+ |
|
| 369 |
+ // v := b.in[b.off-4 : b.off] |
|
| 370 |
+ // v = v[:4] |
|
| 371 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 372 |
+ MOVQ bitReaderShifted_in(br3), AX |
|
| 373 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 374 |
+ |
|
| 375 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 376 |
+ MOVQ br_bits_read, CX |
|
| 377 |
+ SHLQ CL, AX |
|
| 378 |
+ ORQ AX, br_value |
|
| 379 |
+ |
|
| 380 |
+ // exhausted = exhausted || (br3.off < 4) |
|
| 381 |
+ CMPQ br_offset, $4 |
|
| 382 |
+ SETLT DL |
|
| 383 |
+ ORB DL, DH |
|
| 384 |
+ |
|
| 385 |
+ // } |
|
| 386 |
+skip_fill3: |
|
| 387 |
+ |
|
| 388 |
+ // val0 := br3.peekTopBits(peekBits) |
|
| 389 |
+ MOVQ br_value, AX |
|
| 390 |
+ MOVQ peek_bits, CX |
|
| 391 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 392 |
+ |
|
| 393 |
+ // v0 := table[val0&mask] |
|
| 394 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 395 |
+ |
|
| 396 |
+ // br3.advance(uint8(v0.entry)) |
|
| 397 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 398 |
+ MOVBQZX AL, CX |
|
| 399 |
+ SHLQ CL, br_value // value <<= n |
|
| 400 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 401 |
+ |
|
| 402 |
+ // val1 := br3.peekTopBits(peekBits) |
|
| 403 |
+ MOVQ peek_bits, CX |
|
| 404 |
+ MOVQ br_value, AX |
|
| 405 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 406 |
+ |
|
| 407 |
+ // v1 := table[val1&mask] |
|
| 408 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 409 |
+ |
|
| 410 |
+ // br3.advance(uint8(v1.entry)) |
|
| 411 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 412 |
+ MOVBQZX AL, CX |
|
| 413 |
+ SHLQ CX, br_value // value <<= n |
|
| 414 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 415 |
+ |
|
| 416 |
+ // these two writes get coalesced |
|
| 417 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 418 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 419 |
+ MOVW BX, 768(buffer)(off*1) |
|
| 420 |
+ |
|
| 421 |
+ // SECOND PART: |
|
| 422 |
+ // val2 := br3.peekTopBits(peekBits) |
|
| 423 |
+ MOVQ br_value, AX |
|
| 424 |
+ MOVQ peek_bits, CX |
|
| 425 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 426 |
+ |
|
| 427 |
+ // v2 := table[val0&mask] |
|
| 428 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 429 |
+ |
|
| 430 |
+ // br3.advance(uint8(v0.entry)) |
|
| 431 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 432 |
+ MOVBQZX AL, CX |
|
| 433 |
+ SHLQ CL, br_value // value <<= n |
|
| 434 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 435 |
+ |
|
| 436 |
+ // val3 := br3.peekTopBits(peekBits) |
|
| 437 |
+ MOVQ peek_bits, CX |
|
| 438 |
+ MOVQ br_value, AX |
|
| 439 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 440 |
+ |
|
| 441 |
+ // v3 := table[val1&mask] |
|
| 442 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 443 |
+ |
|
| 444 |
+ // br3.advance(uint8(v1.entry)) |
|
| 445 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 446 |
+ MOVBQZX AL, CX |
|
| 447 |
+ SHLQ CX, br_value // value <<= n |
|
| 448 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 449 |
+ |
|
| 450 |
+ // these two writes get coalesced |
|
| 451 |
+ // buf[stream][off+2] = uint8(v2.entry >> 8) |
|
| 452 |
+ // buf[stream][off+3] = uint8(v3.entry >> 8) |
|
| 453 |
+ MOVW BX, 768+2(buffer)(off*1) |
|
| 454 |
+ |
|
| 455 |
+ // update the bitrader reader structure |
|
| 456 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br3) |
|
| 457 |
+ MOVQ br_value, bitReaderShifted_value(br3) |
|
| 458 |
+ MOVQ br_offset, bitReaderShifted_off(br3) |
|
| 459 |
+ |
|
| 460 |
+ ADDQ $4, off // off += 2 |
|
| 461 |
+ |
|
| 462 |
+ TESTB DH, DH // any br[i].ofs < 4? |
|
| 463 |
+ JNZ end |
|
| 464 |
+ |
|
| 465 |
+ CMPQ off, $bufoff |
|
| 466 |
+ JL main_loop |
|
| 467 |
+ |
|
| 468 |
+end: |
|
| 469 |
+ MOVQ 0(SP), BP |
|
| 470 |
+ |
|
| 471 |
+ MOVB off, ret+56(FP) |
|
| 472 |
+ RET |
|
| 473 |
+ |
|
| 474 |
+#undef off |
|
| 475 |
+#undef buffer |
|
| 476 |
+#undef table |
|
| 477 |
+ |
|
| 478 |
+#undef br_bits_read |
|
| 479 |
+#undef br_value |
|
| 480 |
+#undef br_offset |
|
| 481 |
+#undef peek_bits |
|
| 482 |
+#undef exhausted |
|
| 483 |
+ |
|
| 484 |
+#undef br0 |
|
| 485 |
+#undef br1 |
|
| 486 |
+#undef br2 |
|
| 487 |
+#undef br3 |
| 0 | 488 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,197 @@ |
| 0 |
+// +build !appengine |
|
| 1 |
+// +build gc |
|
| 2 |
+// +build !noasm |
|
| 3 |
+ |
|
| 4 |
+#include "textflag.h" |
|
| 5 |
+#include "funcdata.h" |
|
| 6 |
+#include "go_asm.h" |
|
| 7 |
+ |
|
| 8 |
+ |
|
| 9 |
+#define bufoff 256 // see decompress.go, we're using [4][256]byte table |
|
| 10 |
+ |
|
| 11 |
+//func decompress4x_main_loop_x86(pbr0, pbr1, pbr2, pbr3 *bitReaderShifted, |
|
| 12 |
+// peekBits uint8, buf *byte, tbl *dEntrySingle) (int, bool) |
|
| 13 |
+TEXT ·decompress4x_8b_loop_x86(SB), NOSPLIT, $8 |
|
| 14 |
+#define off R8 |
|
| 15 |
+#define buffer DI |
|
| 16 |
+#define table SI |
|
| 17 |
+ |
|
| 18 |
+#define br_bits_read R9 |
|
| 19 |
+#define br_value R10 |
|
| 20 |
+#define br_offset R11 |
|
| 21 |
+#define peek_bits R12 |
|
| 22 |
+#define exhausted DX |
|
| 23 |
+ |
|
| 24 |
+#define br0 R13 |
|
| 25 |
+#define br1 R14 |
|
| 26 |
+#define br2 R15 |
|
| 27 |
+#define br3 BP |
|
| 28 |
+ |
|
| 29 |
+ MOVQ BP, 0(SP) |
|
| 30 |
+ |
|
| 31 |
+ XORQ exhausted, exhausted // exhausted = false |
|
| 32 |
+ XORQ off, off // off = 0 |
|
| 33 |
+ |
|
| 34 |
+ MOVBQZX peekBits+32(FP), peek_bits |
|
| 35 |
+ MOVQ buf+40(FP), buffer |
|
| 36 |
+ MOVQ tbl+48(FP), table |
|
| 37 |
+ |
|
| 38 |
+ MOVQ pbr0+0(FP), br0 |
|
| 39 |
+ MOVQ pbr1+8(FP), br1 |
|
| 40 |
+ MOVQ pbr2+16(FP), br2 |
|
| 41 |
+ MOVQ pbr3+24(FP), br3 |
|
| 42 |
+ |
|
| 43 |
+main_loop: |
|
| 44 |
+{{ define "decode_2_values_x86" }}
|
|
| 45 |
+ // const stream = {{ var "id" }}
|
|
| 46 |
+ // br{{ var "id"}}.fillFast()
|
|
| 47 |
+ MOVBQZX bitReaderShifted_bitsRead(br{{ var "id" }}), br_bits_read
|
|
| 48 |
+ MOVQ bitReaderShifted_value(br{{ var "id" }}), br_value
|
|
| 49 |
+ MOVQ bitReaderShifted_off(br{{ var "id" }}), br_offset
|
|
| 50 |
+ |
|
| 51 |
+ // if b.bitsRead >= 32 {
|
|
| 52 |
+ CMPQ br_bits_read, $32 |
|
| 53 |
+ JB skip_fill{{ var "id" }}
|
|
| 54 |
+ |
|
| 55 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 56 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 57 |
+ |
|
| 58 |
+ // v := b.in[b.off-4 : b.off] |
|
| 59 |
+ // v = v[:4] |
|
| 60 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 61 |
+ MOVQ bitReaderShifted_in(br{{ var "id" }}), AX
|
|
| 62 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 63 |
+ |
|
| 64 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 65 |
+ MOVQ br_bits_read, CX |
|
| 66 |
+ SHLQ CL, AX |
|
| 67 |
+ ORQ AX, br_value |
|
| 68 |
+ |
|
| 69 |
+ // exhausted = exhausted || (br{{ var "id"}}.off < 4)
|
|
| 70 |
+ CMPQ br_offset, $4 |
|
| 71 |
+ SETLT DL |
|
| 72 |
+ ORB DL, DH |
|
| 73 |
+ // } |
|
| 74 |
+skip_fill{{ var "id" }}:
|
|
| 75 |
+ |
|
| 76 |
+ // val0 := br{{ var "id"}}.peekTopBits(peekBits)
|
|
| 77 |
+ MOVQ br_value, AX |
|
| 78 |
+ MOVQ peek_bits, CX |
|
| 79 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 80 |
+ |
|
| 81 |
+ // v0 := table[val0&mask] |
|
| 82 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 83 |
+ |
|
| 84 |
+ // br{{ var "id"}}.advance(uint8(v0.entry))
|
|
| 85 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 86 |
+ MOVBQZX AL, CX |
|
| 87 |
+ SHLQ CL, br_value // value <<= n |
|
| 88 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 89 |
+ |
|
| 90 |
+ // val1 := br{{ var "id"}}.peekTopBits(peekBits)
|
|
| 91 |
+ MOVQ peek_bits, CX |
|
| 92 |
+ MOVQ br_value, AX |
|
| 93 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 94 |
+ |
|
| 95 |
+ // v1 := table[val1&mask] |
|
| 96 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 97 |
+ |
|
| 98 |
+ // br{{ var "id"}}.advance(uint8(v1.entry))
|
|
| 99 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 100 |
+ MOVBQZX AL, CX |
|
| 101 |
+ SHLQ CX, br_value // value <<= n |
|
| 102 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 103 |
+ |
|
| 104 |
+ |
|
| 105 |
+ // these two writes get coalesced |
|
| 106 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 107 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 108 |
+ MOVW BX, {{ var "bufofs" }}(buffer)(off*1)
|
|
| 109 |
+ |
|
| 110 |
+ // SECOND PART: |
|
| 111 |
+ // val2 := br{{ var "id"}}.peekTopBits(peekBits)
|
|
| 112 |
+ MOVQ br_value, AX |
|
| 113 |
+ MOVQ peek_bits, CX |
|
| 114 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 115 |
+ |
|
| 116 |
+ // v2 := table[val0&mask] |
|
| 117 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 118 |
+ |
|
| 119 |
+ // br{{ var "id"}}.advance(uint8(v0.entry))
|
|
| 120 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 121 |
+ MOVBQZX AL, CX |
|
| 122 |
+ SHLQ CL, br_value // value <<= n |
|
| 123 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 124 |
+ |
|
| 125 |
+ // val3 := br{{ var "id"}}.peekTopBits(peekBits)
|
|
| 126 |
+ MOVQ peek_bits, CX |
|
| 127 |
+ MOVQ br_value, AX |
|
| 128 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 129 |
+ |
|
| 130 |
+ // v3 := table[val1&mask] |
|
| 131 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 132 |
+ |
|
| 133 |
+ // br{{ var "id"}}.advance(uint8(v1.entry))
|
|
| 134 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 135 |
+ MOVBQZX AL, CX |
|
| 136 |
+ SHLQ CX, br_value // value <<= n |
|
| 137 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 138 |
+ |
|
| 139 |
+ |
|
| 140 |
+ // these two writes get coalesced |
|
| 141 |
+ // buf[stream][off+2] = uint8(v2.entry >> 8) |
|
| 142 |
+ // buf[stream][off+3] = uint8(v3.entry >> 8) |
|
| 143 |
+ MOVW BX, {{ var "bufofs" }}+2(buffer)(off*1)
|
|
| 144 |
+ |
|
| 145 |
+ // update the bitrader reader structure |
|
| 146 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br{{ var "id" }})
|
|
| 147 |
+ MOVQ br_value, bitReaderShifted_value(br{{ var "id" }})
|
|
| 148 |
+ MOVQ br_offset, bitReaderShifted_off(br{{ var "id" }})
|
|
| 149 |
+{{ end }}
|
|
| 150 |
+ |
|
| 151 |
+ {{ set "id" "0" }}
|
|
| 152 |
+ {{ set "ofs" "0" }}
|
|
| 153 |
+ {{ set "bufofs" "0" }} {{/* id * bufoff */}}
|
|
| 154 |
+ {{ template "decode_2_values_x86" . }}
|
|
| 155 |
+ |
|
| 156 |
+ {{ set "id" "1" }}
|
|
| 157 |
+ {{ set "ofs" "8" }}
|
|
| 158 |
+ {{ set "bufofs" "256" }}
|
|
| 159 |
+ {{ template "decode_2_values_x86" . }}
|
|
| 160 |
+ |
|
| 161 |
+ {{ set "id" "2" }}
|
|
| 162 |
+ {{ set "ofs" "16" }}
|
|
| 163 |
+ {{ set "bufofs" "512" }}
|
|
| 164 |
+ {{ template "decode_2_values_x86" . }}
|
|
| 165 |
+ |
|
| 166 |
+ {{ set "id" "3" }}
|
|
| 167 |
+ {{ set "ofs" "24" }}
|
|
| 168 |
+ {{ set "bufofs" "768" }}
|
|
| 169 |
+ {{ template "decode_2_values_x86" . }}
|
|
| 170 |
+ |
|
| 171 |
+ ADDQ $4, off // off += 2 |
|
| 172 |
+ |
|
| 173 |
+ TESTB DH, DH // any br[i].ofs < 4? |
|
| 174 |
+ JNZ end |
|
| 175 |
+ |
|
| 176 |
+ CMPQ off, $bufoff |
|
| 177 |
+ JL main_loop |
|
| 178 |
+end: |
|
| 179 |
+ MOVQ 0(SP), BP |
|
| 180 |
+ |
|
| 181 |
+ MOVB off, ret+56(FP) |
|
| 182 |
+ RET |
|
| 183 |
+#undef off |
|
| 184 |
+#undef buffer |
|
| 185 |
+#undef table |
|
| 186 |
+ |
|
| 187 |
+#undef br_bits_read |
|
| 188 |
+#undef br_value |
|
| 189 |
+#undef br_offset |
|
| 190 |
+#undef peek_bits |
|
| 191 |
+#undef exhausted |
|
| 192 |
+ |
|
| 193 |
+#undef br0 |
|
| 194 |
+#undef br1 |
|
| 195 |
+#undef br2 |
|
| 196 |
+#undef br3 |
| 0 | 197 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,181 @@ |
| 0 |
+//go:build amd64 && !appengine && !noasm && gc |
|
| 1 |
+// +build amd64,!appengine,!noasm,gc |
|
| 2 |
+ |
|
| 3 |
+// This file contains the specialisation of Decoder.Decompress4X |
|
| 4 |
+// that uses an asm implementation of its main loop. |
|
| 5 |
+package huff0 |
|
| 6 |
+ |
|
| 7 |
+import ( |
|
| 8 |
+ "errors" |
|
| 9 |
+ "fmt" |
|
| 10 |
+) |
|
| 11 |
+ |
|
| 12 |
+// decompress4x_main_loop_x86 is an x86 assembler implementation |
|
| 13 |
+// of Decompress4X when tablelog > 8. |
|
| 14 |
+// go:noescape |
|
| 15 |
+func decompress4x_main_loop_x86(pbr0, pbr1, pbr2, pbr3 *bitReaderShifted, |
|
| 16 |
+ peekBits uint8, buf *byte, tbl *dEntrySingle) uint8 |
|
| 17 |
+ |
|
| 18 |
+// decompress4x_8b_loop_x86 is an x86 assembler implementation |
|
| 19 |
+// of Decompress4X when tablelog <= 8 which decodes 4 entries |
|
| 20 |
+// per loop. |
|
| 21 |
+// go:noescape |
|
| 22 |
+func decompress4x_8b_loop_x86(pbr0, pbr1, pbr2, pbr3 *bitReaderShifted, |
|
| 23 |
+ peekBits uint8, buf *byte, tbl *dEntrySingle) uint8 |
|
| 24 |
+ |
|
| 25 |
+// fallback8BitSize is the size where using Go version is faster. |
|
| 26 |
+const fallback8BitSize = 800 |
|
| 27 |
+ |
|
| 28 |
+// Decompress4X will decompress a 4X encoded stream. |
|
| 29 |
+// The length of the supplied input must match the end of a block exactly. |
|
| 30 |
+// The *capacity* of the dst slice must match the destination size of |
|
| 31 |
+// the uncompressed data exactly. |
|
| 32 |
+func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {
|
|
| 33 |
+ if len(d.dt.single) == 0 {
|
|
| 34 |
+ return nil, errors.New("no table loaded")
|
|
| 35 |
+ } |
|
| 36 |
+ if len(src) < 6+(4*1) {
|
|
| 37 |
+ return nil, errors.New("input too small")
|
|
| 38 |
+ } |
|
| 39 |
+ |
|
| 40 |
+ use8BitTables := d.actualTableLog <= 8 |
|
| 41 |
+ if cap(dst) < fallback8BitSize && use8BitTables {
|
|
| 42 |
+ return d.decompress4X8bit(dst, src) |
|
| 43 |
+ } |
|
| 44 |
+ var br [4]bitReaderShifted |
|
| 45 |
+ // Decode "jump table" |
|
| 46 |
+ start := 6 |
|
| 47 |
+ for i := 0; i < 3; i++ {
|
|
| 48 |
+ length := int(src[i*2]) | (int(src[i*2+1]) << 8) |
|
| 49 |
+ if start+length >= len(src) {
|
|
| 50 |
+ return nil, errors.New("truncated input (or invalid offset)")
|
|
| 51 |
+ } |
|
| 52 |
+ err := br[i].init(src[start : start+length]) |
|
| 53 |
+ if err != nil {
|
|
| 54 |
+ return nil, err |
|
| 55 |
+ } |
|
| 56 |
+ start += length |
|
| 57 |
+ } |
|
| 58 |
+ err := br[3].init(src[start:]) |
|
| 59 |
+ if err != nil {
|
|
| 60 |
+ return nil, err |
|
| 61 |
+ } |
|
| 62 |
+ |
|
| 63 |
+ // destination, offset to match first output |
|
| 64 |
+ dstSize := cap(dst) |
|
| 65 |
+ dst = dst[:dstSize] |
|
| 66 |
+ out := dst |
|
| 67 |
+ dstEvery := (dstSize + 3) / 4 |
|
| 68 |
+ |
|
| 69 |
+ const tlSize = 1 << tableLogMax |
|
| 70 |
+ const tlMask = tlSize - 1 |
|
| 71 |
+ single := d.dt.single[:tlSize] |
|
| 72 |
+ |
|
| 73 |
+ // Use temp table to avoid bound checks/append penalty. |
|
| 74 |
+ buf := d.buffer() |
|
| 75 |
+ var off uint8 |
|
| 76 |
+ var decoded int |
|
| 77 |
+ |
|
| 78 |
+ const debug = false |
|
| 79 |
+ |
|
| 80 |
+ // see: bitReaderShifted.peekBitsFast() |
|
| 81 |
+ peekBits := uint8((64 - d.actualTableLog) & 63) |
|
| 82 |
+ |
|
| 83 |
+ // Decode 2 values from each decoder/loop. |
|
| 84 |
+ const bufoff = 256 |
|
| 85 |
+ for {
|
|
| 86 |
+ if br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 {
|
|
| 87 |
+ break |
|
| 88 |
+ } |
|
| 89 |
+ |
|
| 90 |
+ if use8BitTables {
|
|
| 91 |
+ off = decompress4x_8b_loop_x86(&br[0], &br[1], &br[2], &br[3], peekBits, &buf[0][0], &single[0]) |
|
| 92 |
+ } else {
|
|
| 93 |
+ off = decompress4x_main_loop_x86(&br[0], &br[1], &br[2], &br[3], peekBits, &buf[0][0], &single[0]) |
|
| 94 |
+ } |
|
| 95 |
+ if debug {
|
|
| 96 |
+ fmt.Print("DEBUG: ")
|
|
| 97 |
+ fmt.Printf("off=%d,", off)
|
|
| 98 |
+ for i := 0; i < 4; i++ {
|
|
| 99 |
+ fmt.Printf(" br[%d]={bitsRead=%d, value=%x, off=%d}",
|
|
| 100 |
+ i, br[i].bitsRead, br[i].value, br[i].off) |
|
| 101 |
+ } |
|
| 102 |
+ fmt.Println("")
|
|
| 103 |
+ } |
|
| 104 |
+ |
|
| 105 |
+ if off != 0 {
|
|
| 106 |
+ break |
|
| 107 |
+ } |
|
| 108 |
+ |
|
| 109 |
+ if bufoff > dstEvery {
|
|
| 110 |
+ d.bufs.Put(buf) |
|
| 111 |
+ return nil, errors.New("corruption detected: stream overrun 1")
|
|
| 112 |
+ } |
|
| 113 |
+ copy(out, buf[0][:]) |
|
| 114 |
+ copy(out[dstEvery:], buf[1][:]) |
|
| 115 |
+ copy(out[dstEvery*2:], buf[2][:]) |
|
| 116 |
+ copy(out[dstEvery*3:], buf[3][:]) |
|
| 117 |
+ out = out[bufoff:] |
|
| 118 |
+ decoded += bufoff * 4 |
|
| 119 |
+ // There must at least be 3 buffers left. |
|
| 120 |
+ if len(out) < dstEvery*3 {
|
|
| 121 |
+ d.bufs.Put(buf) |
|
| 122 |
+ return nil, errors.New("corruption detected: stream overrun 2")
|
|
| 123 |
+ } |
|
| 124 |
+ } |
|
| 125 |
+ if off > 0 {
|
|
| 126 |
+ ioff := int(off) |
|
| 127 |
+ if len(out) < dstEvery*3+ioff {
|
|
| 128 |
+ d.bufs.Put(buf) |
|
| 129 |
+ return nil, errors.New("corruption detected: stream overrun 3")
|
|
| 130 |
+ } |
|
| 131 |
+ copy(out, buf[0][:off]) |
|
| 132 |
+ copy(out[dstEvery:], buf[1][:off]) |
|
| 133 |
+ copy(out[dstEvery*2:], buf[2][:off]) |
|
| 134 |
+ copy(out[dstEvery*3:], buf[3][:off]) |
|
| 135 |
+ decoded += int(off) * 4 |
|
| 136 |
+ out = out[off:] |
|
| 137 |
+ } |
|
| 138 |
+ |
|
| 139 |
+ // Decode remaining. |
|
| 140 |
+ remainBytes := dstEvery - (decoded / 4) |
|
| 141 |
+ for i := range br {
|
|
| 142 |
+ offset := dstEvery * i |
|
| 143 |
+ endsAt := offset + remainBytes |
|
| 144 |
+ if endsAt > len(out) {
|
|
| 145 |
+ endsAt = len(out) |
|
| 146 |
+ } |
|
| 147 |
+ br := &br[i] |
|
| 148 |
+ bitsLeft := br.remaining() |
|
| 149 |
+ for bitsLeft > 0 {
|
|
| 150 |
+ br.fill() |
|
| 151 |
+ if offset >= endsAt {
|
|
| 152 |
+ d.bufs.Put(buf) |
|
| 153 |
+ return nil, errors.New("corruption detected: stream overrun 4")
|
|
| 154 |
+ } |
|
| 155 |
+ |
|
| 156 |
+ // Read value and increment offset. |
|
| 157 |
+ val := br.peekBitsFast(d.actualTableLog) |
|
| 158 |
+ v := single[val&tlMask].entry |
|
| 159 |
+ nBits := uint8(v) |
|
| 160 |
+ br.advance(nBits) |
|
| 161 |
+ bitsLeft -= uint(nBits) |
|
| 162 |
+ out[offset] = uint8(v >> 8) |
|
| 163 |
+ offset++ |
|
| 164 |
+ } |
|
| 165 |
+ if offset != endsAt {
|
|
| 166 |
+ d.bufs.Put(buf) |
|
| 167 |
+ return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt)
|
|
| 168 |
+ } |
|
| 169 |
+ decoded += offset - dstEvery*i |
|
| 170 |
+ err = br.close() |
|
| 171 |
+ if err != nil {
|
|
| 172 |
+ return nil, err |
|
| 173 |
+ } |
|
| 174 |
+ } |
|
| 175 |
+ d.bufs.Put(buf) |
|
| 176 |
+ if dstSize != decoded {
|
|
| 177 |
+ return nil, errors.New("corruption detected: short output block")
|
|
| 178 |
+ } |
|
| 179 |
+ return dst, nil |
|
| 180 |
+} |
| 0 | 181 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,506 @@ |
| 0 |
+// +build !appengine |
|
| 1 |
+// +build gc |
|
| 2 |
+// +build !noasm |
|
| 3 |
+ |
|
| 4 |
+#include "textflag.h" |
|
| 5 |
+#include "funcdata.h" |
|
| 6 |
+#include "go_asm.h" |
|
| 7 |
+ |
|
| 8 |
+#ifdef GOAMD64_v4 |
|
| 9 |
+#ifndef GOAMD64_v3 |
|
| 10 |
+#define GOAMD64_v3 |
|
| 11 |
+#endif |
|
| 12 |
+#endif |
|
| 13 |
+ |
|
| 14 |
+#define bufoff 256 // see decompress.go, we're using [4][256]byte table |
|
| 15 |
+ |
|
| 16 |
+// func decompress4x_main_loop_x86(pbr0, pbr1, pbr2, pbr3 *bitReaderShifted, |
|
| 17 |
+// peekBits uint8, buf *byte, tbl *dEntrySingle) (int, bool) |
|
| 18 |
+TEXT ·decompress4x_main_loop_x86(SB), NOSPLIT, $8 |
|
| 19 |
+#define off R8 |
|
| 20 |
+#define buffer DI |
|
| 21 |
+#define table SI |
|
| 22 |
+ |
|
| 23 |
+#define br_bits_read R9 |
|
| 24 |
+#define br_value R10 |
|
| 25 |
+#define br_offset R11 |
|
| 26 |
+#define peek_bits R12 |
|
| 27 |
+#define exhausted DX |
|
| 28 |
+ |
|
| 29 |
+#define br0 R13 |
|
| 30 |
+#define br1 R14 |
|
| 31 |
+#define br2 R15 |
|
| 32 |
+#define br3 BP |
|
| 33 |
+ |
|
| 34 |
+ MOVQ BP, 0(SP) |
|
| 35 |
+ |
|
| 36 |
+ XORQ exhausted, exhausted // exhausted = false |
|
| 37 |
+ XORQ off, off // off = 0 |
|
| 38 |
+ |
|
| 39 |
+ MOVBQZX peekBits+32(FP), peek_bits |
|
| 40 |
+ MOVQ buf+40(FP), buffer |
|
| 41 |
+ MOVQ tbl+48(FP), table |
|
| 42 |
+ |
|
| 43 |
+ MOVQ pbr0+0(FP), br0 |
|
| 44 |
+ MOVQ pbr1+8(FP), br1 |
|
| 45 |
+ MOVQ pbr2+16(FP), br2 |
|
| 46 |
+ MOVQ pbr3+24(FP), br3 |
|
| 47 |
+ |
|
| 48 |
+main_loop: |
|
| 49 |
+ |
|
| 50 |
+ // const stream = 0 |
|
| 51 |
+ // br0.fillFast() |
|
| 52 |
+ MOVBQZX bitReaderShifted_bitsRead(br0), br_bits_read |
|
| 53 |
+ MOVQ bitReaderShifted_value(br0), br_value |
|
| 54 |
+ MOVQ bitReaderShifted_off(br0), br_offset |
|
| 55 |
+ |
|
| 56 |
+ // We must have at least 2 * max tablelog left |
|
| 57 |
+ CMPQ br_bits_read, $64-22 |
|
| 58 |
+ JBE skip_fill0 |
|
| 59 |
+ |
|
| 60 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 61 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 62 |
+ |
|
| 63 |
+ // v := b.in[b.off-4 : b.off] |
|
| 64 |
+ // v = v[:4] |
|
| 65 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 66 |
+ MOVQ bitReaderShifted_in(br0), AX |
|
| 67 |
+ |
|
| 68 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 69 |
+#ifdef GOAMD64_v3 |
|
| 70 |
+ SHLXQ br_bits_read, 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) << (b.bitsRead & 63) |
|
| 71 |
+ |
|
| 72 |
+#else |
|
| 73 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 74 |
+ MOVQ br_bits_read, CX |
|
| 75 |
+ SHLQ CL, AX |
|
| 76 |
+ |
|
| 77 |
+#endif |
|
| 78 |
+ |
|
| 79 |
+ ORQ AX, br_value |
|
| 80 |
+ |
|
| 81 |
+ // exhausted = exhausted || (br0.off < 4) |
|
| 82 |
+ CMPQ br_offset, $4 |
|
| 83 |
+ SETLT DL |
|
| 84 |
+ ORB DL, DH |
|
| 85 |
+ |
|
| 86 |
+ // } |
|
| 87 |
+skip_fill0: |
|
| 88 |
+ |
|
| 89 |
+ // val0 := br0.peekTopBits(peekBits) |
|
| 90 |
+#ifdef GOAMD64_v3 |
|
| 91 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 92 |
+ |
|
| 93 |
+#else |
|
| 94 |
+ MOVQ br_value, AX |
|
| 95 |
+ MOVQ peek_bits, CX |
|
| 96 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 97 |
+ |
|
| 98 |
+#endif |
|
| 99 |
+ |
|
| 100 |
+ // v0 := table[val0&mask] |
|
| 101 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 102 |
+ |
|
| 103 |
+ // br0.advance(uint8(v0.entry)) |
|
| 104 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 105 |
+ |
|
| 106 |
+#ifdef GOAMD64_v3 |
|
| 107 |
+ MOVBQZX AL, CX |
|
| 108 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 109 |
+ |
|
| 110 |
+#else |
|
| 111 |
+ MOVBQZX AL, CX |
|
| 112 |
+ SHLQ CL, br_value // value <<= n |
|
| 113 |
+ |
|
| 114 |
+#endif |
|
| 115 |
+ |
|
| 116 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 117 |
+ |
|
| 118 |
+#ifdef GOAMD64_v3 |
|
| 119 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 120 |
+ |
|
| 121 |
+#else |
|
| 122 |
+ // val1 := br0.peekTopBits(peekBits) |
|
| 123 |
+ MOVQ peek_bits, CX |
|
| 124 |
+ MOVQ br_value, AX |
|
| 125 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 126 |
+ |
|
| 127 |
+#endif |
|
| 128 |
+ |
|
| 129 |
+ // v1 := table[val1&mask] |
|
| 130 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 131 |
+ |
|
| 132 |
+ // br0.advance(uint8(v1.entry)) |
|
| 133 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 134 |
+ |
|
| 135 |
+#ifdef GOAMD64_v3 |
|
| 136 |
+ MOVBQZX AL, CX |
|
| 137 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 138 |
+ |
|
| 139 |
+#else |
|
| 140 |
+ MOVBQZX AL, CX |
|
| 141 |
+ SHLQ CL, br_value // value <<= n |
|
| 142 |
+ |
|
| 143 |
+#endif |
|
| 144 |
+ |
|
| 145 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 146 |
+ |
|
| 147 |
+ // these two writes get coalesced |
|
| 148 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 149 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 150 |
+ MOVW BX, 0(buffer)(off*1) |
|
| 151 |
+ |
|
| 152 |
+ // update the bitrader reader structure |
|
| 153 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br0) |
|
| 154 |
+ MOVQ br_value, bitReaderShifted_value(br0) |
|
| 155 |
+ MOVQ br_offset, bitReaderShifted_off(br0) |
|
| 156 |
+ |
|
| 157 |
+ // const stream = 1 |
|
| 158 |
+ // br1.fillFast() |
|
| 159 |
+ MOVBQZX bitReaderShifted_bitsRead(br1), br_bits_read |
|
| 160 |
+ MOVQ bitReaderShifted_value(br1), br_value |
|
| 161 |
+ MOVQ bitReaderShifted_off(br1), br_offset |
|
| 162 |
+ |
|
| 163 |
+ // We must have at least 2 * max tablelog left |
|
| 164 |
+ CMPQ br_bits_read, $64-22 |
|
| 165 |
+ JBE skip_fill1 |
|
| 166 |
+ |
|
| 167 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 168 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 169 |
+ |
|
| 170 |
+ // v := b.in[b.off-4 : b.off] |
|
| 171 |
+ // v = v[:4] |
|
| 172 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 173 |
+ MOVQ bitReaderShifted_in(br1), AX |
|
| 174 |
+ |
|
| 175 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 176 |
+#ifdef GOAMD64_v3 |
|
| 177 |
+ SHLXQ br_bits_read, 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) << (b.bitsRead & 63) |
|
| 178 |
+ |
|
| 179 |
+#else |
|
| 180 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 181 |
+ MOVQ br_bits_read, CX |
|
| 182 |
+ SHLQ CL, AX |
|
| 183 |
+ |
|
| 184 |
+#endif |
|
| 185 |
+ |
|
| 186 |
+ ORQ AX, br_value |
|
| 187 |
+ |
|
| 188 |
+ // exhausted = exhausted || (br1.off < 4) |
|
| 189 |
+ CMPQ br_offset, $4 |
|
| 190 |
+ SETLT DL |
|
| 191 |
+ ORB DL, DH |
|
| 192 |
+ |
|
| 193 |
+ // } |
|
| 194 |
+skip_fill1: |
|
| 195 |
+ |
|
| 196 |
+ // val0 := br1.peekTopBits(peekBits) |
|
| 197 |
+#ifdef GOAMD64_v3 |
|
| 198 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 199 |
+ |
|
| 200 |
+#else |
|
| 201 |
+ MOVQ br_value, AX |
|
| 202 |
+ MOVQ peek_bits, CX |
|
| 203 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 204 |
+ |
|
| 205 |
+#endif |
|
| 206 |
+ |
|
| 207 |
+ // v0 := table[val0&mask] |
|
| 208 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 209 |
+ |
|
| 210 |
+ // br1.advance(uint8(v0.entry)) |
|
| 211 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 212 |
+ |
|
| 213 |
+#ifdef GOAMD64_v3 |
|
| 214 |
+ MOVBQZX AL, CX |
|
| 215 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 216 |
+ |
|
| 217 |
+#else |
|
| 218 |
+ MOVBQZX AL, CX |
|
| 219 |
+ SHLQ CL, br_value // value <<= n |
|
| 220 |
+ |
|
| 221 |
+#endif |
|
| 222 |
+ |
|
| 223 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 224 |
+ |
|
| 225 |
+#ifdef GOAMD64_v3 |
|
| 226 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 227 |
+ |
|
| 228 |
+#else |
|
| 229 |
+ // val1 := br1.peekTopBits(peekBits) |
|
| 230 |
+ MOVQ peek_bits, CX |
|
| 231 |
+ MOVQ br_value, AX |
|
| 232 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 233 |
+ |
|
| 234 |
+#endif |
|
| 235 |
+ |
|
| 236 |
+ // v1 := table[val1&mask] |
|
| 237 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 238 |
+ |
|
| 239 |
+ // br1.advance(uint8(v1.entry)) |
|
| 240 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 241 |
+ |
|
| 242 |
+#ifdef GOAMD64_v3 |
|
| 243 |
+ MOVBQZX AL, CX |
|
| 244 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 245 |
+ |
|
| 246 |
+#else |
|
| 247 |
+ MOVBQZX AL, CX |
|
| 248 |
+ SHLQ CL, br_value // value <<= n |
|
| 249 |
+ |
|
| 250 |
+#endif |
|
| 251 |
+ |
|
| 252 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 253 |
+ |
|
| 254 |
+ // these two writes get coalesced |
|
| 255 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 256 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 257 |
+ MOVW BX, 256(buffer)(off*1) |
|
| 258 |
+ |
|
| 259 |
+ // update the bitrader reader structure |
|
| 260 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br1) |
|
| 261 |
+ MOVQ br_value, bitReaderShifted_value(br1) |
|
| 262 |
+ MOVQ br_offset, bitReaderShifted_off(br1) |
|
| 263 |
+ |
|
| 264 |
+ // const stream = 2 |
|
| 265 |
+ // br2.fillFast() |
|
| 266 |
+ MOVBQZX bitReaderShifted_bitsRead(br2), br_bits_read |
|
| 267 |
+ MOVQ bitReaderShifted_value(br2), br_value |
|
| 268 |
+ MOVQ bitReaderShifted_off(br2), br_offset |
|
| 269 |
+ |
|
| 270 |
+ // We must have at least 2 * max tablelog left |
|
| 271 |
+ CMPQ br_bits_read, $64-22 |
|
| 272 |
+ JBE skip_fill2 |
|
| 273 |
+ |
|
| 274 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 275 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 276 |
+ |
|
| 277 |
+ // v := b.in[b.off-4 : b.off] |
|
| 278 |
+ // v = v[:4] |
|
| 279 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 280 |
+ MOVQ bitReaderShifted_in(br2), AX |
|
| 281 |
+ |
|
| 282 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 283 |
+#ifdef GOAMD64_v3 |
|
| 284 |
+ SHLXQ br_bits_read, 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) << (b.bitsRead & 63) |
|
| 285 |
+ |
|
| 286 |
+#else |
|
| 287 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 288 |
+ MOVQ br_bits_read, CX |
|
| 289 |
+ SHLQ CL, AX |
|
| 290 |
+ |
|
| 291 |
+#endif |
|
| 292 |
+ |
|
| 293 |
+ ORQ AX, br_value |
|
| 294 |
+ |
|
| 295 |
+ // exhausted = exhausted || (br2.off < 4) |
|
| 296 |
+ CMPQ br_offset, $4 |
|
| 297 |
+ SETLT DL |
|
| 298 |
+ ORB DL, DH |
|
| 299 |
+ |
|
| 300 |
+ // } |
|
| 301 |
+skip_fill2: |
|
| 302 |
+ |
|
| 303 |
+ // val0 := br2.peekTopBits(peekBits) |
|
| 304 |
+#ifdef GOAMD64_v3 |
|
| 305 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 306 |
+ |
|
| 307 |
+#else |
|
| 308 |
+ MOVQ br_value, AX |
|
| 309 |
+ MOVQ peek_bits, CX |
|
| 310 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 311 |
+ |
|
| 312 |
+#endif |
|
| 313 |
+ |
|
| 314 |
+ // v0 := table[val0&mask] |
|
| 315 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 316 |
+ |
|
| 317 |
+ // br2.advance(uint8(v0.entry)) |
|
| 318 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 319 |
+ |
|
| 320 |
+#ifdef GOAMD64_v3 |
|
| 321 |
+ MOVBQZX AL, CX |
|
| 322 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 323 |
+ |
|
| 324 |
+#else |
|
| 325 |
+ MOVBQZX AL, CX |
|
| 326 |
+ SHLQ CL, br_value // value <<= n |
|
| 327 |
+ |
|
| 328 |
+#endif |
|
| 329 |
+ |
|
| 330 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 331 |
+ |
|
| 332 |
+#ifdef GOAMD64_v3 |
|
| 333 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 334 |
+ |
|
| 335 |
+#else |
|
| 336 |
+ // val1 := br2.peekTopBits(peekBits) |
|
| 337 |
+ MOVQ peek_bits, CX |
|
| 338 |
+ MOVQ br_value, AX |
|
| 339 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 340 |
+ |
|
| 341 |
+#endif |
|
| 342 |
+ |
|
| 343 |
+ // v1 := table[val1&mask] |
|
| 344 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 345 |
+ |
|
| 346 |
+ // br2.advance(uint8(v1.entry)) |
|
| 347 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 348 |
+ |
|
| 349 |
+#ifdef GOAMD64_v3 |
|
| 350 |
+ MOVBQZX AL, CX |
|
| 351 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 352 |
+ |
|
| 353 |
+#else |
|
| 354 |
+ MOVBQZX AL, CX |
|
| 355 |
+ SHLQ CL, br_value // value <<= n |
|
| 356 |
+ |
|
| 357 |
+#endif |
|
| 358 |
+ |
|
| 359 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 360 |
+ |
|
| 361 |
+ // these two writes get coalesced |
|
| 362 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 363 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 364 |
+ MOVW BX, 512(buffer)(off*1) |
|
| 365 |
+ |
|
| 366 |
+ // update the bitrader reader structure |
|
| 367 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br2) |
|
| 368 |
+ MOVQ br_value, bitReaderShifted_value(br2) |
|
| 369 |
+ MOVQ br_offset, bitReaderShifted_off(br2) |
|
| 370 |
+ |
|
| 371 |
+ // const stream = 3 |
|
| 372 |
+ // br3.fillFast() |
|
| 373 |
+ MOVBQZX bitReaderShifted_bitsRead(br3), br_bits_read |
|
| 374 |
+ MOVQ bitReaderShifted_value(br3), br_value |
|
| 375 |
+ MOVQ bitReaderShifted_off(br3), br_offset |
|
| 376 |
+ |
|
| 377 |
+ // We must have at least 2 * max tablelog left |
|
| 378 |
+ CMPQ br_bits_read, $64-22 |
|
| 379 |
+ JBE skip_fill3 |
|
| 380 |
+ |
|
| 381 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 382 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 383 |
+ |
|
| 384 |
+ // v := b.in[b.off-4 : b.off] |
|
| 385 |
+ // v = v[:4] |
|
| 386 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 387 |
+ MOVQ bitReaderShifted_in(br3), AX |
|
| 388 |
+ |
|
| 389 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 390 |
+#ifdef GOAMD64_v3 |
|
| 391 |
+ SHLXQ br_bits_read, 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) << (b.bitsRead & 63) |
|
| 392 |
+ |
|
| 393 |
+#else |
|
| 394 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 395 |
+ MOVQ br_bits_read, CX |
|
| 396 |
+ SHLQ CL, AX |
|
| 397 |
+ |
|
| 398 |
+#endif |
|
| 399 |
+ |
|
| 400 |
+ ORQ AX, br_value |
|
| 401 |
+ |
|
| 402 |
+ // exhausted = exhausted || (br3.off < 4) |
|
| 403 |
+ CMPQ br_offset, $4 |
|
| 404 |
+ SETLT DL |
|
| 405 |
+ ORB DL, DH |
|
| 406 |
+ |
|
| 407 |
+ // } |
|
| 408 |
+skip_fill3: |
|
| 409 |
+ |
|
| 410 |
+ // val0 := br3.peekTopBits(peekBits) |
|
| 411 |
+#ifdef GOAMD64_v3 |
|
| 412 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 413 |
+ |
|
| 414 |
+#else |
|
| 415 |
+ MOVQ br_value, AX |
|
| 416 |
+ MOVQ peek_bits, CX |
|
| 417 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 418 |
+ |
|
| 419 |
+#endif |
|
| 420 |
+ |
|
| 421 |
+ // v0 := table[val0&mask] |
|
| 422 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 423 |
+ |
|
| 424 |
+ // br3.advance(uint8(v0.entry)) |
|
| 425 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 426 |
+ |
|
| 427 |
+#ifdef GOAMD64_v3 |
|
| 428 |
+ MOVBQZX AL, CX |
|
| 429 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 430 |
+ |
|
| 431 |
+#else |
|
| 432 |
+ MOVBQZX AL, CX |
|
| 433 |
+ SHLQ CL, br_value // value <<= n |
|
| 434 |
+ |
|
| 435 |
+#endif |
|
| 436 |
+ |
|
| 437 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 438 |
+ |
|
| 439 |
+#ifdef GOAMD64_v3 |
|
| 440 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 441 |
+ |
|
| 442 |
+#else |
|
| 443 |
+ // val1 := br3.peekTopBits(peekBits) |
|
| 444 |
+ MOVQ peek_bits, CX |
|
| 445 |
+ MOVQ br_value, AX |
|
| 446 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 447 |
+ |
|
| 448 |
+#endif |
|
| 449 |
+ |
|
| 450 |
+ // v1 := table[val1&mask] |
|
| 451 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 452 |
+ |
|
| 453 |
+ // br3.advance(uint8(v1.entry)) |
|
| 454 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 455 |
+ |
|
| 456 |
+#ifdef GOAMD64_v3 |
|
| 457 |
+ MOVBQZX AL, CX |
|
| 458 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 459 |
+ |
|
| 460 |
+#else |
|
| 461 |
+ MOVBQZX AL, CX |
|
| 462 |
+ SHLQ CL, br_value // value <<= n |
|
| 463 |
+ |
|
| 464 |
+#endif |
|
| 465 |
+ |
|
| 466 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 467 |
+ |
|
| 468 |
+ // these two writes get coalesced |
|
| 469 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 470 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 471 |
+ MOVW BX, 768(buffer)(off*1) |
|
| 472 |
+ |
|
| 473 |
+ // update the bitrader reader structure |
|
| 474 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br3) |
|
| 475 |
+ MOVQ br_value, bitReaderShifted_value(br3) |
|
| 476 |
+ MOVQ br_offset, bitReaderShifted_off(br3) |
|
| 477 |
+ |
|
| 478 |
+ ADDQ $2, off // off += 2 |
|
| 479 |
+ |
|
| 480 |
+ TESTB DH, DH // any br[i].ofs < 4? |
|
| 481 |
+ JNZ end |
|
| 482 |
+ |
|
| 483 |
+ CMPQ off, $bufoff |
|
| 484 |
+ JL main_loop |
|
| 485 |
+ |
|
| 486 |
+end: |
|
| 487 |
+ MOVQ 0(SP), BP |
|
| 488 |
+ |
|
| 489 |
+ MOVB off, ret+56(FP) |
|
| 490 |
+ RET |
|
| 491 |
+ |
|
| 492 |
+#undef off |
|
| 493 |
+#undef buffer |
|
| 494 |
+#undef table |
|
| 495 |
+ |
|
| 496 |
+#undef br_bits_read |
|
| 497 |
+#undef br_value |
|
| 498 |
+#undef br_offset |
|
| 499 |
+#undef peek_bits |
|
| 500 |
+#undef exhausted |
|
| 501 |
+ |
|
| 502 |
+#undef br0 |
|
| 503 |
+#undef br1 |
|
| 504 |
+#undef br2 |
|
| 505 |
+#undef br3 |
| 0 | 506 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,195 @@ |
| 0 |
+// +build !appengine |
|
| 1 |
+// +build gc |
|
| 2 |
+// +build !noasm |
|
| 3 |
+ |
|
| 4 |
+#include "textflag.h" |
|
| 5 |
+#include "funcdata.h" |
|
| 6 |
+#include "go_asm.h" |
|
| 7 |
+ |
|
| 8 |
+#ifdef GOAMD64_v4 |
|
| 9 |
+#ifndef GOAMD64_v3 |
|
| 10 |
+#define GOAMD64_v3 |
|
| 11 |
+#endif |
|
| 12 |
+#endif |
|
| 13 |
+ |
|
| 14 |
+#define bufoff 256 // see decompress.go, we're using [4][256]byte table |
|
| 15 |
+ |
|
| 16 |
+//func decompress4x_main_loop_x86(pbr0, pbr1, pbr2, pbr3 *bitReaderShifted, |
|
| 17 |
+// peekBits uint8, buf *byte, tbl *dEntrySingle) (int, bool) |
|
| 18 |
+TEXT ·decompress4x_main_loop_x86(SB), NOSPLIT, $8 |
|
| 19 |
+#define off R8 |
|
| 20 |
+#define buffer DI |
|
| 21 |
+#define table SI |
|
| 22 |
+ |
|
| 23 |
+#define br_bits_read R9 |
|
| 24 |
+#define br_value R10 |
|
| 25 |
+#define br_offset R11 |
|
| 26 |
+#define peek_bits R12 |
|
| 27 |
+#define exhausted DX |
|
| 28 |
+ |
|
| 29 |
+#define br0 R13 |
|
| 30 |
+#define br1 R14 |
|
| 31 |
+#define br2 R15 |
|
| 32 |
+#define br3 BP |
|
| 33 |
+ |
|
| 34 |
+ MOVQ BP, 0(SP) |
|
| 35 |
+ |
|
| 36 |
+ XORQ exhausted, exhausted // exhausted = false |
|
| 37 |
+ XORQ off, off // off = 0 |
|
| 38 |
+ |
|
| 39 |
+ MOVBQZX peekBits+32(FP), peek_bits |
|
| 40 |
+ MOVQ buf+40(FP), buffer |
|
| 41 |
+ MOVQ tbl+48(FP), table |
|
| 42 |
+ |
|
| 43 |
+ MOVQ pbr0+0(FP), br0 |
|
| 44 |
+ MOVQ pbr1+8(FP), br1 |
|
| 45 |
+ MOVQ pbr2+16(FP), br2 |
|
| 46 |
+ MOVQ pbr3+24(FP), br3 |
|
| 47 |
+ |
|
| 48 |
+main_loop: |
|
| 49 |
+{{ define "decode_2_values_x86" }}
|
|
| 50 |
+ // const stream = {{ var "id" }}
|
|
| 51 |
+ // br{{ var "id"}}.fillFast()
|
|
| 52 |
+ MOVBQZX bitReaderShifted_bitsRead(br{{ var "id" }}), br_bits_read
|
|
| 53 |
+ MOVQ bitReaderShifted_value(br{{ var "id" }}), br_value
|
|
| 54 |
+ MOVQ bitReaderShifted_off(br{{ var "id" }}), br_offset
|
|
| 55 |
+ |
|
| 56 |
+ // We must have at least 2 * max tablelog left |
|
| 57 |
+ CMPQ br_bits_read, $64-22 |
|
| 58 |
+ JBE skip_fill{{ var "id" }}
|
|
| 59 |
+ |
|
| 60 |
+ SUBQ $32, br_bits_read // b.bitsRead -= 32 |
|
| 61 |
+ SUBQ $4, br_offset // b.off -= 4 |
|
| 62 |
+ |
|
| 63 |
+ // v := b.in[b.off-4 : b.off] |
|
| 64 |
+ // v = v[:4] |
|
| 65 |
+ // low := (uint32(v[0])) | (uint32(v[1]) << 8) | (uint32(v[2]) << 16) | (uint32(v[3]) << 24) |
|
| 66 |
+ MOVQ bitReaderShifted_in(br{{ var "id" }}), AX
|
|
| 67 |
+ |
|
| 68 |
+ // b.value |= uint64(low) << (b.bitsRead & 63) |
|
| 69 |
+#ifdef GOAMD64_v3 |
|
| 70 |
+ SHLXQ br_bits_read, 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) << (b.bitsRead & 63) |
|
| 71 |
+#else |
|
| 72 |
+ MOVL 0(br_offset)(AX*1), AX // AX = uint32(b.in[b.off:b.off+4]) |
|
| 73 |
+ MOVQ br_bits_read, CX |
|
| 74 |
+ SHLQ CL, AX |
|
| 75 |
+#endif |
|
| 76 |
+ |
|
| 77 |
+ ORQ AX, br_value |
|
| 78 |
+ |
|
| 79 |
+ // exhausted = exhausted || (br{{ var "id"}}.off < 4)
|
|
| 80 |
+ CMPQ br_offset, $4 |
|
| 81 |
+ SETLT DL |
|
| 82 |
+ ORB DL, DH |
|
| 83 |
+ // } |
|
| 84 |
+skip_fill{{ var "id" }}:
|
|
| 85 |
+ |
|
| 86 |
+ // val0 := br{{ var "id"}}.peekTopBits(peekBits)
|
|
| 87 |
+#ifdef GOAMD64_v3 |
|
| 88 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 89 |
+#else |
|
| 90 |
+ MOVQ br_value, AX |
|
| 91 |
+ MOVQ peek_bits, CX |
|
| 92 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 93 |
+#endif |
|
| 94 |
+ |
|
| 95 |
+ // v0 := table[val0&mask] |
|
| 96 |
+ MOVW 0(table)(AX*2), AX // AX - v0 |
|
| 97 |
+ |
|
| 98 |
+ // br{{ var "id"}}.advance(uint8(v0.entry))
|
|
| 99 |
+ MOVB AH, BL // BL = uint8(v0.entry >> 8) |
|
| 100 |
+ |
|
| 101 |
+#ifdef GOAMD64_v3 |
|
| 102 |
+ MOVBQZX AL, CX |
|
| 103 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 104 |
+#else |
|
| 105 |
+ MOVBQZX AL, CX |
|
| 106 |
+ SHLQ CL, br_value // value <<= n |
|
| 107 |
+#endif |
|
| 108 |
+ |
|
| 109 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 110 |
+ |
|
| 111 |
+ |
|
| 112 |
+#ifdef GOAMD64_v3 |
|
| 113 |
+ SHRXQ peek_bits, br_value, AX // AX = (value >> peek_bits) & mask |
|
| 114 |
+#else |
|
| 115 |
+ // val1 := br{{ var "id"}}.peekTopBits(peekBits)
|
|
| 116 |
+ MOVQ peek_bits, CX |
|
| 117 |
+ MOVQ br_value, AX |
|
| 118 |
+ SHRQ CL, AX // AX = (value >> peek_bits) & mask |
|
| 119 |
+#endif |
|
| 120 |
+ |
|
| 121 |
+ // v1 := table[val1&mask] |
|
| 122 |
+ MOVW 0(table)(AX*2), AX // AX - v1 |
|
| 123 |
+ |
|
| 124 |
+ // br{{ var "id"}}.advance(uint8(v1.entry))
|
|
| 125 |
+ MOVB AH, BH // BH = uint8(v1.entry >> 8) |
|
| 126 |
+ |
|
| 127 |
+#ifdef GOAMD64_v3 |
|
| 128 |
+ MOVBQZX AL, CX |
|
| 129 |
+ SHLXQ AX, br_value, br_value // value <<= n |
|
| 130 |
+#else |
|
| 131 |
+ MOVBQZX AL, CX |
|
| 132 |
+ SHLQ CL, br_value // value <<= n |
|
| 133 |
+#endif |
|
| 134 |
+ |
|
| 135 |
+ ADDQ CX, br_bits_read // bits_read += n |
|
| 136 |
+ |
|
| 137 |
+ |
|
| 138 |
+ // these two writes get coalesced |
|
| 139 |
+ // buf[stream][off] = uint8(v0.entry >> 8) |
|
| 140 |
+ // buf[stream][off+1] = uint8(v1.entry >> 8) |
|
| 141 |
+ MOVW BX, {{ var "bufofs" }}(buffer)(off*1)
|
|
| 142 |
+ |
|
| 143 |
+ // update the bitrader reader structure |
|
| 144 |
+ MOVB br_bits_read, bitReaderShifted_bitsRead(br{{ var "id" }})
|
|
| 145 |
+ MOVQ br_value, bitReaderShifted_value(br{{ var "id" }})
|
|
| 146 |
+ MOVQ br_offset, bitReaderShifted_off(br{{ var "id" }})
|
|
| 147 |
+{{ end }}
|
|
| 148 |
+ |
|
| 149 |
+ {{ set "id" "0" }}
|
|
| 150 |
+ {{ set "ofs" "0" }}
|
|
| 151 |
+ {{ set "bufofs" "0" }} {{/* id * bufoff */}}
|
|
| 152 |
+ {{ template "decode_2_values_x86" . }}
|
|
| 153 |
+ |
|
| 154 |
+ {{ set "id" "1" }}
|
|
| 155 |
+ {{ set "ofs" "8" }}
|
|
| 156 |
+ {{ set "bufofs" "256" }}
|
|
| 157 |
+ {{ template "decode_2_values_x86" . }}
|
|
| 158 |
+ |
|
| 159 |
+ {{ set "id" "2" }}
|
|
| 160 |
+ {{ set "ofs" "16" }}
|
|
| 161 |
+ {{ set "bufofs" "512" }}
|
|
| 162 |
+ {{ template "decode_2_values_x86" . }}
|
|
| 163 |
+ |
|
| 164 |
+ {{ set "id" "3" }}
|
|
| 165 |
+ {{ set "ofs" "24" }}
|
|
| 166 |
+ {{ set "bufofs" "768" }}
|
|
| 167 |
+ {{ template "decode_2_values_x86" . }}
|
|
| 168 |
+ |
|
| 169 |
+ ADDQ $2, off // off += 2 |
|
| 170 |
+ |
|
| 171 |
+ TESTB DH, DH // any br[i].ofs < 4? |
|
| 172 |
+ JNZ end |
|
| 173 |
+ |
|
| 174 |
+ CMPQ off, $bufoff |
|
| 175 |
+ JL main_loop |
|
| 176 |
+end: |
|
| 177 |
+ MOVQ 0(SP), BP |
|
| 178 |
+ |
|
| 179 |
+ MOVB off, ret+56(FP) |
|
| 180 |
+ RET |
|
| 181 |
+#undef off |
|
| 182 |
+#undef buffer |
|
| 183 |
+#undef table |
|
| 184 |
+ |
|
| 185 |
+#undef br_bits_read |
|
| 186 |
+#undef br_value |
|
| 187 |
+#undef br_offset |
|
| 188 |
+#undef peek_bits |
|
| 189 |
+#undef exhausted |
|
| 190 |
+ |
|
| 191 |
+#undef br0 |
|
| 192 |
+#undef br1 |
|
| 193 |
+#undef br2 |
|
| 194 |
+#undef br3 |
| 0 | 195 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,193 @@ |
| 0 |
+//go:build !amd64 || appengine || !gc || noasm |
|
| 1 |
+// +build !amd64 appengine !gc noasm |
|
| 2 |
+ |
|
| 3 |
+// This file contains a generic implementation of Decoder.Decompress4X. |
|
| 4 |
+package huff0 |
|
| 5 |
+ |
|
| 6 |
+import ( |
|
| 7 |
+ "errors" |
|
| 8 |
+ "fmt" |
|
| 9 |
+) |
|
| 10 |
+ |
|
| 11 |
+// Decompress4X will decompress a 4X encoded stream. |
|
| 12 |
+// The length of the supplied input must match the end of a block exactly. |
|
| 13 |
+// The *capacity* of the dst slice must match the destination size of |
|
| 14 |
+// the uncompressed data exactly. |
|
| 15 |
+func (d *Decoder) Decompress4X(dst, src []byte) ([]byte, error) {
|
|
| 16 |
+ if len(d.dt.single) == 0 {
|
|
| 17 |
+ return nil, errors.New("no table loaded")
|
|
| 18 |
+ } |
|
| 19 |
+ if len(src) < 6+(4*1) {
|
|
| 20 |
+ return nil, errors.New("input too small")
|
|
| 21 |
+ } |
|
| 22 |
+ if use8BitTables && d.actualTableLog <= 8 {
|
|
| 23 |
+ return d.decompress4X8bit(dst, src) |
|
| 24 |
+ } |
|
| 25 |
+ |
|
| 26 |
+ var br [4]bitReaderShifted |
|
| 27 |
+ // Decode "jump table" |
|
| 28 |
+ start := 6 |
|
| 29 |
+ for i := 0; i < 3; i++ {
|
|
| 30 |
+ length := int(src[i*2]) | (int(src[i*2+1]) << 8) |
|
| 31 |
+ if start+length >= len(src) {
|
|
| 32 |
+ return nil, errors.New("truncated input (or invalid offset)")
|
|
| 33 |
+ } |
|
| 34 |
+ err := br[i].init(src[start : start+length]) |
|
| 35 |
+ if err != nil {
|
|
| 36 |
+ return nil, err |
|
| 37 |
+ } |
|
| 38 |
+ start += length |
|
| 39 |
+ } |
|
| 40 |
+ err := br[3].init(src[start:]) |
|
| 41 |
+ if err != nil {
|
|
| 42 |
+ return nil, err |
|
| 43 |
+ } |
|
| 44 |
+ |
|
| 45 |
+ // destination, offset to match first output |
|
| 46 |
+ dstSize := cap(dst) |
|
| 47 |
+ dst = dst[:dstSize] |
|
| 48 |
+ out := dst |
|
| 49 |
+ dstEvery := (dstSize + 3) / 4 |
|
| 50 |
+ |
|
| 51 |
+ const tlSize = 1 << tableLogMax |
|
| 52 |
+ const tlMask = tlSize - 1 |
|
| 53 |
+ single := d.dt.single[:tlSize] |
|
| 54 |
+ |
|
| 55 |
+ // Use temp table to avoid bound checks/append penalty. |
|
| 56 |
+ buf := d.buffer() |
|
| 57 |
+ var off uint8 |
|
| 58 |
+ var decoded int |
|
| 59 |
+ |
|
| 60 |
+ // Decode 2 values from each decoder/loop. |
|
| 61 |
+ const bufoff = 256 |
|
| 62 |
+ for {
|
|
| 63 |
+ if br[0].off < 4 || br[1].off < 4 || br[2].off < 4 || br[3].off < 4 {
|
|
| 64 |
+ break |
|
| 65 |
+ } |
|
| 66 |
+ |
|
| 67 |
+ {
|
|
| 68 |
+ const stream = 0 |
|
| 69 |
+ const stream2 = 1 |
|
| 70 |
+ br[stream].fillFast() |
|
| 71 |
+ br[stream2].fillFast() |
|
| 72 |
+ |
|
| 73 |
+ val := br[stream].peekBitsFast(d.actualTableLog) |
|
| 74 |
+ val2 := br[stream2].peekBitsFast(d.actualTableLog) |
|
| 75 |
+ v := single[val&tlMask] |
|
| 76 |
+ v2 := single[val2&tlMask] |
|
| 77 |
+ br[stream].advance(uint8(v.entry)) |
|
| 78 |
+ br[stream2].advance(uint8(v2.entry)) |
|
| 79 |
+ buf[stream][off] = uint8(v.entry >> 8) |
|
| 80 |
+ buf[stream2][off] = uint8(v2.entry >> 8) |
|
| 81 |
+ |
|
| 82 |
+ val = br[stream].peekBitsFast(d.actualTableLog) |
|
| 83 |
+ val2 = br[stream2].peekBitsFast(d.actualTableLog) |
|
| 84 |
+ v = single[val&tlMask] |
|
| 85 |
+ v2 = single[val2&tlMask] |
|
| 86 |
+ br[stream].advance(uint8(v.entry)) |
|
| 87 |
+ br[stream2].advance(uint8(v2.entry)) |
|
| 88 |
+ buf[stream][off+1] = uint8(v.entry >> 8) |
|
| 89 |
+ buf[stream2][off+1] = uint8(v2.entry >> 8) |
|
| 90 |
+ } |
|
| 91 |
+ |
|
| 92 |
+ {
|
|
| 93 |
+ const stream = 2 |
|
| 94 |
+ const stream2 = 3 |
|
| 95 |
+ br[stream].fillFast() |
|
| 96 |
+ br[stream2].fillFast() |
|
| 97 |
+ |
|
| 98 |
+ val := br[stream].peekBitsFast(d.actualTableLog) |
|
| 99 |
+ val2 := br[stream2].peekBitsFast(d.actualTableLog) |
|
| 100 |
+ v := single[val&tlMask] |
|
| 101 |
+ v2 := single[val2&tlMask] |
|
| 102 |
+ br[stream].advance(uint8(v.entry)) |
|
| 103 |
+ br[stream2].advance(uint8(v2.entry)) |
|
| 104 |
+ buf[stream][off] = uint8(v.entry >> 8) |
|
| 105 |
+ buf[stream2][off] = uint8(v2.entry >> 8) |
|
| 106 |
+ |
|
| 107 |
+ val = br[stream].peekBitsFast(d.actualTableLog) |
|
| 108 |
+ val2 = br[stream2].peekBitsFast(d.actualTableLog) |
|
| 109 |
+ v = single[val&tlMask] |
|
| 110 |
+ v2 = single[val2&tlMask] |
|
| 111 |
+ br[stream].advance(uint8(v.entry)) |
|
| 112 |
+ br[stream2].advance(uint8(v2.entry)) |
|
| 113 |
+ buf[stream][off+1] = uint8(v.entry >> 8) |
|
| 114 |
+ buf[stream2][off+1] = uint8(v2.entry >> 8) |
|
| 115 |
+ } |
|
| 116 |
+ |
|
| 117 |
+ off += 2 |
|
| 118 |
+ |
|
| 119 |
+ if off == 0 {
|
|
| 120 |
+ if bufoff > dstEvery {
|
|
| 121 |
+ d.bufs.Put(buf) |
|
| 122 |
+ return nil, errors.New("corruption detected: stream overrun 1")
|
|
| 123 |
+ } |
|
| 124 |
+ copy(out, buf[0][:]) |
|
| 125 |
+ copy(out[dstEvery:], buf[1][:]) |
|
| 126 |
+ copy(out[dstEvery*2:], buf[2][:]) |
|
| 127 |
+ copy(out[dstEvery*3:], buf[3][:]) |
|
| 128 |
+ out = out[bufoff:] |
|
| 129 |
+ decoded += bufoff * 4 |
|
| 130 |
+ // There must at least be 3 buffers left. |
|
| 131 |
+ if len(out) < dstEvery*3 {
|
|
| 132 |
+ d.bufs.Put(buf) |
|
| 133 |
+ return nil, errors.New("corruption detected: stream overrun 2")
|
|
| 134 |
+ } |
|
| 135 |
+ } |
|
| 136 |
+ } |
|
| 137 |
+ if off > 0 {
|
|
| 138 |
+ ioff := int(off) |
|
| 139 |
+ if len(out) < dstEvery*3+ioff {
|
|
| 140 |
+ d.bufs.Put(buf) |
|
| 141 |
+ return nil, errors.New("corruption detected: stream overrun 3")
|
|
| 142 |
+ } |
|
| 143 |
+ copy(out, buf[0][:off]) |
|
| 144 |
+ copy(out[dstEvery:], buf[1][:off]) |
|
| 145 |
+ copy(out[dstEvery*2:], buf[2][:off]) |
|
| 146 |
+ copy(out[dstEvery*3:], buf[3][:off]) |
|
| 147 |
+ decoded += int(off) * 4 |
|
| 148 |
+ out = out[off:] |
|
| 149 |
+ } |
|
| 150 |
+ |
|
| 151 |
+ // Decode remaining. |
|
| 152 |
+ remainBytes := dstEvery - (decoded / 4) |
|
| 153 |
+ for i := range br {
|
|
| 154 |
+ offset := dstEvery * i |
|
| 155 |
+ endsAt := offset + remainBytes |
|
| 156 |
+ if endsAt > len(out) {
|
|
| 157 |
+ endsAt = len(out) |
|
| 158 |
+ } |
|
| 159 |
+ br := &br[i] |
|
| 160 |
+ bitsLeft := br.remaining() |
|
| 161 |
+ for bitsLeft > 0 {
|
|
| 162 |
+ br.fill() |
|
| 163 |
+ if offset >= endsAt {
|
|
| 164 |
+ d.bufs.Put(buf) |
|
| 165 |
+ return nil, errors.New("corruption detected: stream overrun 4")
|
|
| 166 |
+ } |
|
| 167 |
+ |
|
| 168 |
+ // Read value and increment offset. |
|
| 169 |
+ val := br.peekBitsFast(d.actualTableLog) |
|
| 170 |
+ v := single[val&tlMask].entry |
|
| 171 |
+ nBits := uint8(v) |
|
| 172 |
+ br.advance(nBits) |
|
| 173 |
+ bitsLeft -= uint(nBits) |
|
| 174 |
+ out[offset] = uint8(v >> 8) |
|
| 175 |
+ offset++ |
|
| 176 |
+ } |
|
| 177 |
+ if offset != endsAt {
|
|
| 178 |
+ d.bufs.Put(buf) |
|
| 179 |
+ return nil, fmt.Errorf("corruption detected: short output block %d, end %d != %d", i, offset, endsAt)
|
|
| 180 |
+ } |
|
| 181 |
+ decoded += offset - dstEvery*i |
|
| 182 |
+ err = br.close() |
|
| 183 |
+ if err != nil {
|
|
| 184 |
+ return nil, err |
|
| 185 |
+ } |
|
| 186 |
+ } |
|
| 187 |
+ d.bufs.Put(buf) |
|
| 188 |
+ if dstSize != decoded {
|
|
| 189 |
+ return nil, errors.New("corruption detected: short output block")
|
|
| 190 |
+ } |
|
| 191 |
+ return dst, nil |
|
| 192 |
+} |
| ... | ... |
@@ -153,10 +153,10 @@ http://sun.aei.polsl.pl/~sdeor/corpus/silesia.zip |
| 153 | 153 |
|
| 154 | 154 |
This package: |
| 155 | 155 |
file out level insize outsize millis mb/s |
| 156 |
-silesia.tar zskp 1 211947520 73101992 643 313.87 |
|
| 157 |
-silesia.tar zskp 2 211947520 67504318 969 208.38 |
|
| 158 |
-silesia.tar zskp 3 211947520 64595893 2007 100.68 |
|
| 159 |
-silesia.tar zskp 4 211947520 60995370 8825 22.90 |
|
| 156 |
+silesia.tar zskp 1 211947520 73821326 634 318.47 |
|
| 157 |
+silesia.tar zskp 2 211947520 67655404 1508 133.96 |
|
| 158 |
+silesia.tar zskp 3 211947520 64746933 3000 67.37 |
|
| 159 |
+silesia.tar zskp 4 211947520 60073508 16926 11.94 |
|
| 160 | 160 |
|
| 161 | 161 |
cgo zstd: |
| 162 | 162 |
silesia.tar zstd 1 211947520 73605392 543 371.56 |
| ... | ... |
@@ -165,94 +165,94 @@ silesia.tar zstd 6 211947520 62916450 1913 105.66 |
| 165 | 165 |
silesia.tar zstd 9 211947520 60212393 5063 39.92 |
| 166 | 166 |
|
| 167 | 167 |
gzip, stdlib/this package: |
| 168 |
-silesia.tar gzstd 1 211947520 80007735 1654 122.21 |
|
| 169 |
-silesia.tar gzkp 1 211947520 80136201 1152 175.45 |
|
| 168 |
+silesia.tar gzstd 1 211947520 80007735 1498 134.87 |
|
| 169 |
+silesia.tar gzkp 1 211947520 80088272 1009 200.31 |
|
| 170 | 170 |
|
| 171 | 171 |
GOB stream of binary data. Highly compressible. |
| 172 | 172 |
https://files.klauspost.com/compress/gob-stream.7z |
| 173 | 173 |
|
| 174 | 174 |
file out level insize outsize millis mb/s |
| 175 |
-gob-stream zskp 1 1911399616 235022249 3088 590.30 |
|
| 176 |
-gob-stream zskp 2 1911399616 205669791 3786 481.34 |
|
| 177 |
-gob-stream zskp 3 1911399616 175034659 9636 189.17 |
|
| 178 |
-gob-stream zskp 4 1911399616 165609838 50369 36.19 |
|
| 175 |
+gob-stream zskp 1 1911399616 233948096 3230 564.34 |
|
| 176 |
+gob-stream zskp 2 1911399616 203997694 4997 364.73 |
|
| 177 |
+gob-stream zskp 3 1911399616 173526523 13435 135.68 |
|
| 178 |
+gob-stream zskp 4 1911399616 162195235 47559 38.33 |
|
| 179 | 179 |
|
| 180 | 180 |
gob-stream zstd 1 1911399616 249810424 2637 691.26 |
| 181 | 181 |
gob-stream zstd 3 1911399616 208192146 3490 522.31 |
| 182 | 182 |
gob-stream zstd 6 1911399616 193632038 6687 272.56 |
| 183 | 183 |
gob-stream zstd 9 1911399616 177620386 16175 112.70 |
| 184 | 184 |
|
| 185 |
-gob-stream gzstd 1 1911399616 357382641 10251 177.82 |
|
| 186 |
-gob-stream gzkp 1 1911399616 359753026 5438 335.20 |
|
| 185 |
+gob-stream gzstd 1 1911399616 357382013 9046 201.49 |
|
| 186 |
+gob-stream gzkp 1 1911399616 359136669 4885 373.08 |
|
| 187 | 187 |
|
| 188 | 188 |
The test data for the Large Text Compression Benchmark is the first |
| 189 | 189 |
10^9 bytes of the English Wikipedia dump on Mar. 3, 2006. |
| 190 | 190 |
http://mattmahoney.net/dc/textdata.html |
| 191 | 191 |
|
| 192 | 192 |
file out level insize outsize millis mb/s |
| 193 |
-enwik9 zskp 1 1000000000 343848582 3609 264.18 |
|
| 194 |
-enwik9 zskp 2 1000000000 317276632 5746 165.97 |
|
| 195 |
-enwik9 zskp 3 1000000000 292243069 12162 78.41 |
|
| 196 |
-enwik9 zskp 4 1000000000 262183768 82837 11.51 |
|
| 193 |
+enwik9 zskp 1 1000000000 343833605 3687 258.64 |
|
| 194 |
+enwik9 zskp 2 1000000000 317001237 7672 124.29 |
|
| 195 |
+enwik9 zskp 3 1000000000 291915823 15923 59.89 |
|
| 196 |
+enwik9 zskp 4 1000000000 261710291 77697 12.27 |
|
| 197 | 197 |
|
| 198 | 198 |
enwik9 zstd 1 1000000000 358072021 3110 306.65 |
| 199 | 199 |
enwik9 zstd 3 1000000000 313734672 4784 199.35 |
| 200 | 200 |
enwik9 zstd 6 1000000000 295138875 10290 92.68 |
| 201 | 201 |
enwik9 zstd 9 1000000000 278348700 28549 33.40 |
| 202 | 202 |
|
| 203 |
-enwik9 gzstd 1 1000000000 382578136 9604 99.30 |
|
| 204 |
-enwik9 gzkp 1 1000000000 383825945 6544 145.73 |
|
| 203 |
+enwik9 gzstd 1 1000000000 382578136 8608 110.78 |
|
| 204 |
+enwik9 gzkp 1 1000000000 382781160 5628 169.45 |
|
| 205 | 205 |
|
| 206 | 206 |
Highly compressible JSON file. |
| 207 | 207 |
https://files.klauspost.com/compress/github-june-2days-2019.json.zst |
| 208 | 208 |
|
| 209 | 209 |
file out level insize outsize millis mb/s |
| 210 |
-github-june-2days-2019.json zskp 1 6273951764 699045015 10620 563.40 |
|
| 211 |
-github-june-2days-2019.json zskp 2 6273951764 617881763 11687 511.96 |
|
| 212 |
-github-june-2days-2019.json zskp 3 6273951764 524340691 34043 175.75 |
|
| 213 |
-github-june-2days-2019.json zskp 4 6273951764 470320075 170190 35.16 |
|
| 210 |
+github-june-2days-2019.json zskp 1 6273951764 697439532 9789 611.17 |
|
| 211 |
+github-june-2days-2019.json zskp 2 6273951764 610876538 18553 322.49 |
|
| 212 |
+github-june-2days-2019.json zskp 3 6273951764 517662858 44186 135.41 |
|
| 213 |
+github-june-2days-2019.json zskp 4 6273951764 464617114 165373 36.18 |
|
| 214 | 214 |
|
| 215 | 215 |
github-june-2days-2019.json zstd 1 6273951764 766284037 8450 708.00 |
| 216 | 216 |
github-june-2days-2019.json zstd 3 6273951764 661889476 10927 547.57 |
| 217 | 217 |
github-june-2days-2019.json zstd 6 6273951764 642756859 22996 260.18 |
| 218 | 218 |
github-june-2days-2019.json zstd 9 6273951764 601974523 52413 114.16 |
| 219 | 219 |
|
| 220 |
-github-june-2days-2019.json gzstd 1 6273951764 1164400847 29948 199.79 |
|
| 221 |
-github-june-2days-2019.json gzkp 1 6273951764 1125417694 21788 274.61 |
|
| 220 |
+github-june-2days-2019.json gzstd 1 6273951764 1164397768 26793 223.32 |
|
| 221 |
+github-june-2days-2019.json gzkp 1 6273951764 1120631856 17693 338.16 |
|
| 222 | 222 |
|
| 223 | 223 |
VM Image, Linux mint with a few installed applications: |
| 224 | 224 |
https://files.klauspost.com/compress/rawstudio-mint14.7z |
| 225 | 225 |
|
| 226 | 226 |
file out level insize outsize millis mb/s |
| 227 |
-rawstudio-mint14.tar zskp 1 8558382592 3667489370 20210 403.84 |
|
| 228 |
-rawstudio-mint14.tar zskp 2 8558382592 3364592300 31873 256.07 |
|
| 229 |
-rawstudio-mint14.tar zskp 3 8558382592 3158085214 77675 105.08 |
|
| 230 |
-rawstudio-mint14.tar zskp 4 8558382592 2965110639 857750 9.52 |
|
| 227 |
+rawstudio-mint14.tar zskp 1 8558382592 3718400221 18206 448.29 |
|
| 228 |
+rawstudio-mint14.tar zskp 2 8558382592 3326118337 37074 220.15 |
|
| 229 |
+rawstudio-mint14.tar zskp 3 8558382592 3163842361 87306 93.49 |
|
| 230 |
+rawstudio-mint14.tar zskp 4 8558382592 2970480650 783862 10.41 |
|
| 231 | 231 |
|
| 232 | 232 |
rawstudio-mint14.tar zstd 1 8558382592 3609250104 17136 476.27 |
| 233 | 233 |
rawstudio-mint14.tar zstd 3 8558382592 3341679997 29262 278.92 |
| 234 | 234 |
rawstudio-mint14.tar zstd 6 8558382592 3235846406 77904 104.77 |
| 235 | 235 |
rawstudio-mint14.tar zstd 9 8558382592 3160778861 140946 57.91 |
| 236 | 236 |
|
| 237 |
-rawstudio-mint14.tar gzstd 1 8558382592 3926257486 57722 141.40 |
|
| 238 |
-rawstudio-mint14.tar gzkp 1 8558382592 3962605659 45113 180.92 |
|
| 237 |
+rawstudio-mint14.tar gzstd 1 8558382592 3926234992 51345 158.96 |
|
| 238 |
+rawstudio-mint14.tar gzkp 1 8558382592 3960117298 36722 222.26 |
|
| 239 | 239 |
|
| 240 | 240 |
CSV data: |
| 241 | 241 |
https://files.klauspost.com/compress/nyc-taxi-data-10M.csv.zst |
| 242 | 242 |
|
| 243 | 243 |
file out level insize outsize millis mb/s |
| 244 |
-nyc-taxi-data-10M.csv zskp 1 3325605752 641339945 8925 355.35 |
|
| 245 |
-nyc-taxi-data-10M.csv zskp 2 3325605752 591748091 11268 281.44 |
|
| 246 |
-nyc-taxi-data-10M.csv zskp 3 3325605752 530289687 25239 125.66 |
|
| 247 |
-nyc-taxi-data-10M.csv zskp 4 3325605752 476268884 135958 23.33 |
|
| 244 |
+nyc-taxi-data-10M.csv zskp 1 3325605752 641319332 9462 335.17 |
|
| 245 |
+nyc-taxi-data-10M.csv zskp 2 3325605752 588976126 17570 180.50 |
|
| 246 |
+nyc-taxi-data-10M.csv zskp 3 3325605752 529329260 32432 97.79 |
|
| 247 |
+nyc-taxi-data-10M.csv zskp 4 3325605752 474949772 138025 22.98 |
|
| 248 | 248 |
|
| 249 | 249 |
nyc-taxi-data-10M.csv zstd 1 3325605752 687399637 8233 385.18 |
| 250 | 250 |
nyc-taxi-data-10M.csv zstd 3 3325605752 598514411 10065 315.07 |
| 251 | 251 |
nyc-taxi-data-10M.csv zstd 6 3325605752 570522953 20038 158.27 |
| 252 | 252 |
nyc-taxi-data-10M.csv zstd 9 3325605752 517554797 64565 49.12 |
| 253 | 253 |
|
| 254 |
-nyc-taxi-data-10M.csv gzstd 1 3325605752 928656485 23876 132.83 |
|
| 255 |
-nyc-taxi-data-10M.csv gzkp 1 3325605752 922257165 16780 189.00 |
|
| 254 |
+nyc-taxi-data-10M.csv gzstd 1 3325605752 928654908 21270 149.11 |
|
| 255 |
+nyc-taxi-data-10M.csv gzkp 1 3325605752 922273214 13929 227.68 |
|
| 256 | 256 |
``` |
| 257 | 257 |
|
| 258 | 258 |
## Decompressor |
| ... | ... |
@@ -167,6 +167,11 @@ func (b *blockDec) reset(br byteBuffer, windowSize uint64) error {
|
| 167 | 167 |
} |
| 168 | 168 |
return ErrCompressedSizeTooBig |
| 169 | 169 |
} |
| 170 |
+ // Empty compressed blocks must at least be 2 bytes |
|
| 171 |
+ // for Literals_Block_Type and one for Sequences_Section_Header. |
|
| 172 |
+ if cSize < 2 {
|
|
| 173 |
+ return ErrBlockTooSmall |
|
| 174 |
+ } |
|
| 170 | 175 |
case blockTypeRaw: |
| 171 | 176 |
if cSize > maxCompressedBlockSize || cSize > int(b.WindowSize) {
|
| 172 | 177 |
if debugDecoder {
|
| ... | ... |
@@ -491,6 +496,9 @@ func (b *blockDec) decodeCompressed(hist *history) error {
|
| 491 | 491 |
} |
| 492 | 492 |
|
| 493 | 493 |
func (b *blockDec) prepareSequences(in []byte, hist *history) (err error) {
|
| 494 |
+ if debugDecoder {
|
|
| 495 |
+ printf("prepareSequences: %d byte(s) input\n", len(in))
|
|
| 496 |
+ } |
|
| 494 | 497 |
// Decode Sequences |
| 495 | 498 |
// https://github.com/facebook/zstd/blob/dev/doc/zstd_compression_format.md#sequences-section |
| 496 | 499 |
if len(in) < 1 {
|
| ... | ... |
@@ -499,8 +507,6 @@ func (b *blockDec) prepareSequences(in []byte, hist *history) (err error) {
|
| 499 | 499 |
var nSeqs int |
| 500 | 500 |
seqHeader := in[0] |
| 501 | 501 |
switch {
|
| 502 |
- case seqHeader == 0: |
|
| 503 |
- in = in[1:] |
|
| 504 | 502 |
case seqHeader < 128: |
| 505 | 503 |
nSeqs = int(seqHeader) |
| 506 | 504 |
in = in[1:] |
| ... | ... |
@@ -517,6 +523,13 @@ func (b *blockDec) prepareSequences(in []byte, hist *history) (err error) {
|
| 517 | 517 |
nSeqs = 0x7f00 + int(in[1]) + (int(in[2]) << 8) |
| 518 | 518 |
in = in[3:] |
| 519 | 519 |
} |
| 520 |
+ if nSeqs == 0 && len(in) != 0 {
|
|
| 521 |
+ // When no sequences, there should not be any more data... |
|
| 522 |
+ if debugDecoder {
|
|
| 523 |
+ printf("prepareSequences: 0 sequences, but %d byte(s) left on stream\n", len(in))
|
|
| 524 |
+ } |
|
| 525 |
+ return ErrUnexpectedBlockSize |
|
| 526 |
+ } |
|
| 520 | 527 |
|
| 521 | 528 |
var seqs = &hist.decoders |
| 522 | 529 |
seqs.nSeqs = nSeqs |
| ... | ... |
@@ -635,6 +648,7 @@ func (b *blockDec) decodeSequences(hist *history) error {
|
| 635 | 635 |
hist.decoders.seqSize = len(hist.decoders.literals) |
| 636 | 636 |
return nil |
| 637 | 637 |
} |
| 638 |
+ hist.decoders.windowSize = hist.windowSize |
|
| 638 | 639 |
hist.decoders.prevOffset = hist.recentOffsets |
| 639 | 640 |
err := hist.decoders.decode(b.sequence) |
| 640 | 641 |
hist.recentOffsets = hist.decoders.prevOffset |
| ... | ... |
@@ -348,10 +348,10 @@ func (d *Decoder) DecodeAll(input, dst []byte) ([]byte, error) {
|
| 348 | 348 |
frame.history.setDict(&dict) |
| 349 | 349 |
} |
| 350 | 350 |
|
| 351 |
- if frame.FrameContentSize > d.o.maxDecodedSize-uint64(len(dst)) {
|
|
| 351 |
+ if frame.FrameContentSize != fcsUnknown && frame.FrameContentSize > d.o.maxDecodedSize-uint64(len(dst)) {
|
|
| 352 | 352 |
return dst, ErrDecoderSizeExceeded |
| 353 | 353 |
} |
| 354 |
- if frame.FrameContentSize > 0 && frame.FrameContentSize < 1<<30 {
|
|
| 354 |
+ if frame.FrameContentSize < 1<<30 {
|
|
| 355 | 355 |
// Never preallocate more than 1 GB up front. |
| 356 | 356 |
if cap(dst)-len(dst) < int(frame.FrameContentSize) {
|
| 357 | 357 |
dst2 := make([]byte, len(dst), len(dst)+int(frame.FrameContentSize)) |
| ... | ... |
@@ -514,7 +514,7 @@ func (d *Decoder) nextBlockSync() (ok bool) {
|
| 514 | 514 |
|
| 515 | 515 |
// Check frame size (before CRC) |
| 516 | 516 |
d.syncStream.decodedFrame += uint64(len(d.current.b)) |
| 517 |
- if d.frame.FrameContentSize > 0 && d.syncStream.decodedFrame > d.frame.FrameContentSize {
|
|
| 517 |
+ if d.syncStream.decodedFrame > d.frame.FrameContentSize {
|
|
| 518 | 518 |
if debugDecoder {
|
| 519 | 519 |
printf("DecodedFrame (%d) > FrameContentSize (%d)\n", d.syncStream.decodedFrame, d.frame.FrameContentSize)
|
| 520 | 520 |
} |
| ... | ... |
@@ -523,7 +523,7 @@ func (d *Decoder) nextBlockSync() (ok bool) {
|
| 523 | 523 |
} |
| 524 | 524 |
|
| 525 | 525 |
// Check FCS |
| 526 |
- if d.current.d.Last && d.frame.FrameContentSize > 0 && d.syncStream.decodedFrame != d.frame.FrameContentSize {
|
|
| 526 |
+ if d.current.d.Last && d.frame.FrameContentSize != fcsUnknown && d.syncStream.decodedFrame != d.frame.FrameContentSize {
|
|
| 527 | 527 |
if debugDecoder {
|
| 528 | 528 |
printf("DecodedFrame (%d) != FrameContentSize (%d)\n", d.syncStream.decodedFrame, d.frame.FrameContentSize)
|
| 529 | 529 |
} |
| ... | ... |
@@ -700,6 +700,7 @@ func (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader, output ch |
| 700 | 700 |
} |
| 701 | 701 |
hist.decoders = block.async.newHist.decoders |
| 702 | 702 |
hist.recentOffsets = block.async.newHist.recentOffsets |
| 703 |
+ hist.windowSize = block.async.newHist.windowSize |
|
| 703 | 704 |
if block.async.newHist.dict != nil {
|
| 704 | 705 |
hist.setDict(block.async.newHist.dict) |
| 705 | 706 |
} |
| ... | ... |
@@ -811,11 +812,11 @@ func (d *Decoder) startStreamDecoder(ctx context.Context, r io.Reader, output ch |
| 811 | 811 |
} |
| 812 | 812 |
if !hasErr {
|
| 813 | 813 |
decodedFrame += uint64(len(do.b)) |
| 814 |
- if fcs > 0 && decodedFrame > fcs {
|
|
| 814 |
+ if decodedFrame > fcs {
|
|
| 815 | 815 |
println("fcs exceeded", block.Last, fcs, decodedFrame)
|
| 816 | 816 |
do.err = ErrFrameSizeExceeded |
| 817 | 817 |
hasErr = true |
| 818 |
- } else if block.Last && fcs > 0 && decodedFrame != fcs {
|
|
| 818 |
+ } else if block.Last && fcs != fcsUnknown && decodedFrame != fcs {
|
|
| 819 | 819 |
do.err = ErrFrameSizeMismatch |
| 820 | 820 |
hasErr = true |
| 821 | 821 |
} else {
|
| ... | ... |
@@ -197,7 +197,7 @@ func (d *frameDec) reset(br byteBuffer) error {
|
| 197 | 197 |
default: |
| 198 | 198 |
fcsSize = 1 << v |
| 199 | 199 |
} |
| 200 |
- d.FrameContentSize = 0 |
|
| 200 |
+ d.FrameContentSize = fcsUnknown |
|
| 201 | 201 |
if fcsSize > 0 {
|
| 202 | 202 |
b, err := br.readSmall(fcsSize) |
| 203 | 203 |
if err != nil {
|
| ... | ... |
@@ -343,12 +343,7 @@ func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) {
|
| 343 | 343 |
err = ErrDecoderSizeExceeded |
| 344 | 344 |
break |
| 345 | 345 |
} |
| 346 |
- if d.SingleSegment && uint64(len(d.history.b)) > d.o.maxDecodedSize {
|
|
| 347 |
- println("runDecoder: single segment and", uint64(len(d.history.b)), ">", d.o.maxDecodedSize)
|
|
| 348 |
- err = ErrFrameSizeExceeded |
|
| 349 |
- break |
|
| 350 |
- } |
|
| 351 |
- if d.FrameContentSize > 0 && uint64(len(d.history.b)-crcStart) > d.FrameContentSize {
|
|
| 346 |
+ if uint64(len(d.history.b)-crcStart) > d.FrameContentSize {
|
|
| 352 | 347 |
println("runDecoder: FrameContentSize exceeded", uint64(len(d.history.b)-crcStart), ">", d.FrameContentSize)
|
| 353 | 348 |
err = ErrFrameSizeExceeded |
| 354 | 349 |
break |
| ... | ... |
@@ -356,13 +351,13 @@ func (d *frameDec) runDecoder(dst []byte, dec *blockDec) ([]byte, error) {
|
| 356 | 356 |
if dec.Last {
|
| 357 | 357 |
break |
| 358 | 358 |
} |
| 359 |
- if debugDecoder && d.FrameContentSize > 0 {
|
|
| 359 |
+ if debugDecoder {
|
|
| 360 | 360 |
println("runDecoder: FrameContentSize", uint64(len(d.history.b)-crcStart), "<=", d.FrameContentSize)
|
| 361 | 361 |
} |
| 362 | 362 |
} |
| 363 | 363 |
dst = d.history.b |
| 364 | 364 |
if err == nil {
|
| 365 |
- if d.FrameContentSize > 0 && uint64(len(d.history.b)-crcStart) != d.FrameContentSize {
|
|
| 365 |
+ if d.FrameContentSize != fcsUnknown && uint64(len(d.history.b)-crcStart) != d.FrameContentSize {
|
|
| 366 | 366 |
err = ErrFrameSizeMismatch |
| 367 | 367 |
} else if d.HasCheckSum {
|
| 368 | 368 |
var n int |
| ... | ... |
@@ -107,7 +107,10 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
|
| 107 | 107 |
llState, mlState, ofState := s.litLengths.state.state, s.matchLengths.state.state, s.offsets.state.state |
| 108 | 108 |
s.seqSize = 0 |
| 109 | 109 |
litRemain := len(s.literals) |
| 110 |
- |
|
| 110 |
+ maxBlockSize := maxCompressedBlockSize |
|
| 111 |
+ if s.windowSize < maxBlockSize {
|
|
| 112 |
+ maxBlockSize = s.windowSize |
|
| 113 |
+ } |
|
| 111 | 114 |
for i := range seqs {
|
| 112 | 115 |
var ll, mo, ml int |
| 113 | 116 |
if br.off > 4+((maxOffsetBits+16+16)>>3) {
|
| ... | ... |
@@ -192,7 +195,7 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
|
| 192 | 192 |
} |
| 193 | 193 |
s.seqSize += ll + ml |
| 194 | 194 |
if s.seqSize > maxBlockSize {
|
| 195 |
- return fmt.Errorf("output (%d) bigger than max block size", s.seqSize)
|
|
| 195 |
+ return fmt.Errorf("output (%d) bigger than max block size (%d)", s.seqSize, maxBlockSize)
|
|
| 196 | 196 |
} |
| 197 | 197 |
litRemain -= ll |
| 198 | 198 |
if litRemain < 0 {
|
| ... | ... |
@@ -230,7 +233,7 @@ func (s *sequenceDecs) decode(seqs []seqVals) error {
|
| 230 | 230 |
} |
| 231 | 231 |
s.seqSize += litRemain |
| 232 | 232 |
if s.seqSize > maxBlockSize {
|
| 233 |
- return fmt.Errorf("output (%d) bigger than max block size", s.seqSize)
|
|
| 233 |
+ return fmt.Errorf("output (%d) bigger than max block size (%d)", s.seqSize, maxBlockSize)
|
|
| 234 | 234 |
} |
| 235 | 235 |
err := br.close() |
| 236 | 236 |
if err != nil {
|
| ... | ... |
@@ -347,6 +350,10 @@ func (s *sequenceDecs) decodeSync(history *history) error {
|
| 347 | 347 |
llState, mlState, ofState := s.litLengths.state.state, s.matchLengths.state.state, s.offsets.state.state |
| 348 | 348 |
hist := history.b[history.ignoreBuffer:] |
| 349 | 349 |
out := s.out |
| 350 |
+ maxBlockSize := maxCompressedBlockSize |
|
| 351 |
+ if s.windowSize < maxBlockSize {
|
|
| 352 |
+ maxBlockSize = s.windowSize |
|
| 353 |
+ } |
|
| 350 | 354 |
|
| 351 | 355 |
for i := seqs - 1; i >= 0; i-- {
|
| 352 | 356 |
if br.overread() {
|
| ... | ... |
@@ -426,7 +433,7 @@ func (s *sequenceDecs) decodeSync(history *history) error {
|
| 426 | 426 |
} |
| 427 | 427 |
size := ll + ml + len(out) |
| 428 | 428 |
if size-startSize > maxBlockSize {
|
| 429 |
- return fmt.Errorf("output (%d) bigger than max block size", size)
|
|
| 429 |
+ return fmt.Errorf("output (%d) bigger than max block size (%d)", size, maxBlockSize)
|
|
| 430 | 430 |
} |
| 431 | 431 |
if size > cap(out) {
|
| 432 | 432 |
// Not enough size, which can happen under high volume block streaming conditions |
| ... | ... |
@@ -535,6 +542,11 @@ func (s *sequenceDecs) decodeSync(history *history) error {
|
| 535 | 535 |
} |
| 536 | 536 |
} |
| 537 | 537 |
|
| 538 |
+ // Check if space for literals |
|
| 539 |
+ if len(s.literals)+len(s.out)-startSize > maxBlockSize {
|
|
| 540 |
+ return fmt.Errorf("output (%d) bigger than max block size (%d)", len(s.out), maxBlockSize)
|
|
| 541 |
+ } |
|
| 542 |
+ |
|
| 538 | 543 |
// Add final literals |
| 539 | 544 |
s.out = append(out, s.literals...) |
| 540 | 545 |
return br.close() |
| ... | ... |
@@ -20,7 +20,7 @@ const ZipMethodPKWare = 20 |
| 20 | 20 |
|
| 21 | 21 |
var zipReaderPool sync.Pool |
| 22 | 22 |
|
| 23 |
-// newZipReader cannot be used since we would leak goroutines... |
|
| 23 |
+// newZipReader creates a pooled zip decompressor. |
|
| 24 | 24 |
func newZipReader(r io.Reader) io.ReadCloser {
|
| 25 | 25 |
dec, ok := zipReaderPool.Get().(*Decoder) |
| 26 | 26 |
if ok {
|
| ... | ... |
@@ -44,10 +44,14 @@ func (r *pooledZipReader) Read(p []byte) (n int, err error) {
|
| 44 | 44 |
r.mu.Lock() |
| 45 | 45 |
defer r.mu.Unlock() |
| 46 | 46 |
if r.dec == nil {
|
| 47 |
- return 0, errors.New("Read after Close")
|
|
| 47 |
+ return 0, errors.New("read after close or EOF")
|
|
| 48 | 48 |
} |
| 49 | 49 |
dec, err := r.dec.Read(p) |
| 50 |
- |
|
| 50 |
+ if err == io.EOF {
|
|
| 51 |
+ err = r.dec.Reset(nil) |
|
| 52 |
+ zipReaderPool.Put(r.dec) |
|
| 53 |
+ r.dec = nil |
|
| 54 |
+ } |
|
| 51 | 55 |
return dec, err |
| 52 | 56 |
} |
| 53 | 57 |
|
| ... | ... |
@@ -112,11 +116,5 @@ func ZipCompressor(opts ...EOption) func(w io.Writer) (io.WriteCloser, error) {
|
| 112 | 112 |
// ZipDecompressor returns a decompressor that can be registered with zip libraries. |
| 113 | 113 |
// See ZipCompressor for example. |
| 114 | 114 |
func ZipDecompressor() func(r io.Reader) io.ReadCloser {
|
| 115 |
- return func(r io.Reader) io.ReadCloser {
|
|
| 116 |
- d, err := NewReader(r, WithDecoderConcurrency(1), WithDecoderLowmem(true)) |
|
| 117 |
- if err != nil {
|
|
| 118 |
- panic(err) |
|
| 119 |
- } |
|
| 120 |
- return d.IOReadCloser() |
|
| 121 |
- } |
|
| 115 |
+ return newZipReader |
|
| 122 | 116 |
} |
| ... | ... |
@@ -39,6 +39,9 @@ const zstdMinMatch = 3 |
| 39 | 39 |
// Reset the buffer offset when reaching this. |
| 40 | 40 |
const bufferReset = math.MaxInt32 - MaxWindowSize |
| 41 | 41 |
|
| 42 |
+// fcsUnknown is used for unknown frame content size. |
|
| 43 |
+const fcsUnknown = math.MaxUint64 |
|
| 44 |
+ |
|
| 42 | 45 |
var ( |
| 43 | 46 |
// ErrReservedBlockType is returned when a reserved block type is found. |
| 44 | 47 |
// Typically this indicates wrong or corrupted input. |
| ... | ... |
@@ -52,6 +55,10 @@ var ( |
| 52 | 52 |
// Typically returned on invalid input. |
| 53 | 53 |
ErrBlockTooSmall = errors.New("block too small")
|
| 54 | 54 |
|
| 55 |
+ // ErrUnexpectedBlockSize is returned when a block has unexpected size. |
|
| 56 |
+ // Typically returned on invalid input. |
|
| 57 |
+ ErrUnexpectedBlockSize = errors.New("unexpected block size")
|
|
| 58 |
+ |
|
| 55 | 59 |
// ErrMagicMismatch is returned when a "magic" number isn't what is expected. |
| 56 | 60 |
// Typically this indicates wrong or corrupted input. |
| 57 | 61 |
ErrMagicMismatch = errors.New("invalid input: magic number mismatch")
|
| ... | ... |
@@ -3,7 +3,6 @@ package cache |
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 | 5 |
"fmt" |
| 6 |
- "io/ioutil" |
|
| 7 | 6 |
"os" |
| 8 | 7 |
"path/filepath" |
| 9 | 8 |
"strings" |
| ... | ... |
@@ -533,7 +532,7 @@ func (cr *cacheRecord) layerDigestChain() []digest.Digest {
|
| 533 | 533 |
} |
| 534 | 534 |
switch cr.kind() {
|
| 535 | 535 |
case Diff: |
| 536 |
- if cr.getBlob() == "" {
|
|
| 536 |
+ if cr.getBlob() == "" && cr.diffParents.upper != nil {
|
|
| 537 | 537 |
// this diff just reuses the upper blob |
| 538 | 538 |
cr.layerDigestChainCache = cr.diffParents.upper.layerDigestChain() |
| 539 | 539 |
} else {
|
| ... | ... |
@@ -1631,7 +1630,7 @@ func (sm *sharableMountable) Mount() (_ []mount.Mount, _ func() error, retErr er |
| 1631 | 1631 |
// Don't need temporary mount wrapper for non-overlayfs mounts |
| 1632 | 1632 |
return mounts, release, nil |
| 1633 | 1633 |
} |
| 1634 |
- dir, err := ioutil.TempDir(sm.mountPoolRoot, "buildkit") |
|
| 1634 |
+ dir, err := os.MkdirTemp(sm.mountPoolRoot, "buildkit") |
|
| 1635 | 1635 |
if err != nil {
|
| 1636 | 1636 |
return nil, nil, err |
| 1637 | 1637 |
} |
| ... | ... |
@@ -3,7 +3,6 @@ package util |
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 | 5 |
"io" |
| 6 |
- "io/ioutil" |
|
| 7 | 6 |
"os" |
| 8 | 7 |
"path/filepath" |
| 9 | 8 |
|
| ... | ... |
@@ -59,7 +58,7 @@ func ReadFile(ctx context.Context, mount snapshot.Mountable, req ReadRequest) ([ |
| 59 | 59 |
} |
| 60 | 60 |
|
| 61 | 61 |
if req.Range == nil {
|
| 62 |
- dt, err = ioutil.ReadFile(fp) |
|
| 62 |
+ dt, err = os.ReadFile(fp) |
|
| 63 | 63 |
if err != nil {
|
| 64 | 64 |
return errors.WithStack(err) |
| 65 | 65 |
} |
| ... | ... |
@@ -68,7 +67,7 @@ func ReadFile(ctx context.Context, mount snapshot.Mountable, req ReadRequest) ([ |
| 68 | 68 |
if err != nil {
|
| 69 | 69 |
return errors.WithStack(err) |
| 70 | 70 |
} |
| 71 |
- dt, err = ioutil.ReadAll(io.NewSectionReader(f, int64(req.Range.Offset), int64(req.Range.Length))) |
|
| 71 |
+ dt, err = io.ReadAll(io.NewSectionReader(f, int64(req.Range.Offset), int64(req.Range.Length))) |
|
| 72 | 72 |
f.Close() |
| 73 | 73 |
if err != nil {
|
| 74 | 74 |
return errors.WithStack(err) |
| ... | ... |
@@ -4,9 +4,9 @@ import ( |
| 4 | 4 |
"context" |
| 5 | 5 |
"crypto/tls" |
| 6 | 6 |
"crypto/x509" |
| 7 |
- "io/ioutil" |
|
| 8 | 7 |
"net" |
| 9 | 8 |
"net/url" |
| 9 |
+ "os" |
|
| 10 | 10 |
"strings" |
| 11 | 11 |
|
| 12 | 12 |
"github.com/containerd/containerd/defaults" |
| ... | ... |
@@ -212,7 +212,7 @@ func WithCredentials(serverName, ca, cert, key string) ClientOpt {
|
| 212 | 212 |
} |
| 213 | 213 |
|
| 214 | 214 |
func loadCredentials(opts *withCredentials) (grpc.DialOption, error) {
|
| 215 |
- ca, err := ioutil.ReadFile(opts.CACert) |
|
| 215 |
+ ca, err := os.ReadFile(opts.CACert) |
|
| 216 | 216 |
if err != nil {
|
| 217 | 217 |
return nil, errors.Wrap(err, "could not read ca certificate") |
| 218 | 218 |
} |
| ... | ... |
@@ -2,7 +2,6 @@ package llb |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"io" |
| 5 |
- "io/ioutil" |
|
| 6 | 5 |
|
| 7 | 6 |
"github.com/containerd/containerd/platforms" |
| 8 | 7 |
"github.com/moby/buildkit/solver/pb" |
| ... | ... |
@@ -67,7 +66,7 @@ func WriteTo(def *Definition, w io.Writer) error {
|
| 67 | 67 |
} |
| 68 | 68 |
|
| 69 | 69 |
func ReadFrom(r io.Reader) (*Definition, error) {
|
| 70 |
- b, err := ioutil.ReadAll(r) |
|
| 70 |
+ b, err := io.ReadAll(r) |
|
| 71 | 71 |
if err != nil {
|
| 72 | 72 |
return nil, err |
| 73 | 73 |
} |
| ... | ... |
@@ -2,7 +2,7 @@ package ociindex |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"encoding/json" |
| 5 |
- "io/ioutil" |
|
| 5 |
+ "io" |
|
| 6 | 6 |
"os" |
| 7 | 7 |
|
| 8 | 8 |
"github.com/gofrs/flock" |
| ... | ... |
@@ -62,7 +62,7 @@ func PutDescToIndexJSONFileLocked(indexJSONPath string, desc ocispecs.Descriptor |
| 62 | 62 |
} |
| 63 | 63 |
defer f.Close() |
| 64 | 64 |
var idx ocispecs.Index |
| 65 |
- b, err := ioutil.ReadAll(f) |
|
| 65 |
+ b, err := io.ReadAll(f) |
|
| 66 | 66 |
if err != nil {
|
| 67 | 67 |
return errors.Wrapf(err, "could not read %s", indexJSONPath) |
| 68 | 68 |
} |
| ... | ... |
@@ -101,7 +101,7 @@ func ReadIndexJSONFileLocked(indexJSONPath string) (*ocispecs.Index, error) {
|
| 101 | 101 |
lock.Unlock() |
| 102 | 102 |
os.RemoveAll(lockPath) |
| 103 | 103 |
}() |
| 104 |
- b, err := ioutil.ReadFile(indexJSONPath) |
|
| 104 |
+ b, err := os.ReadFile(indexJSONPath) |
|
| 105 | 105 |
if err != nil {
|
| 106 | 106 |
return nil, errors.Wrapf(err, "could not read %s", indexJSONPath) |
| 107 | 107 |
} |
| ... | ... |
@@ -4,7 +4,6 @@ import ( |
| 4 | 4 |
"bytes" |
| 5 | 5 |
"context" |
| 6 | 6 |
"fmt" |
| 7 |
- "io/ioutil" |
|
| 8 | 7 |
"os" |
| 9 | 8 |
"path/filepath" |
| 10 | 9 |
|
| ... | ... |
@@ -56,7 +55,7 @@ func makeHostsFile(stateDir string, extraHosts []executor.HostIP, idmap *idtools |
| 56 | 56 |
} |
| 57 | 57 |
|
| 58 | 58 |
tmpPath := p + ".tmp" |
| 59 |
- if err := ioutil.WriteFile(tmpPath, b.Bytes(), 0644); err != nil {
|
|
| 59 |
+ if err := os.WriteFile(tmpPath, b.Bytes(), 0644); err != nil {
|
|
| 60 | 60 |
return "", nil, err |
| 61 | 61 |
} |
| 62 | 62 |
|
| ... | ... |
@@ -2,7 +2,6 @@ package oci |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 |
- "io/ioutil" |
|
| 6 | 5 |
"os" |
| 7 | 6 |
"path/filepath" |
| 8 | 7 |
|
| ... | ... |
@@ -101,7 +100,7 @@ func GetResolvConf(ctx context.Context, stateDir string, idmap *idtools.Identity |
| 101 | 101 |
} |
| 102 | 102 |
|
| 103 | 103 |
tmpPath := p + ".tmp" |
| 104 |
- if err := ioutil.WriteFile(tmpPath, f.Content, 0644); err != nil {
|
|
| 104 |
+ if err := os.WriteFile(tmpPath, f.Content, 0644); err != nil {
|
|
| 105 | 105 |
return "", err |
| 106 | 106 |
} |
| 107 | 107 |
|
| ... | ... |
@@ -2,7 +2,6 @@ package local |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 |
- "io/ioutil" |
|
| 6 | 5 |
"os" |
| 7 | 6 |
"strings" |
| 8 | 7 |
"time" |
| ... | ... |
@@ -67,7 +66,7 @@ func (e *localExporterInstance) Export(ctx context.Context, inp exporter.Source, |
| 67 | 67 |
var err error |
| 68 | 68 |
var idmap *idtools.IdentityMapping |
| 69 | 69 |
if ref == nil {
|
| 70 |
- src, err = ioutil.TempDir("", "buildkit")
|
|
| 70 |
+ src, err = os.MkdirTemp("", "buildkit")
|
|
| 71 | 71 |
if err != nil {
|
| 72 | 72 |
return err |
| 73 | 73 |
} |
| ... | ... |
@@ -2,7 +2,6 @@ package local |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 |
- "io/ioutil" |
|
| 6 | 5 |
"os" |
| 7 | 6 |
"strconv" |
| 8 | 7 |
"strings" |
| ... | ... |
@@ -83,7 +82,7 @@ func (e *localExporterInstance) Export(ctx context.Context, inp exporter.Source, |
| 83 | 83 |
var err error |
| 84 | 84 |
var idmap *idtools.IdentityMapping |
| 85 | 85 |
if ref == nil {
|
| 86 |
- src, err = ioutil.TempDir("", "buildkit")
|
|
| 86 |
+ src, err = os.MkdirTemp("", "buildkit")
|
|
| 87 | 87 |
if err != nil {
|
| 88 | 88 |
return nil, err |
| 89 | 89 |
} |
| ... | ... |
@@ -1,7 +1,6 @@ |
| 1 | 1 |
package sshforward |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 |
- "io/ioutil" |
|
| 5 | 4 |
"net" |
| 6 | 5 |
"os" |
| 7 | 6 |
"path/filepath" |
| ... | ... |
@@ -64,7 +63,7 @@ type SocketOpt struct {
|
| 64 | 64 |
} |
| 65 | 65 |
|
| 66 | 66 |
func MountSSHSocket(ctx context.Context, c session.Caller, opt SocketOpt) (sockPath string, closer func() error, err error) {
|
| 67 |
- dir, err := ioutil.TempDir("", ".buildkit-ssh-sock")
|
|
| 67 |
+ dir, err := os.MkdirTemp("", ".buildkit-ssh-sock")
|
|
| 68 | 68 |
if err != nil {
|
| 69 | 69 |
return "", nil, errors.WithStack(err) |
| 70 | 70 |
} |
| ... | ... |
@@ -4,7 +4,6 @@ |
| 4 | 4 |
package snapshot |
| 5 | 5 |
|
| 6 | 6 |
import ( |
| 7 |
- "io/ioutil" |
|
| 8 | 7 |
"os" |
| 9 | 8 |
"syscall" |
| 10 | 9 |
|
| ... | ... |
@@ -38,7 +37,7 @@ func (lm *localMounter) Mount() (string, error) {
|
| 38 | 38 |
} |
| 39 | 39 |
} |
| 40 | 40 |
|
| 41 |
- dir, err := ioutil.TempDir("", "buildkit-mount")
|
|
| 41 |
+ dir, err := os.MkdirTemp("", "buildkit-mount")
|
|
| 42 | 42 |
if err != nil {
|
| 43 | 43 |
return "", errors.Wrap(err, "failed to create temp dir") |
| 44 | 44 |
} |
| ... | ... |
@@ -130,7 +130,7 @@ func (sn *mergeSnapshotter) Merge(ctx context.Context, key string, diffs []Diff, |
| 130 | 130 |
diffs = diffs[baseIndex:] |
| 131 | 131 |
} |
| 132 | 132 |
|
| 133 |
- tempLeaseCtx, done, err := leaseutil.WithLease(ctx, sn.lm, leaseutil.MakeTemporary) |
|
| 133 |
+ ctx, done, err := leaseutil.WithLease(ctx, sn.lm, leaseutil.MakeTemporary) |
|
| 134 | 134 |
if err != nil {
|
| 135 | 135 |
return errors.Wrap(err, "failed to create temporary lease for view mounts during merge") |
| 136 | 136 |
} |
| ... | ... |
@@ -138,7 +138,7 @@ func (sn *mergeSnapshotter) Merge(ctx context.Context, key string, diffs []Diff, |
| 138 | 138 |
|
| 139 | 139 |
// Make the snapshot that will be merged into |
| 140 | 140 |
prepareKey := identity.NewID() |
| 141 |
- if err := sn.Prepare(tempLeaseCtx, prepareKey, baseKey); err != nil {
|
|
| 141 |
+ if err := sn.Prepare(ctx, prepareKey, baseKey); err != nil {
|
|
| 142 | 142 |
return errors.Wrapf(err, "failed to prepare %q", key) |
| 143 | 143 |
} |
| 144 | 144 |
applyMounts, err := sn.Mounts(ctx, prepareKey) |
| ... | ... |
@@ -4,12 +4,15 @@ import ( |
| 4 | 4 |
"context" |
| 5 | 5 |
|
| 6 | 6 |
"github.com/moby/buildkit/util/bklog" |
| 7 |
+ "github.com/moby/buildkit/util/progress" |
|
| 7 | 8 |
|
| 8 | 9 |
digest "github.com/opencontainers/go-digest" |
| 9 | 10 |
) |
| 10 | 11 |
|
| 11 | 12 |
type CacheOpts map[interface{}]interface{}
|
| 12 | 13 |
|
| 14 |
+type progressKey struct{}
|
|
| 15 |
+ |
|
| 13 | 16 |
type cacheOptGetterKey struct{}
|
| 14 | 17 |
|
| 15 | 18 |
func CacheOptGetterOf(ctx context.Context) func(includeAncestors bool, keys ...interface{}) map[interface{}]interface{} {
|
| ... | ... |
@@ -91,3 +94,15 @@ func walkAncestors(ctx context.Context, start *state, f func(*state) bool) {
|
| 91 | 91 |
} |
| 92 | 92 |
} |
| 93 | 93 |
} |
| 94 |
+ |
|
| 95 |
+func ProgressControllerFromContext(ctx context.Context) progress.Controller {
|
|
| 96 |
+ var pg progress.Controller |
|
| 97 |
+ if optGetter := CacheOptGetterOf(ctx); optGetter != nil {
|
|
| 98 |
+ if kv := optGetter(false, progressKey{}); kv != nil {
|
|
| 99 |
+ if v, ok := kv[progressKey{}].(progress.Controller); ok {
|
|
| 100 |
+ pg = v |
|
| 101 |
+ } |
|
| 102 |
+ } |
|
| 103 |
+ } |
|
| 104 |
+ return pg |
|
| 105 |
+} |
| ... | ... |
@@ -13,6 +13,7 @@ import ( |
| 13 | 13 |
"github.com/moby/buildkit/solver/errdefs" |
| 14 | 14 |
"github.com/moby/buildkit/util/flightcontrol" |
| 15 | 15 |
"github.com/moby/buildkit/util/progress" |
| 16 |
+ "github.com/moby/buildkit/util/progress/controller" |
|
| 16 | 17 |
"github.com/moby/buildkit/util/tracing" |
| 17 | 18 |
digest "github.com/opencontainers/go-digest" |
| 18 | 19 |
"github.com/pkg/errors" |
| ... | ... |
@@ -781,6 +782,15 @@ func (s *sharedOp) CacheMap(ctx context.Context, index int) (resp *cacheMapResp, |
| 781 | 781 |
} |
| 782 | 782 |
if complete {
|
| 783 | 783 |
if err == nil {
|
| 784 |
+ if res.Opts == nil {
|
|
| 785 |
+ res.Opts = CacheOpts(make(map[interface{}]interface{}))
|
|
| 786 |
+ } |
|
| 787 |
+ res.Opts[progressKey{}] = &controller.Controller{
|
|
| 788 |
+ WriterFactory: progress.FromContext(ctx), |
|
| 789 |
+ Digest: s.st.vtx.Digest(), |
|
| 790 |
+ Name: s.st.vtx.Name(), |
|
| 791 |
+ ProgressGroup: s.st.vtx.Options().ProgressGroup, |
|
| 792 |
+ } |
|
| 784 | 793 |
s.cacheRes = append(s.cacheRes, res) |
| 785 | 794 |
s.cacheDone = done |
| 786 | 795 |
} |
| ... | ... |
@@ -2,7 +2,6 @@ package file |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 |
- "io/ioutil" |
|
| 6 | 5 |
"log" |
| 7 | 6 |
"os" |
| 8 | 7 |
"path/filepath" |
| ... | ... |
@@ -110,7 +109,7 @@ func mkfile(ctx context.Context, d string, action pb.FileActionMkFile, user *cop |
| 110 | 110 |
return err |
| 111 | 111 |
} |
| 112 | 112 |
|
| 113 |
- if err := ioutil.WriteFile(p, action.Data, os.FileMode(action.Mode)&0777); err != nil {
|
|
| 113 |
+ if err := os.WriteFile(p, action.Data, os.FileMode(action.Mode)&0777); err != nil {
|
|
| 114 | 114 |
return err |
| 115 | 115 |
} |
| 116 | 116 |
|
| ... | ... |
@@ -3,7 +3,6 @@ package mounts |
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 | 5 |
"fmt" |
| 6 |
- "io/ioutil" |
|
| 7 | 6 |
"os" |
| 8 | 7 |
"path/filepath" |
| 9 | 8 |
"sync" |
| ... | ... |
@@ -282,7 +281,7 @@ type secretMountInstance struct {
|
| 282 | 282 |
} |
| 283 | 283 |
|
| 284 | 284 |
func (sm *secretMountInstance) Mount() ([]mount.Mount, func() error, error) {
|
| 285 |
- dir, err := ioutil.TempDir("", "buildkit-secrets")
|
|
| 285 |
+ dir, err := os.MkdirTemp("", "buildkit-secrets")
|
|
| 286 | 286 |
if err != nil {
|
| 287 | 287 |
return nil, nil, errors.Wrap(err, "failed to create temp dir") |
| 288 | 288 |
} |
| ... | ... |
@@ -320,7 +319,7 @@ func (sm *secretMountInstance) Mount() ([]mount.Mount, func() error, error) {
|
| 320 | 320 |
|
| 321 | 321 |
randID := identity.NewID() |
| 322 | 322 |
fp := filepath.Join(dir, randID) |
| 323 |
- if err := ioutil.WriteFile(fp, sm.sm.data, 0600); err != nil {
|
|
| 323 |
+ if err := os.WriteFile(fp, sm.sm.data, 0600); err != nil {
|
|
| 324 | 324 |
cleanup() |
| 325 | 325 |
return nil, nil, err |
| 326 | 326 |
} |
| ... | ... |
@@ -4,8 +4,6 @@ import ( |
| 4 | 4 |
"context" |
| 5 | 5 |
"encoding/json" |
| 6 | 6 |
|
| 7 |
- "github.com/moby/buildkit/util/progress" |
|
| 8 |
- "github.com/moby/buildkit/util/progress/controller" |
|
| 9 | 7 |
"github.com/moby/buildkit/worker" |
| 10 | 8 |
"github.com/pkg/errors" |
| 11 | 9 |
|
| ... | ... |
@@ -23,7 +21,6 @@ type diffOp struct {
|
| 23 | 23 |
op *pb.DiffOp |
| 24 | 24 |
worker worker.Worker |
| 25 | 25 |
vtx solver.Vertex |
| 26 |
- pg progress.Controller |
|
| 27 | 26 |
} |
| 28 | 27 |
|
| 29 | 28 |
func NewDiffOp(v solver.Vertex, op *pb.Op_Diff, w worker.Worker) (solver.Op, error) {
|
| ... | ... |
@@ -64,17 +61,8 @@ func (d *diffOp) CacheMap(ctx context.Context, group session.Group, index int) ( |
| 64 | 64 |
ComputeDigestFunc solver.ResultBasedCacheFunc |
| 65 | 65 |
PreprocessFunc solver.PreprocessFunc |
| 66 | 66 |
}, depCount), |
| 67 |
- Opts: solver.CacheOpts(make(map[interface{}]interface{})),
|
|
| 68 | 67 |
} |
| 69 | 68 |
|
| 70 |
- d.pg = &controller.Controller{
|
|
| 71 |
- WriterFactory: progress.FromContext(ctx), |
|
| 72 |
- Digest: d.vtx.Digest(), |
|
| 73 |
- Name: d.vtx.Name(), |
|
| 74 |
- ProgressGroup: d.vtx.Options().ProgressGroup, |
|
| 75 |
- } |
|
| 76 |
- cm.Opts[cache.ProgressKey{}] = d.pg
|
|
| 77 |
- |
|
| 78 | 69 |
return cm, true, nil |
| 79 | 70 |
} |
| 80 | 71 |
|
| ... | ... |
@@ -121,7 +109,7 @@ func (d *diffOp) Exec(ctx context.Context, g session.Group, inputs []solver.Resu |
| 121 | 121 |
return []solver.Result{worker.NewWorkerRefResult(nil, d.worker)}, nil
|
| 122 | 122 |
} |
| 123 | 123 |
|
| 124 |
- diffRef, err := d.worker.CacheManager().Diff(ctx, lowerRef, upperRef, d.pg, |
|
| 124 |
+ diffRef, err := d.worker.CacheManager().Diff(ctx, lowerRef, upperRef, solver.ProgressControllerFromContext(ctx), |
|
| 125 | 125 |
cache.WithDescription(d.vtx.Name())) |
| 126 | 126 |
if err != nil {
|
| 127 | 127 |
return nil, err |
| ... | ... |
@@ -21,8 +21,6 @@ import ( |
| 21 | 21 |
"github.com/moby/buildkit/solver/llbsolver/errdefs" |
| 22 | 22 |
"github.com/moby/buildkit/solver/llbsolver/mounts" |
| 23 | 23 |
"github.com/moby/buildkit/solver/pb" |
| 24 |
- "github.com/moby/buildkit/util/progress" |
|
| 25 |
- "github.com/moby/buildkit/util/progress/controller" |
|
| 26 | 24 |
"github.com/moby/buildkit/util/progress/logs" |
| 27 | 25 |
utilsystem "github.com/moby/buildkit/util/system" |
| 28 | 26 |
"github.com/moby/buildkit/worker" |
| ... | ... |
@@ -45,7 +43,6 @@ type execOp struct {
|
| 45 | 45 |
platform *pb.Platform |
| 46 | 46 |
numInputs int |
| 47 | 47 |
parallelism *semaphore.Weighted |
| 48 |
- vtx solver.Vertex |
|
| 49 | 48 |
} |
| 50 | 49 |
|
| 51 | 50 |
func NewExecOp(v solver.Vertex, op *pb.Op_Exec, platform *pb.Platform, cm cache.Manager, parallelism *semaphore.Weighted, sm *session.Manager, exec executor.Executor, w worker.Worker) (solver.Op, error) {
|
| ... | ... |
@@ -63,7 +60,6 @@ func NewExecOp(v solver.Vertex, op *pb.Op_Exec, platform *pb.Platform, cm cache. |
| 63 | 63 |
w: w, |
| 64 | 64 |
platform: platform, |
| 65 | 65 |
parallelism: parallelism, |
| 66 |
- vtx: v, |
|
| 67 | 66 |
}, nil |
| 68 | 67 |
} |
| 69 | 68 |
|
| ... | ... |
@@ -145,14 +141,6 @@ func (e *execOp) CacheMap(ctx context.Context, g session.Group, index int) (*sol |
| 145 | 145 |
ComputeDigestFunc solver.ResultBasedCacheFunc |
| 146 | 146 |
PreprocessFunc solver.PreprocessFunc |
| 147 | 147 |
}, e.numInputs), |
| 148 |
- Opts: solver.CacheOpts(map[interface{}]interface{}{
|
|
| 149 |
- cache.ProgressKey{}: &controller.Controller{
|
|
| 150 |
- WriterFactory: progress.FromContext(ctx), |
|
| 151 |
- Digest: e.vtx.Digest(), |
|
| 152 |
- Name: e.vtx.Name(), |
|
| 153 |
- ProgressGroup: e.vtx.Options().ProgressGroup, |
|
| 154 |
- }, |
|
| 155 |
- }), |
|
| 156 | 148 |
} |
| 157 | 149 |
|
| 158 | 150 |
deps, err := e.getMountDeps() |
| ... | ... |
@@ -2,7 +2,6 @@ package ops |
| 2 | 2 |
|
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 |
- "io/ioutil" |
|
| 6 | 5 |
"os" |
| 7 | 6 |
"os/exec" |
| 8 | 7 |
"path/filepath" |
| ... | ... |
@@ -47,7 +46,7 @@ type staticEmulatorMount struct {
|
| 47 | 47 |
} |
| 48 | 48 |
|
| 49 | 49 |
func (m *staticEmulatorMount) Mount() ([]mount.Mount, func() error, error) {
|
| 50 |
- tmpdir, err := ioutil.TempDir("", "buildkit-qemu-emulator")
|
|
| 50 |
+ tmpdir, err := os.MkdirTemp("", "buildkit-qemu-emulator")
|
|
| 51 | 51 |
if err != nil {
|
| 52 | 52 |
return nil, nil, err |
| 53 | 53 |
} |
| ... | ... |
@@ -19,8 +19,6 @@ import ( |
| 19 | 19 |
"github.com/moby/buildkit/solver/llbsolver/ops/fileoptypes" |
| 20 | 20 |
"github.com/moby/buildkit/solver/pb" |
| 21 | 21 |
"github.com/moby/buildkit/util/flightcontrol" |
| 22 |
- "github.com/moby/buildkit/util/progress" |
|
| 23 |
- "github.com/moby/buildkit/util/progress/controller" |
|
| 24 | 22 |
"github.com/moby/buildkit/worker" |
| 25 | 23 |
digest "github.com/opencontainers/go-digest" |
| 26 | 24 |
"github.com/pkg/errors" |
| ... | ... |
@@ -37,7 +35,6 @@ type fileOp struct {
|
| 37 | 37 |
solver *FileOpSolver |
| 38 | 38 |
numInputs int |
| 39 | 39 |
parallelism *semaphore.Weighted |
| 40 |
- vtx solver.Vertex |
|
| 41 | 40 |
} |
| 42 | 41 |
|
| 43 | 42 |
func NewFileOp(v solver.Vertex, op *pb.Op_File, cm cache.Manager, parallelism *semaphore.Weighted, w worker.Worker) (solver.Op, error) {
|
| ... | ... |
@@ -51,7 +48,6 @@ func NewFileOp(v solver.Vertex, op *pb.Op_File, cm cache.Manager, parallelism *s |
| 51 | 51 |
w: w, |
| 52 | 52 |
solver: NewFileOpSolver(w, &file.Backend{}, file.NewRefManager(cm)),
|
| 53 | 53 |
parallelism: parallelism, |
| 54 |
- vtx: v, |
|
| 55 | 54 |
}, nil |
| 56 | 55 |
} |
| 57 | 56 |
|
| ... | ... |
@@ -138,14 +134,6 @@ func (f *fileOp) CacheMap(ctx context.Context, g session.Group, index int) (*sol |
| 138 | 138 |
ComputeDigestFunc solver.ResultBasedCacheFunc |
| 139 | 139 |
PreprocessFunc solver.PreprocessFunc |
| 140 | 140 |
}, f.numInputs), |
| 141 |
- Opts: solver.CacheOpts(map[interface{}]interface{}{
|
|
| 142 |
- cache.ProgressKey{}: &controller.Controller{
|
|
| 143 |
- WriterFactory: progress.FromContext(ctx), |
|
| 144 |
- Digest: f.vtx.Digest(), |
|
| 145 |
- Name: f.vtx.Name(), |
|
| 146 |
- ProgressGroup: f.vtx.Options().ProgressGroup, |
|
| 147 |
- }, |
|
| 148 |
- }), |
|
| 149 | 141 |
} |
| 150 | 142 |
|
| 151 | 143 |
for idx, m := range selectors {
|
| ... | ... |
@@ -4,8 +4,6 @@ import ( |
| 4 | 4 |
"context" |
| 5 | 5 |
"encoding/json" |
| 6 | 6 |
|
| 7 |
- "github.com/moby/buildkit/util/progress" |
|
| 8 |
- "github.com/moby/buildkit/util/progress/controller" |
|
| 9 | 7 |
"github.com/moby/buildkit/worker" |
| 10 | 8 |
"github.com/pkg/errors" |
| 11 | 9 |
|
| ... | ... |
@@ -23,7 +21,6 @@ type mergeOp struct {
|
| 23 | 23 |
op *pb.MergeOp |
| 24 | 24 |
worker worker.Worker |
| 25 | 25 |
vtx solver.Vertex |
| 26 |
- pg progress.Controller |
|
| 27 | 26 |
} |
| 28 | 27 |
|
| 29 | 28 |
func NewMergeOp(v solver.Vertex, op *pb.Op_Merge, w worker.Worker) (solver.Op, error) {
|
| ... | ... |
@@ -56,17 +53,8 @@ func (m *mergeOp) CacheMap(ctx context.Context, group session.Group, index int) |
| 56 | 56 |
ComputeDigestFunc solver.ResultBasedCacheFunc |
| 57 | 57 |
PreprocessFunc solver.PreprocessFunc |
| 58 | 58 |
}, len(m.op.Inputs)), |
| 59 |
- Opts: solver.CacheOpts(make(map[interface{}]interface{})),
|
|
| 60 | 59 |
} |
| 61 | 60 |
|
| 62 |
- m.pg = &controller.Controller{
|
|
| 63 |
- WriterFactory: progress.FromContext(ctx), |
|
| 64 |
- Digest: m.vtx.Digest(), |
|
| 65 |
- Name: m.vtx.Name(), |
|
| 66 |
- ProgressGroup: m.vtx.Options().ProgressGroup, |
|
| 67 |
- } |
|
| 68 |
- cm.Opts[cache.ProgressKey{}] = m.pg
|
|
| 69 |
- |
|
| 70 | 61 |
return cm, true, nil |
| 71 | 62 |
} |
| 72 | 63 |
|
| ... | ... |
@@ -93,7 +81,7 @@ func (m *mergeOp) Exec(ctx context.Context, g session.Group, inputs []solver.Res |
| 93 | 93 |
return nil, nil |
| 94 | 94 |
} |
| 95 | 95 |
|
| 96 |
- mergedRef, err := m.worker.CacheManager().Merge(ctx, refs, m.pg, |
|
| 96 |
+ mergedRef, err := m.worker.CacheManager().Merge(ctx, refs, solver.ProgressControllerFromContext(ctx), |
|
| 97 | 97 |
cache.WithDescription(m.vtx.Name())) |
| 98 | 98 |
if err != nil {
|
| 99 | 99 |
return nil, err |
| ... | ... |
@@ -1038,7 +1038,7 @@ func (m *SecretOpt) GetOptional() bool {
|
| 1038 | 1038 |
return false |
| 1039 | 1039 |
} |
| 1040 | 1040 |
|
| 1041 |
-// SSHOpt defines options describing secret mounts |
|
| 1041 |
+// SSHOpt defines options describing ssh mounts |
|
| 1042 | 1042 |
type SSHOpt struct {
|
| 1043 | 1043 |
// ID of exposed ssh rule. Used for quering the value. |
| 1044 | 1044 |
ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"` |
| ... | ... |
@@ -157,7 +157,7 @@ message SecretOpt {
|
| 157 | 157 |
bool optional = 5; |
| 158 | 158 |
} |
| 159 | 159 |
|
| 160 |
-// SSHOpt defines options describing secret mounts |
|
| 160 |
+// SSHOpt defines options describing ssh mounts |
|
| 161 | 161 |
message SSHOpt {
|
| 162 | 162 |
// ID of exposed ssh rule. Used for quering the value. |
| 163 | 163 |
string ID = 1; |
| ... | ... |
@@ -6,7 +6,6 @@ import ( |
| 6 | 6 |
"encoding/base64" |
| 7 | 7 |
"fmt" |
| 8 | 8 |
"io" |
| 9 |
- "io/ioutil" |
|
| 10 | 9 |
"net/url" |
| 11 | 10 |
"os" |
| 12 | 11 |
"os/exec" |
| ... | ... |
@@ -273,7 +272,7 @@ func (gs *gitSourceHandler) mountKnownHosts(ctx context.Context) (string, func() |
| 273 | 273 |
if gs.src.KnownSSHHosts == "" {
|
| 274 | 274 |
return "", nil, errors.Errorf("no configured known hosts forwarded from the client")
|
| 275 | 275 |
} |
| 276 |
- knownHosts, err := ioutil.TempFile("", "")
|
|
| 276 |
+ knownHosts, err := os.CreateTemp("", "")
|
|
| 277 | 277 |
if err != nil {
|
| 278 | 278 |
return "", nil, err |
| 279 | 279 |
} |
| ... | ... |
@@ -543,7 +542,7 @@ func (gs *gitSourceHandler) Snapshot(ctx context.Context, g session.Group) (out |
| 543 | 543 |
} else {
|
| 544 | 544 |
cd := checkoutDir |
| 545 | 545 |
if subdir != "." {
|
| 546 |
- cd, err = ioutil.TempDir(cd, "checkout") |
|
| 546 |
+ cd, err = os.MkdirTemp(cd, "checkout") |
|
| 547 | 547 |
if err != nil {
|
| 548 | 548 |
return nil, errors.Wrapf(err, "failed to create temporary checkout dir") |
| 549 | 549 |
} |
| ... | ... |
@@ -7,7 +7,6 @@ import ( |
| 7 | 7 |
"bytes" |
| 8 | 8 |
"compress/gzip" |
| 9 | 9 |
"io" |
| 10 |
- "io/ioutil" |
|
| 11 | 10 |
"os" |
| 12 | 11 |
"os/exec" |
| 13 | 12 |
"path/filepath" |
| ... | ... |
@@ -23,7 +22,7 @@ func withChroot(cmd *exec.Cmd, dir string) {
|
| 23 | 23 |
} |
| 24 | 24 |
|
| 25 | 25 |
func check(arch, bin string) (string, error) {
|
| 26 |
- tmpdir, err := ioutil.TempDir("", "qemu-check")
|
|
| 26 |
+ tmpdir, err := os.MkdirTemp("", "qemu-check")
|
|
| 27 | 27 |
if err != nil {
|
| 28 | 28 |
return "", err |
| 29 | 29 |
} |
| ... | ... |
@@ -3,7 +3,7 @@ package contentutil |
| 3 | 3 |
import ( |
| 4 | 4 |
"bytes" |
| 5 | 5 |
"context" |
| 6 |
- "io/ioutil" |
|
| 6 |
+ "io" |
|
| 7 | 7 |
"sync" |
| 8 | 8 |
"time" |
| 9 | 9 |
|
| ... | ... |
@@ -64,7 +64,7 @@ func (b *buffer) ReaderAt(ctx context.Context, desc ocispecs.Descriptor) (conten |
| 64 | 64 |
if err != nil {
|
| 65 | 65 |
return nil, err |
| 66 | 66 |
} |
| 67 |
- return &readerAt{Reader: r, Closer: ioutil.NopCloser(r), size: int64(r.Len())}, nil
|
|
| 67 |
+ return &readerAt{Reader: r, Closer: io.NopCloser(r), size: int64(r.Len())}, nil
|
|
| 68 | 68 |
} |
| 69 | 69 |
|
| 70 | 70 |
func (b *buffer) getBytesReader(ctx context.Context, dgst digest.Digest) (*bytes.Reader, error) {
|
| ... | ... |
@@ -3,7 +3,7 @@ package imageutil |
| 3 | 3 |
import ( |
| 4 | 4 |
"context" |
| 5 | 5 |
"encoding/json" |
| 6 |
- "io/ioutil" |
|
| 6 |
+ "io" |
|
| 7 | 7 |
"strings" |
| 8 | 8 |
"time" |
| 9 | 9 |
|
| ... | ... |
@@ -19,7 +19,7 @@ func readSchema1Config(ctx context.Context, ref string, desc ocispecs.Descriptor |
| 19 | 19 |
return "", nil, err |
| 20 | 20 |
} |
| 21 | 21 |
defer rc.Close() |
| 22 |
- dt, err := ioutil.ReadAll(rc) |
|
| 22 |
+ dt, err := io.ReadAll(rc) |
|
| 23 | 23 |
if err != nil {
|
| 24 | 24 |
return "", nil, errors.Wrap(err, "failed to fetch schema1 manifest") |
| 25 | 25 |
} |
| ... | ... |
@@ -8,7 +8,6 @@ import ( |
| 8 | 8 |
"context" |
| 9 | 9 |
"fmt" |
| 10 | 10 |
"io" |
| 11 |
- "io/ioutil" |
|
| 12 | 11 |
"os" |
| 13 | 12 |
"path/filepath" |
| 14 | 13 |
"strings" |
| ... | ... |
@@ -114,7 +113,7 @@ func GetOverlayLayers(m mount.Mount) ([]string, error) {
|
| 114 | 114 |
// WriteUpperdir writes a layer tar archive into the specified writer, based on |
| 115 | 115 |
// the diff information stored in the upperdir. |
| 116 | 116 |
func WriteUpperdir(ctx context.Context, w io.Writer, upperdir string, lower []mount.Mount) error {
|
| 117 |
- emptyLower, err := ioutil.TempDir("", "buildkit") // empty directory used for the lower of diff view
|
|
| 117 |
+ emptyLower, err := os.MkdirTemp("", "buildkit") // empty directory used for the lower of diff view
|
|
| 118 | 118 |
if err != nil {
|
| 119 | 119 |
return errors.Wrapf(err, "failed to create temp dir") |
| 120 | 120 |
} |
| ... | ... |
@@ -3,7 +3,6 @@ package resolver |
| 3 | 3 |
import ( |
| 4 | 4 |
"crypto/tls" |
| 5 | 5 |
"crypto/x509" |
| 6 |
- "io/ioutil" |
|
| 7 | 6 |
"net" |
| 8 | 7 |
"net/http" |
| 9 | 8 |
"os" |
| ... | ... |
@@ -67,7 +66,7 @@ func fillInsecureOpts(host string, c config.RegistryConfig, h docker.RegistryHos |
| 67 | 67 |
|
| 68 | 68 |
func loadTLSConfig(c config.RegistryConfig) (*tls.Config, error) {
|
| 69 | 69 |
for _, d := range c.TLSConfigDir {
|
| 70 |
- fs, err := ioutil.ReadDir(d) |
|
| 70 |
+ fs, err := os.ReadDir(d) |
|
| 71 | 71 |
if err != nil && !errors.Is(err, os.ErrNotExist) && !errors.Is(err, os.ErrPermission) {
|
| 72 | 72 |
return nil, errors.WithStack(err) |
| 73 | 73 |
} |
| ... | ... |
@@ -98,7 +97,7 @@ func loadTLSConfig(c config.RegistryConfig) (*tls.Config, error) {
|
| 98 | 98 |
} |
| 99 | 99 |
|
| 100 | 100 |
for _, p := range c.RootCAs {
|
| 101 |
- dt, err := ioutil.ReadFile(p) |
|
| 101 |
+ dt, err := os.ReadFile(p) |
|
| 102 | 102 |
if err != nil {
|
| 103 | 103 |
return nil, errors.Wrapf(err, "failed to read %s", p) |
| 104 | 104 |
} |
| ... | ... |
@@ -4,7 +4,6 @@ import ( |
| 4 | 4 |
"archive/tar" |
| 5 | 5 |
"context" |
| 6 | 6 |
"io" |
| 7 |
- "io/ioutil" |
|
| 8 | 7 |
"runtime" |
| 9 | 8 |
"strings" |
| 10 | 9 |
"sync" |
| ... | ... |
@@ -87,7 +86,7 @@ func (s *winApplier) Apply(ctx context.Context, desc ocispecs.Descriptor, mounts |
| 87 | 87 |
} |
| 88 | 88 |
|
| 89 | 89 |
// Read any trailing data |
| 90 |
- if _, err := io.Copy(ioutil.Discard, rc); err != nil {
|
|
| 90 |
+ if _, err := io.Copy(io.Discard, rc); err != nil {
|
|
| 91 | 91 |
discard(err) |
| 92 | 92 |
return err |
| 93 | 93 |
} |
| ... | ... |
@@ -144,7 +143,7 @@ func filter(in io.Reader, f func(*tar.Header) bool) (io.Reader, func(error)) {
|
| 144 | 144 |
} |
| 145 | 145 |
} else {
|
| 146 | 146 |
if h.Size > 0 {
|
| 147 |
- if _, err := io.Copy(ioutil.Discard, tarReader); err != nil {
|
|
| 147 |
+ if _, err := io.Copy(io.Discard, tarReader); err != nil {
|
|
| 148 | 148 |
return err |
| 149 | 149 |
} |
| 150 | 150 |
} |
| ... | ... |
@@ -53,9 +53,8 @@ How to get your contributions merged smoothly and quickly. |
| 53 | 53 |
- **All tests need to be passing** before your change can be merged. We |
| 54 | 54 |
recommend you **run tests locally** before creating your PR to catch breakages |
| 55 | 55 |
early on. |
| 56 |
- - `make all` to test everything, OR |
|
| 57 |
- - `make vet` to catch vet errors |
|
| 58 |
- - `make test` to run the tests |
|
| 59 |
- - `make testrace` to run tests in race mode |
|
| 56 |
+ - `VET_SKIP_PROTO=1 ./vet.sh` to catch vet errors |
|
| 57 |
+ - `go test -cpu 1,4 -timeout 7m ./...` to run the tests |
|
| 58 |
+ - `go test -race -cpu 1,4 -timeout 7m ./...` to run tests in race mode |
|
| 60 | 59 |
|
| 61 | 60 |
- Exceptions to the rules can be made if there's a compelling reason for doing so. |
| ... | ... |
@@ -413,8 +413,8 @@ func (lb *lbBalancer) handleServiceConfig(gc *grpclbServiceConfig) {
|
| 413 | 413 |
// this target is sent in the first message on the stream. |
| 414 | 414 |
if gc != nil {
|
| 415 | 415 |
target := lb.dialTarget |
| 416 |
- if gc.TargetName != "" {
|
|
| 417 |
- target = gc.TargetName |
|
| 416 |
+ if gc.ServiceName != "" {
|
|
| 417 |
+ target = gc.ServiceName |
|
| 418 | 418 |
} |
| 419 | 419 |
if target != lb.target {
|
| 420 | 420 |
lb.target = target |
| ... | ... |
@@ -34,7 +34,7 @@ const ( |
| 34 | 34 |
type grpclbServiceConfig struct {
|
| 35 | 35 |
serviceconfig.LoadBalancingConfig |
| 36 | 36 |
ChildPolicy *[]map[string]json.RawMessage |
| 37 |
- TargetName string |
|
| 37 |
+ ServiceName string |
|
| 38 | 38 |
} |
| 39 | 39 |
|
| 40 | 40 |
func (b *lbBuilder) ParseConfig(lbConfig json.RawMessage) (serviceconfig.LoadBalancingConfig, error) {
|
| ... | ... |
@@ -33,6 +33,7 @@ import ( |
| 33 | 33 |
"google.golang.org/grpc/balancer" |
| 34 | 34 |
lbpb "google.golang.org/grpc/balancer/grpclb/grpc_lb_v1" |
| 35 | 35 |
"google.golang.org/grpc/connectivity" |
| 36 |
+ "google.golang.org/grpc/credentials/insecure" |
|
| 36 | 37 |
"google.golang.org/grpc/internal/backoff" |
| 37 | 38 |
"google.golang.org/grpc/internal/channelz" |
| 38 | 39 |
imetadata "google.golang.org/grpc/internal/metadata" |
| ... | ... |
@@ -228,7 +229,7 @@ func (lb *lbBalancer) newRemoteBalancerCCWrapper() {
|
| 228 | 228 |
} else if bundle := lb.grpclbClientConnCreds; bundle != nil {
|
| 229 | 229 |
dopts = append(dopts, grpc.WithCredentialsBundle(bundle)) |
| 230 | 230 |
} else {
|
| 231 |
- dopts = append(dopts, grpc.WithInsecure()) |
|
| 231 |
+ dopts = append(dopts, grpc.WithTransportCredentials(insecure.NewCredentials())) |
|
| 232 | 232 |
} |
| 233 | 233 |
if lb.opt.Dialer != nil {
|
| 234 | 234 |
dopts = append(dopts, grpc.WithContextDialer(lb.opt.Dialer)) |
| ... | ... |
@@ -79,7 +79,7 @@ var ( |
| 79 | 79 |
// errNoTransportSecurity indicates that there is no transport security |
| 80 | 80 |
// being set for ClientConn. Users should either set one or explicitly |
| 81 | 81 |
// call WithInsecure DialOption to disable security. |
| 82 |
- errNoTransportSecurity = errors.New("grpc: no transport security set (use grpc.WithInsecure() explicitly or set credentials)")
|
|
| 82 |
+ errNoTransportSecurity = errors.New("grpc: no transport security set (use grpc.WithTransportCredentials(insecure.NewCredentials()) explicitly or set credentials)")
|
|
| 83 | 83 |
// errTransportCredsAndBundle indicates that creds bundle is used together |
| 84 | 84 |
// with other individual Transport Credentials. |
| 85 | 85 |
errTransportCredsAndBundle = errors.New("grpc: credentials.Bundle may not be used with individual TransportCredentials")
|
| ... | ... |
@@ -24,6 +24,7 @@ import ( |
| 24 | 24 |
"sync" |
| 25 | 25 |
|
| 26 | 26 |
grpc "google.golang.org/grpc" |
| 27 |
+ "google.golang.org/grpc/credentials/insecure" |
|
| 27 | 28 |
) |
| 28 | 29 |
|
| 29 | 30 |
var ( |
| ... | ... |
@@ -49,7 +50,7 @@ func Dial(hsAddress string) (*grpc.ClientConn, error) {
|
| 49 | 49 |
// Create a new connection to the handshaker service. Note that |
| 50 | 50 |
// this connection stays open until the application is closed. |
| 51 | 51 |
var err error |
| 52 |
- hsConn, err = hsDialer(hsAddress, grpc.WithInsecure()) |
|
| 52 |
+ hsConn, err = hsDialer(hsAddress, grpc.WithTransportCredentials(insecure.NewCredentials())) |
|
| 53 | 53 |
if err != nil {
|
| 54 | 54 |
return nil, err |
| 55 | 55 |
} |
| ... | ... |
@@ -50,7 +50,7 @@ func NewDefaultCredentialsWithOptions(opts DefaultCredentialsOptions) credential |
| 50 | 50 |
ctx, cancel := context.WithTimeout(context.Background(), tokenRequestTimeout) |
| 51 | 51 |
defer cancel() |
| 52 | 52 |
var err error |
| 53 |
- opts.PerRPCCreds, err = oauth.NewApplicationDefault(ctx) |
|
| 53 |
+ opts.PerRPCCreds, err = newADC(ctx) |
|
| 54 | 54 |
if err != nil {
|
| 55 | 55 |
logger.Warningf("NewDefaultCredentialsWithOptions: failed to create application oauth: %v", err)
|
| 56 | 56 |
} |
| ... | ... |
@@ -112,6 +112,9 @@ var ( |
| 112 | 112 |
newALTS = func() credentials.TransportCredentials {
|
| 113 | 113 |
return alts.NewClientCreds(alts.DefaultClientOptions()) |
| 114 | 114 |
} |
| 115 |
+ newADC = func(ctx context.Context) (credentials.PerRPCCredentials, error) {
|
|
| 116 |
+ return oauth.NewApplicationDefault(ctx) |
|
| 117 |
+ } |
|
| 115 | 118 |
) |
| 116 | 119 |
|
| 117 | 120 |
// NewWithMode should make a copy of Bundle, and switch mode. Modifying the |
| ... | ... |
@@ -70,3 +70,29 @@ type info struct {
|
| 70 | 70 |
func (info) AuthType() string {
|
| 71 | 71 |
return "insecure" |
| 72 | 72 |
} |
| 73 |
+ |
|
| 74 |
+// insecureBundle implements an insecure bundle. |
|
| 75 |
+// An insecure bundle provides a thin wrapper around insecureTC to support |
|
| 76 |
+// the credentials.Bundle interface. |
|
| 77 |
+type insecureBundle struct{}
|
|
| 78 |
+ |
|
| 79 |
+// NewBundle returns a bundle with disabled transport security and no per rpc credential. |
|
| 80 |
+func NewBundle() credentials.Bundle {
|
|
| 81 |
+ return insecureBundle{}
|
|
| 82 |
+} |
|
| 83 |
+ |
|
| 84 |
+// NewWithMode returns a new insecure Bundle. The mode is ignored. |
|
| 85 |
+func (insecureBundle) NewWithMode(string) (credentials.Bundle, error) {
|
|
| 86 |
+ return insecureBundle{}, nil
|
|
| 87 |
+} |
|
| 88 |
+ |
|
| 89 |
+// PerRPCCredentials returns an nil implementation as insecure |
|
| 90 |
+// bundle does not support a per rpc credential. |
|
| 91 |
+func (insecureBundle) PerRPCCredentials() credentials.PerRPCCredentials {
|
|
| 92 |
+ return nil |
|
| 93 |
+} |
|
| 94 |
+ |
|
| 95 |
+// TransportCredentials returns the underlying insecure transport credential. |
|
| 96 |
+func (insecureBundle) TransportCredentials() credentials.TransportCredentials {
|
|
| 97 |
+ return NewCredentials() |
|
| 98 |
+} |
| ... | ... |
@@ -72,9 +72,12 @@ type UnaryServerInfo struct {
|
| 72 | 72 |
} |
| 73 | 73 |
|
| 74 | 74 |
// UnaryHandler defines the handler invoked by UnaryServerInterceptor to complete the normal |
| 75 |
-// execution of a unary RPC. If a UnaryHandler returns an error, it should be produced by the |
|
| 76 |
-// status package, or else gRPC will use codes.Unknown as the status code and err.Error() as |
|
| 77 |
-// the status message of the RPC. |
|
| 75 |
+// execution of a unary RPC. |
|
| 76 |
+// |
|
| 77 |
+// If a UnaryHandler returns an error, it should either be produced by the |
|
| 78 |
+// status package, or be one of the context errors. Otherwise, gRPC will use |
|
| 79 |
+// codes.Unknown as the status code and err.Error() as the status message of the |
|
| 80 |
+// RPC. |
|
| 78 | 81 |
type UnaryHandler func(ctx context.Context, req interface{}) (interface{}, error)
|
| 79 | 82 |
|
| 80 | 83 |
// UnaryServerInterceptor provides a hook to intercept the execution of a unary RPC on the server. info |
| ... | ... |
@@ -24,6 +24,7 @@ |
| 24 | 24 |
package channelz |
| 25 | 25 |
|
| 26 | 26 |
import ( |
| 27 |
+ "context" |
|
| 27 | 28 |
"fmt" |
| 28 | 29 |
"sort" |
| 29 | 30 |
"sync" |
| ... | ... |
@@ -49,7 +50,8 @@ var ( |
| 49 | 49 |
// TurnOn turns on channelz data collection. |
| 50 | 50 |
func TurnOn() {
|
| 51 | 51 |
if !IsOn() {
|
| 52 |
- NewChannelzStorage() |
|
| 52 |
+ db.set(newChannelMap()) |
|
| 53 |
+ idGen.reset() |
|
| 53 | 54 |
atomic.StoreInt32(&curState, 1) |
| 54 | 55 |
} |
| 55 | 56 |
} |
| ... | ... |
@@ -94,46 +96,40 @@ func (d *dbWrapper) get() *channelMap {
|
| 94 | 94 |
return d.DB |
| 95 | 95 |
} |
| 96 | 96 |
|
| 97 |
-// NewChannelzStorage initializes channelz data storage and id generator. |
|
| 97 |
+// NewChannelzStorageForTesting initializes channelz data storage and id |
|
| 98 |
+// generator for testing purposes. |
|
| 98 | 99 |
// |
| 99 |
-// This function returns a cleanup function to wait for all channelz state to be reset by the |
|
| 100 |
-// grpc goroutines when those entities get closed. By using this cleanup function, we make sure tests |
|
| 101 |
-// don't mess up each other, i.e. lingering goroutine from previous test doing entity removal happen |
|
| 102 |
-// to remove some entity just register by the new test, since the id space is the same. |
|
| 103 |
-// |
|
| 104 |
-// Note: This function is exported for testing purpose only. User should not call |
|
| 105 |
-// it in most cases. |
|
| 106 |
-func NewChannelzStorage() (cleanup func() error) {
|
|
| 107 |
- db.set(&channelMap{
|
|
| 108 |
- topLevelChannels: make(map[int64]struct{}),
|
|
| 109 |
- channels: make(map[int64]*channel), |
|
| 110 |
- listenSockets: make(map[int64]*listenSocket), |
|
| 111 |
- normalSockets: make(map[int64]*normalSocket), |
|
| 112 |
- servers: make(map[int64]*server), |
|
| 113 |
- subChannels: make(map[int64]*subChannel), |
|
| 114 |
- }) |
|
| 100 |
+// Returns a cleanup function to be invoked by the test, which waits for up to |
|
| 101 |
+// 10s for all channelz state to be reset by the grpc goroutines when those |
|
| 102 |
+// entities get closed. This cleanup function helps with ensuring that tests |
|
| 103 |
+// don't mess up each other. |
|
| 104 |
+func NewChannelzStorageForTesting() (cleanup func() error) {
|
|
| 105 |
+ db.set(newChannelMap()) |
|
| 115 | 106 |
idGen.reset() |
| 107 |
+ |
|
| 116 | 108 |
return func() error {
|
| 117 |
- var err error |
|
| 118 | 109 |
cm := db.get() |
| 119 | 110 |
if cm == nil {
|
| 120 | 111 |
return nil |
| 121 | 112 |
} |
| 122 |
- for i := 0; i < 1000; i++ {
|
|
| 123 |
- cm.mu.Lock() |
|
| 124 |
- if len(cm.topLevelChannels) == 0 && len(cm.servers) == 0 && len(cm.channels) == 0 && len(cm.subChannels) == 0 && len(cm.listenSockets) == 0 && len(cm.normalSockets) == 0 {
|
|
| 125 |
- cm.mu.Unlock() |
|
| 126 |
- // all things stored in the channelz map have been cleared. |
|
| 113 |
+ |
|
| 114 |
+ ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
|
| 115 |
+ defer cancel() |
|
| 116 |
+ ticker := time.NewTicker(10 * time.Millisecond) |
|
| 117 |
+ defer ticker.Stop() |
|
| 118 |
+ for {
|
|
| 119 |
+ cm.mu.RLock() |
|
| 120 |
+ topLevelChannels, servers, channels, subChannels, listenSockets, normalSockets := len(cm.topLevelChannels), len(cm.servers), len(cm.channels), len(cm.subChannels), len(cm.listenSockets), len(cm.normalSockets) |
|
| 121 |
+ cm.mu.RUnlock() |
|
| 122 |
+ |
|
| 123 |
+ if err := ctx.Err(); err != nil {
|
|
| 124 |
+ return fmt.Errorf("after 10s the channelz map has not been cleaned up yet, topchannels: %d, servers: %d, channels: %d, subchannels: %d, listen sockets: %d, normal sockets: %d", topLevelChannels, servers, channels, subChannels, listenSockets, normalSockets)
|
|
| 125 |
+ } |
|
| 126 |
+ if topLevelChannels == 0 && servers == 0 && channels == 0 && subChannels == 0 && listenSockets == 0 && normalSockets == 0 {
|
|
| 127 | 127 |
return nil |
| 128 | 128 |
} |
| 129 |
- cm.mu.Unlock() |
|
| 130 |
- time.Sleep(10 * time.Millisecond) |
|
| 129 |
+ <-ticker.C |
|
| 131 | 130 |
} |
| 132 |
- |
|
| 133 |
- cm.mu.Lock() |
|
| 134 |
- err = fmt.Errorf("after 10s the channelz map has not been cleaned up yet, topchannels: %d, servers: %d, channels: %d, subchannels: %d, listen sockets: %d, normal sockets: %d", len(cm.topLevelChannels), len(cm.servers), len(cm.channels), len(cm.subChannels), len(cm.listenSockets), len(cm.normalSockets))
|
|
| 135 |
- cm.mu.Unlock() |
|
| 136 |
- return err |
|
| 137 | 131 |
} |
| 138 | 132 |
} |
| 139 | 133 |
|
| ... | ... |
@@ -326,6 +322,17 @@ type channelMap struct {
|
| 326 | 326 |
normalSockets map[int64]*normalSocket |
| 327 | 327 |
} |
| 328 | 328 |
|
| 329 |
+func newChannelMap() *channelMap {
|
|
| 330 |
+ return &channelMap{
|
|
| 331 |
+ topLevelChannels: make(map[int64]struct{}),
|
|
| 332 |
+ channels: make(map[int64]*channel), |
|
| 333 |
+ listenSockets: make(map[int64]*listenSocket), |
|
| 334 |
+ normalSockets: make(map[int64]*normalSocket), |
|
| 335 |
+ servers: make(map[int64]*server), |
|
| 336 |
+ subChannels: make(map[int64]*subChannel), |
|
| 337 |
+ } |
|
| 338 |
+} |
|
| 339 |
+ |
|
| 329 | 340 |
func (c *channelMap) addServer(id int64, s *server) {
|
| 330 | 341 |
c.mu.Lock() |
| 331 | 342 |
s.cm = c |
| ... | ... |
@@ -26,13 +26,13 @@ import ( |
| 26 | 26 |
const ( |
| 27 | 27 |
// XDSBootstrapFileNameEnv is the env variable to set bootstrap file name. |
| 28 | 28 |
// Do not use this and read from env directly. Its value is read and kept in |
| 29 |
- // variable BootstrapFileName. |
|
| 29 |
+ // variable XDSBootstrapFileName. |
|
| 30 | 30 |
// |
| 31 | 31 |
// When both bootstrap FileName and FileContent are set, FileName is used. |
| 32 | 32 |
XDSBootstrapFileNameEnv = "GRPC_XDS_BOOTSTRAP" |
| 33 |
- // XDSBootstrapFileContentEnv is the env variable to set bootstrapp file |
|
| 33 |
+ // XDSBootstrapFileContentEnv is the env variable to set bootstrap file |
|
| 34 | 34 |
// content. Do not use this and read from env directly. Its value is read |
| 35 |
- // and kept in variable BootstrapFileName. |
|
| 35 |
+ // and kept in variable XDSBootstrapFileContent. |
|
| 36 | 36 |
// |
| 37 | 37 |
// When both bootstrap FileName and FileContent are set, FileName is used. |
| 38 | 38 |
XDSBootstrapFileContentEnv = "GRPC_XDS_BOOTSTRAP_CONFIG" |
| ... | ... |
@@ -41,6 +41,7 @@ const ( |
| 41 | 41 |
clientSideSecuritySupportEnv = "GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT" |
| 42 | 42 |
aggregateAndDNSSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" |
| 43 | 43 |
rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_RBAC" |
| 44 |
+ outlierDetectionSupportEnv = "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" |
|
| 44 | 45 |
federationEnv = "GRPC_EXPERIMENTAL_XDS_FEDERATION" |
| 45 | 46 |
rlsInXDSEnv = "GRPC_EXPERIMENTAL_XDS_RLS_LB" |
| 46 | 47 |
|
| ... | ... |
@@ -82,7 +83,10 @@ var ( |
| 82 | 82 |
// which can be disabled by setting the environment variable |
| 83 | 83 |
// "GRPC_XDS_EXPERIMENTAL_RBAC" to "false". |
| 84 | 84 |
XDSRBAC = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false") |
| 85 |
- |
|
| 85 |
+ // XDSOutlierDetection indicates whether outlier detection support is |
|
| 86 |
+ // enabled, which can be enabled by setting the environment variable |
|
| 87 |
+ // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "true". |
|
| 88 |
+ XDSOutlierDetection = strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "true") |
|
| 86 | 89 |
// XDSFederation indicates whether federation support is enabled. |
| 87 | 90 |
XDSFederation = strings.EqualFold(os.Getenv(federationEnv), "true") |
| 88 | 91 |
|
| ... | ... |
@@ -38,11 +38,10 @@ var ( |
| 38 | 38 |
// KeepaliveMinPingTime is the minimum ping interval. This must be 10s by |
| 39 | 39 |
// default, but tests may wish to set it lower for convenience. |
| 40 | 40 |
KeepaliveMinPingTime = 10 * time.Second |
| 41 |
- // ParseServiceConfigForTesting is for creating a fake |
|
| 42 |
- // ClientConn for resolver testing only |
|
| 43 |
- ParseServiceConfigForTesting interface{} // func(string) *serviceconfig.ParseResult
|
|
| 41 |
+ // ParseServiceConfig parses a JSON representation of the service config. |
|
| 42 |
+ ParseServiceConfig interface{} // func(string) *serviceconfig.ParseResult
|
|
| 44 | 43 |
// EqualServiceConfigForTesting is for testing service config generation and |
| 45 |
- // parsing. Both a and b should be returned by ParseServiceConfigForTesting. |
|
| 44 |
+ // parsing. Both a and b should be returned by ParseServiceConfig. |
|
| 46 | 45 |
// This function compares the config without rawJSON stripped, in case the |
| 47 | 46 |
// there's difference in white space. |
| 48 | 47 |
EqualServiceConfigForTesting func(a, b serviceconfig.Config) bool |
| ... | ... |
@@ -741,6 +741,12 @@ func (e ConnectionError) Origin() error {
|
| 741 | 741 |
return e.err |
| 742 | 742 |
} |
| 743 | 743 |
|
| 744 |
+// Unwrap returns the original error of this connection error or nil when the |
|
| 745 |
+// origin is nil. |
|
| 746 |
+func (e ConnectionError) Unwrap() error {
|
|
| 747 |
+ return e.err |
|
| 748 |
+} |
|
| 749 |
+ |
|
| 744 | 750 |
var ( |
| 745 | 751 |
// ErrConnClosing indicates that the transport is closing. |
| 746 | 752 |
ErrConnClosing = connectionErrorf(true, nil, "transport is closing") |
| ... | ... |
@@ -27,9 +27,9 @@ export PATH=${GOBIN}:${PATH}
|
| 27 | 27 |
mkdir -p ${GOBIN}
|
| 28 | 28 |
|
| 29 | 29 |
echo "remove existing generated files" |
| 30 |
-# grpc_testingv3/testv3.pb.go is not re-generated because it was |
|
| 31 |
-# intentionally generated by an older version of protoc-gen-go. |
|
| 32 |
-rm -f $(find . -name '*.pb.go' | grep -v 'grpc_testingv3/testv3.pb.go') |
|
| 30 |
+# grpc_testing_not_regenerate/*.pb.go is not re-generated, |
|
| 31 |
+# see grpc_testing_not_regenerate/README.md for details. |
|
| 32 |
+rm -f $(find . -name '*.pb.go' | grep -v 'grpc_testing_not_regenerate') |
|
| 33 | 33 |
|
| 34 | 34 |
echo "go install google.golang.org/protobuf/cmd/protoc-gen-go" |
| 35 | 35 |
(cd test/tools && go install google.golang.org/protobuf/cmd/protoc-gen-go) |
| ... | ... |
@@ -117,9 +117,9 @@ done |
| 117 | 117 |
mkdir -p ${WORKDIR}/out/google.golang.org/grpc/internal/proto/grpc_lookup_v1
|
| 118 | 118 |
mv ${WORKDIR}/out/google.golang.org/grpc/lookup/grpc_lookup_v1/* ${WORKDIR}/out/google.golang.org/grpc/internal/proto/grpc_lookup_v1
|
| 119 | 119 |
|
| 120 |
-# grpc_testingv3/testv3.pb.go is not re-generated because it was |
|
| 121 |
-# intentionally generated by an older version of protoc-gen-go. |
|
| 122 |
-rm ${WORKDIR}/out/google.golang.org/grpc/reflection/grpc_testingv3/*.pb.go
|
|
| 120 |
+# grpc_testing_not_regenerate/*.pb.go are not re-generated, |
|
| 121 |
+# see grpc_testing_not_regenerate/README.md for details. |
|
| 122 |
+rm ${WORKDIR}/out/google.golang.org/grpc/reflection/grpc_testing_not_regenerate/*.pb.go
|
|
| 123 | 123 |
|
| 124 | 124 |
# grpc/service_config/service_config.proto does not have a go_package option. |
| 125 | 125 |
mv ${WORKDIR}/out/grpc/service_config/service_config.pb.go internal/proto/grpc_service_config
|
| ... | ... |
@@ -1283,9 +1283,10 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. |
| 1283 | 1283 |
if appErr != nil {
|
| 1284 | 1284 |
appStatus, ok := status.FromError(appErr) |
| 1285 | 1285 |
if !ok {
|
| 1286 |
- // Convert appErr if it is not a grpc status error. |
|
| 1287 |
- appErr = status.Error(codes.Unknown, appErr.Error()) |
|
| 1288 |
- appStatus, _ = status.FromError(appErr) |
|
| 1286 |
+ // Convert non-status application error to a status error with code |
|
| 1287 |
+ // Unknown, but handle context errors specifically. |
|
| 1288 |
+ appStatus = status.FromContextError(appErr) |
|
| 1289 |
+ appErr = appStatus.Err() |
|
| 1289 | 1290 |
} |
| 1290 | 1291 |
if trInfo != nil {
|
| 1291 | 1292 |
trInfo.tr.LazyLog(stringer(appStatus.Message()), true) |
| ... | ... |
@@ -1549,7 +1550,9 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp |
| 1549 | 1549 |
if appErr != nil {
|
| 1550 | 1550 |
appStatus, ok := status.FromError(appErr) |
| 1551 | 1551 |
if !ok {
|
| 1552 |
- appStatus = status.New(codes.Unknown, appErr.Error()) |
|
| 1552 |
+ // Convert non-status application error to a status error with code |
|
| 1553 |
+ // Unknown, but handle context errors specifically. |
|
| 1554 |
+ appStatus = status.FromContextError(appErr) |
|
| 1553 | 1555 |
appErr = appStatus.Err() |
| 1554 | 1556 |
} |
| 1555 | 1557 |
if trInfo != nil {
|
| ... | ... |
@@ -218,7 +218,7 @@ type jsonSC struct {
|
| 218 | 218 |
} |
| 219 | 219 |
|
| 220 | 220 |
func init() {
|
| 221 |
- internal.ParseServiceConfigForTesting = parseServiceConfig |
|
| 221 |
+ internal.ParseServiceConfig = parseServiceConfig |
|
| 222 | 222 |
} |
| 223 | 223 |
func parseServiceConfig(js string) *serviceconfig.ParseResult {
|
| 224 | 224 |
if len(js) == 0 {
|
| ... | ... |
@@ -46,10 +46,12 @@ import ( |
| 46 | 46 |
) |
| 47 | 47 |
|
| 48 | 48 |
// StreamHandler defines the handler called by gRPC server to complete the |
| 49 |
-// execution of a streaming RPC. If a StreamHandler returns an error, it |
|
| 50 |
-// should be produced by the status package, or else gRPC will use |
|
| 51 |
-// codes.Unknown as the status code and err.Error() as the status message |
|
| 52 |
-// of the RPC. |
|
| 49 |
+// execution of a streaming RPC. |
|
| 50 |
+// |
|
| 51 |
+// If a StreamHandler returns an error, it should either be produced by the |
|
| 52 |
+// status package, or be one of the context errors. Otherwise, gRPC will use |
|
| 53 |
+// codes.Unknown as the status code and err.Error() as the status message of the |
|
| 54 |
+// RPC. |
|
| 53 | 55 |
type StreamHandler func(srv interface{}, stream ServerStream) error
|
| 54 | 56 |
|
| 55 | 57 |
// StreamDesc represents a streaming RPC service's method specification. Used |
| ... | ... |
@@ -107,7 +107,7 @@ for MOD_FILE in $(find . -name 'go.mod'); do |
| 107 | 107 |
go vet -all ./... | fail_on_output |
| 108 | 108 |
gofmt -s -d -l . 2>&1 | fail_on_output |
| 109 | 109 |
goimports -l . 2>&1 | not grep -vE "\.pb\.go" |
| 110 |
- golint ./... 2>&1 | not grep -vE "/testv3\.pb\.go:" |
|
| 110 |
+ golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" |
|
| 111 | 111 |
|
| 112 | 112 |
go mod tidy |
| 113 | 113 |
git status --porcelain 2>&1 | fail_on_output || \ |
| ... | ... |
@@ -237,10 +237,10 @@ github.com/containerd/fifo |
| 237 | 237 |
# github.com/containerd/go-runc v1.0.0 |
| 238 | 238 |
## explicit; go 1.13 |
| 239 | 239 |
github.com/containerd/go-runc |
| 240 |
-# github.com/containerd/stargz-snapshotter v0.11.2 |
|
| 240 |
+# github.com/containerd/stargz-snapshotter v0.11.3 |
|
| 241 | 241 |
## explicit; go 1.16 |
| 242 | 242 |
github.com/containerd/stargz-snapshotter/snapshot/overlayutils |
| 243 |
-# github.com/containerd/stargz-snapshotter/estargz v0.11.2 |
|
| 243 |
+# github.com/containerd/stargz-snapshotter/estargz v0.11.3 |
|
| 244 | 244 |
## explicit; go 1.16 |
| 245 | 245 |
github.com/containerd/stargz-snapshotter/estargz |
| 246 | 246 |
github.com/containerd/stargz-snapshotter/estargz/errorutil |
| ... | ... |
@@ -519,7 +519,7 @@ github.com/ishidawataru/sctp |
| 519 | 519 |
# github.com/jmespath/go-jmespath v0.3.0 |
| 520 | 520 |
## explicit; go 1.14 |
| 521 | 521 |
github.com/jmespath/go-jmespath |
| 522 |
-# github.com/klauspost/compress v1.15.0 |
|
| 522 |
+# github.com/klauspost/compress v1.15.1 |
|
| 523 | 523 |
## explicit; go 1.15 |
| 524 | 524 |
github.com/klauspost/compress |
| 525 | 525 |
github.com/klauspost/compress/fse |
| ... | ... |
@@ -539,7 +539,7 @@ github.com/mistifyio/go-zfs |
| 539 | 539 |
# github.com/mitchellh/hashstructure/v2 v2.0.2 |
| 540 | 540 |
## explicit; go 1.14 |
| 541 | 541 |
github.com/mitchellh/hashstructure/v2 |
| 542 |
-# github.com/moby/buildkit v0.10.0 |
|
| 542 |
+# github.com/moby/buildkit v0.10.1-0.20220322023015-8d45bd661230 |
|
| 543 | 543 |
## explicit; go 1.17 |
| 544 | 544 |
github.com/moby/buildkit/api/services/control |
| 545 | 545 |
github.com/moby/buildkit/api/types |
| ... | ... |
@@ -1004,7 +1004,7 @@ google.golang.org/genproto/googleapis/logging/type |
| 1004 | 1004 |
google.golang.org/genproto/googleapis/logging/v2 |
| 1005 | 1005 |
google.golang.org/genproto/googleapis/rpc/status |
| 1006 | 1006 |
google.golang.org/genproto/protobuf/field_mask |
| 1007 |
-# google.golang.org/grpc v1.44.0 |
|
| 1007 |
+# google.golang.org/grpc v1.45.0 |
|
| 1008 | 1008 |
## explicit; go 1.14 |
| 1009 | 1009 |
google.golang.org/grpc |
| 1010 | 1010 |
google.golang.org/grpc/attributes |