From deb8477c641cac41663369f0a0ae0f7751948203 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 16 Jun 2026 02:47:00 +0000 Subject: [PATCH] Update module github.com/checkpoint-restore/go-criu/v8 to v8.3.0 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- common/go.mod | 3 +- common/go.sum | 6 +- .../protobuf-go-lite/.gitattributes | 1 + .../protobuf-go-lite/.gitignore | 8 + .../protobuf-go-lite/.golangci.yml | 69 + .../aperturerobotics/protobuf-go-lite/.ignore | 5 + .../aperturerobotics/protobuf-go-lite/LICENSE | 31 + .../protobuf-go-lite/Makefile | 112 + .../aperturerobotics/protobuf-go-lite/PATENTS | 22 + .../protobuf-go-lite/README.md | 157 ++ .../protobuf-go-lite/protobuf-go-lite.go | 594 +++++ .../go-criu/v8/stats/stats.pb.go | 2135 ++++++++++++++--- .../go-criu/v8/stats/utils.go | 4 +- vendor/modules.txt | 7 +- 14 files changed, 2870 insertions(+), 284 deletions(-) create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/.gitattributes create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/.gitignore create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/.golangci.yml create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/.ignore create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/LICENSE create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/Makefile create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/PATENTS create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/README.md create mode 100644 vendor/github.com/aperturerobotics/protobuf-go-lite/protobuf-go-lite.go diff --git a/common/go.mod b/common/go.mod index 368c38412a..8cee24883c 100644 --- a/common/go.mod +++ b/common/go.mod @@ -6,7 +6,7 @@ go 1.25.7 require ( github.com/checkpoint-restore/checkpointctl v1.5.0 - github.com/checkpoint-restore/go-criu/v8 v8.2.0 + github.com/checkpoint-restore/go-criu/v8 v8.3.0 github.com/containerd/platforms v1.0.0-rc.4 github.com/containers/ocicrypt v1.3.1-0.20260527145308-c03ceaa8ff0d github.com/coreos/go-systemd/v22 v22.7.0 @@ -58,6 +58,7 @@ require ( github.com/Microsoft/go-winio v0.6.2 // indirect github.com/VividCortex/ewma v1.2.0 // indirect github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect + github.com/aperturerobotics/protobuf-go-lite v0.14.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/clipperhouse/uax29/v2 v2.7.0 // indirect diff --git a/common/go.sum b/common/go.sum index 50e783a60b..b2318ce9c8 100644 --- a/common/go.sum +++ b/common/go.sum @@ -12,14 +12,16 @@ github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1o github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8= github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo= +github.com/aperturerobotics/protobuf-go-lite v0.14.0 h1:6YhovtoUZtXgXLHZ2VV2GCYUzFfi8UN6172Vl2flNlE= +github.com/aperturerobotics/protobuf-go-lite v0.14.0/go.mod h1:lGH3s5ArCTXKI4wJdlNpaybUtwSjfAG0vdWjxOfMcF8= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/checkpoint-restore/checkpointctl v1.5.0 h1:Uu+D2cOf/GUyCMk23Y8L69P6YoATTe6pH+Au64O3y28= github.com/checkpoint-restore/checkpointctl v1.5.0/go.mod h1:y5HRs1ZWQUZGyEuthlTHmTJN9PUMOjlaH6JvVaNq9kE= -github.com/checkpoint-restore/go-criu/v8 v8.2.0 h1:dsgMgj/eJtZNKn3qn/+Ri0b4bd0uo6o2zt1yd8Nj2NI= -github.com/checkpoint-restore/go-criu/v8 v8.2.0/go.mod h1:HVKJ1dK+bowJcFI1MtdL2ECIuY+/AtRMHzD9Lqa4uA4= +github.com/checkpoint-restore/go-criu/v8 v8.3.0 h1:UC3Ioay1OMN2Wg33U53enRoG2701vJ9Y2Ex4APmC52w= +github.com/checkpoint-restore/go-criu/v8 v8.3.0/go.mod h1:33d6FwGJGwnzKVvaO0SxlN0tPSuArKU9X/inD/L7/qA= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/.gitattributes b/vendor/github.com/aperturerobotics/protobuf-go-lite/.gitattributes new file mode 100644 index 0000000000..1f21496300 --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/.gitattributes @@ -0,0 +1 @@ +*.pb.* linguist-generated diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/.gitignore b/vendor/github.com/aperturerobotics/protobuf-go-lite/.gitignore new file mode 100644 index 0000000000..1a6d2284a0 --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/.gitignore @@ -0,0 +1,8 @@ +/.cache/ +/.gocache/ +/bin/ +/vendor/ +.#* +.aider* +debug.test* +/node_modules diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/.golangci.yml b/vendor/github.com/aperturerobotics/protobuf-go-lite/.golangci.yml new file mode 100644 index 0000000000..81b6f4b7df --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/.golangci.yml @@ -0,0 +1,69 @@ +linters: + enable: + - depguard + - goimports + - gosec + - gosimple + - govet + - importas + - ineffassign + - misspell + - revive + - staticcheck + - typecheck + - unconvert + - unused + + disable: + - errcheck + + run: + concurrency: 4 + modules-download-mode: vendor + + skip-dirs: + - hack + +linters-settings: + staticcheck: + checks: + - all + - '-SA1012' # Allow passing nil contexts. + - '-SA1019' # Allow calling deprecated symbols. + + importas: + # Do not allow unaliased imports of aliased packages. + no-unaliased: true + + maligned: + suggest-new: true + + depguard: + rules: + main: + deny: + - pkg: io/ioutil + desc: The io/ioutil package has been deprecated, see https://go.dev/doc/go1.16#ioutil + #- pkg: "github.com/stretchr/testify/assert" + # desc: Use "gotest.tools/v3/assert" instead + #- pkg: "github.com/stretchr/testify/require" + # desc: Use "gotest.tools/v3/assert" instead + - pkg: "github.com/stretchr/testify/suite" + desc: Do not use + + revive: + rules: + - name: package-comments + disabled: true + +issues: + # Maximum issues count per one linter. Set to 0 to disable. Default is 50. + max-issues-per-linter: 0 + + # Maximum count of issues with the same text. Set to 0 to disable. Default is 3. + max-same-issues: 0 + + exclude: + - G601 + - G306 + - G204 diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/.ignore b/vendor/github.com/aperturerobotics/protobuf-go-lite/.ignore new file mode 100644 index 0000000000..3be6623eab --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/.ignore @@ -0,0 +1,5 @@ +*.pb.go +*.pb.ts +go.sum +testdata +thirdparty \ No newline at end of file diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/LICENSE b/vendor/github.com/aperturerobotics/protobuf-go-lite/LICENSE new file mode 100644 index 0000000000..a5f7f63da3 --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/LICENSE @@ -0,0 +1,31 @@ +Copyright (c) 2024-2025 Aperture Robotics, LLC. All rights reserved. +Copyright (c) 2024-2025 Christian Stewart . All rights reserved. +Copyright (c) 2021, PlanetScale Inc. All rights reserved. +Copyright (c) 2013, The GoGo Authors. All rights reserved. +Copyright (c) 2018 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/Makefile b/vendor/github.com/aperturerobotics/protobuf-go-lite/Makefile new file mode 100644 index 0000000000..4a32248da6 --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/Makefile @@ -0,0 +1,112 @@ +SHELL:=bash +PROTOWRAP=hack/bin/protowrap +GOIMPORTS=hack/bin/goimports +GOFUMPT=hack/bin/gofumpt +GOLANGCI_LINT=hack/bin/golangci-lint +PROTOC_GEN_GO=hack/bin/protoc-gen-go-lite +GOLIST=go list -f "{{ .Dir }}" -m + +export GO111MODULE=on +undefine GOOS +undefine GOARCH + +all: + +vendor: + go mod vendor + +$(GOIMPORTS): + cd ./hack; \ + go build -v \ + -o ./bin/goimports \ + golang.org/x/tools/cmd/goimports + +$(GOFUMPT): + cd ./hack; \ + go build -v \ + -o ./bin/gofumpt \ + mvdan.cc/gofumpt + +$(PROTOWRAP): + cd ./hack; \ + go build -v \ + -o ./bin/protowrap \ + github.com/aperturerobotics/goprotowrap/cmd/protowrap + +$(GOLANGCI_LINT): + cd ./hack; \ + go build -v \ + -o ./bin/golangci-lint \ + github.com/golangci/golangci-lint/cmd/golangci-lint + +$(PROTOC_GEN_GO): + cd ./hack; \ + go build -v \ + -o ./bin/protoc-gen-go-lite \ + github.com/aperturerobotics/protobuf-go-lite/cmd/protoc-gen-go-lite + +.PHONY: protoc-gen-go-lite-tool +protoc-gen-go-lite-tool: + cd ./hack; \ + go build -v \ + -o ./bin/protoc-gen-go-lite \ + github.com/aperturerobotics/protobuf-go-lite/cmd/protoc-gen-go-lite + +.PHONY: build +build: vendor + go build -v + +.PHONY: lint +lint: $(GOLANGCI_LINT) + $(GOLANGCI_LINT) run --timeout=10m + +.PHONY: fix +fix: $(GOLANGCI_LINT) + $(GOLANGCI_LINT) run --fix --timeout=10m + +.PHONY: format +format: $(GOFUMPT) $(GOIMPORTS) + $(GOIMPORTS) -w ./ + $(GOFUMPT) -w ./ + +.PHONY: test +test: + go test -v ./... + +.PHONY: gengo +gengo: $(GOIMPORTS) $(PROTOWRAP) protoc-gen-go-lite-tool + shopt -s globstar; \ + set -eo pipefail; \ + export PROJECT=$$(go list -m); \ + export PATH=$$(pwd)/hack/bin:$${PATH}; \ + mkdir -p $$(pwd)/vendor/$$(dirname $${PROJECT}); \ + rm $$(pwd)/vendor/$${PROJECT} || true; \ + ln -s $$(pwd) $$(pwd)/vendor/$${PROJECT} ; \ + protogen() { \ + $(PROTOWRAP) \ + -I $$(pwd)/vendor \ + -I $$(pwd) \ + --go-lite_out=$$(pwd)/vendor \ + --proto_path $$(pwd)/vendor \ + --print_structure \ + --only_specified_files \ + $$2 \ + $$(\ + git \ + ls-files "$$1" |\ + xargs printf -- \ + "$$(pwd)/vendor/$${PROJECT}/%s "); \ + }; \ + for d in ./types/known/*; do \ + protogen "$${d}/*.proto" "--go-lite_opt=features=marshal+marshal_strict+unmarshal+unmarshal_unsafe+size+equal+clone+text"; \ + done; \ + protogen "./types/descriptorpb/*.proto" ""; \ + protogen "./types/pluginpb/*.proto" ""; \ + protogen "./testproto/*.proto" ""; \ + rm $$(pwd)/vendor/$${PROJECT} || true + $(GOIMPORTS) -w ./ + +.PHONY: check-gengo +check-gengo: gengo + git diff --exit-code HEAD + test -z "$$(git ls-files --others --exclude-standard)" || (git ls-files --others --exclude-standard; exit 1) diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/PATENTS b/vendor/github.com/aperturerobotics/protobuf-go-lite/PATENTS new file mode 100644 index 0000000000..733099041f --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/PATENTS @@ -0,0 +1,22 @@ +Additional IP Rights Grant (Patents) + +"This implementation" means the copyrightable works distributed by +Google as part of the Go project. + +Google hereby grants to You a perpetual, worldwide, non-exclusive, +no-charge, royalty-free, irrevocable (except as stated in this section) +patent license to make, have made, use, offer to sell, sell, import, +transfer and otherwise run, modify and propagate the contents of this +implementation of Go, where such license applies only to those patent +claims, both currently owned or controlled by Google and acquired in +the future, licensable by Google that are necessarily infringed by this +implementation of Go. This grant does not include claims that would be +infringed only as a consequence of further modification of this +implementation. If you or your agent or exclusive licensee institute or +order or agree to the institution of patent litigation against any +entity (including a cross-claim or counterclaim in a lawsuit) alleging +that this implementation of Go or any code incorporated within this +implementation of Go constitutes direct or contributory patent +infringement, or inducement of patent infringement, then any patent +rights granted to you under this License for this implementation of Go +shall terminate as of the date such litigation is filed. diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/README.md b/vendor/github.com/aperturerobotics/protobuf-go-lite/README.md new file mode 100644 index 0000000000..a56e9000cf --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/README.md @@ -0,0 +1,157 @@ +# protobuf-go-lite + +[![GoDoc Widget]][GoDoc] [![Go Report Card Widget]][Go Report Card] [![DeepWiki Widget]][DeepWiki] + +[GoDoc]: https://godoc.org/github.com/aperturerobotics/protobuf-go-lite +[GoDoc Widget]: https://godoc.org/github.com/aperturerobotics/protobuf-go-lite?status.svg +[Go Report Card Widget]: https://goreportcard.com/badge/github.com/aperturerobotics/protobuf-go-lite +[Go Report Card]: https://goreportcard.com/report/github.com/aperturerobotics/protobuf-go-lite +[DeepWiki Widget]: https://img.shields.io/badge/DeepWiki-aperturerobotics%2Fprotobuf--go--lite-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg== +[DeepWiki]: https://deepwiki.com/aperturerobotics/protobuf-go-lite + +**protobuf-go-lite** is a stripped-down version of the [protobuf-go] code +generator modified to work without reflection and merged with [vtprotobuf] to +provide modular features with static code generation for marshal/unmarshal, +size, clone, and equal. It bundles a fork of [protoc-gen-go-json] for JSON. + +[protobuf-go]: https://github.com/protocolbuffers/protobuf-go +[vtprotobuf]: https://github.com/planetscale/vtprotobuf +[protoc-gen-go-json]: https://github.com/TheThingsIndustries/protoc-gen-go-json + +Static code generation without reflection is more efficient at runtime and +results in smaller code binaries. It also provides better support for [tinygo] +which has limited reflection support. + +[tinygo]: https://github.com/tinygo-org/tinygo + +protobuf-go-lite supports Edition 2024 schemas that resolve to the open Go API +and static, reflect-free generated output. The default `features=all` path +supports explicit and implicit presence, legacy required fields, packed +encoding, delimited message encoding, oneofs, maps, clone/equal, text, +unmarshal, unsafe unmarshal, and JSON when the resolved JSON format is +`ALLOW`. + +protobuf-go-lite rejects Edition schemas that require closed enum semantics, +`LEGACY_BEST_EFFORT` JSON, or explicit hybrid/opaque Go APIs. It does not +support fieldmasks and extensions. + +### Ecosystem + +Lightweight Protobuf 3 RPCs are implemented in [StaRPC] for Go and TypeScript. + +[StaRPC]: https://github.com/aperturerobotics/starpc + +[protoc-gen-doc] is recommended for generating documentation. + +[protoc-gen-doc]: https://github.com/pseudomuto/protoc-gen-doc + +[protobuf-es-lite] is recommended for lightweight TypeScript protobufs. + +[protobuf-es-lite]: https://github.com/aperturerobotics/protobuf-es-lite + +## Protobuf + +[protocol buffers](https://protobuf.dev) are a cross-platform cross-language +message serialization format. Protobuf is a language for specifying the schema +for structured data. This schema is compiled into language specific bindings. +This project provides both a tool to generate Go code for the protocol buffer +language, and also the runtime implementation to handle serialization of +messages in Go. + +See the [protocol buffer developer guide](https://protobuf.dev/overview) for +more information about protocol buffers themselves. + +## Example + +See the [protobuf-project](https://github.com/aperturerobotics/protobuf-project) +template for an example of how to use this package and vtprotobuf together with +protowrap to generate protobufs for your project. + +This package is available at **github.com/aperturerobotics/protobuf-go-lite**. + +## Package index + +Summary of the packages provided by this module: + +* [`compiler/protogen`](https://pkg.go.dev/github.com/aperturerobotics/protobuf-go-lite/compiler/protogen): + Package `protogen` provides support for writing protoc plugins. +* [`cmd/protoc-gen-go-lite`](https://pkg.go.dev/github.com/aperturerobotics/protobuf-go-lite/cmd/protoc-gen-go-lite): + The `protoc-gen-go-lite` binary is a protoc plugin to generate a Go protocol + buffer package. + +## Usage + +1. Install `protoc-gen-go-lite`: + + ``` + go install github.com/aperturerobotics/protobuf-go-lite/cmd/protoc-gen-go-lite@latest + ``` + +2. Update your `protoc` generator to use the new plug-in. + + ``` + for name in $(PROTO_SRC_NAMES); do \ + protoc \ + --plugin protoc-gen-go-lite="${GOBIN}/protoc-gen-go-lite" \ + --go-lite_out=. \ + --go-lite_opt=features=marshal+unmarshal+size+equal+clone \ + proto/$${name}.proto; \ + done + ``` + +`protobuf-go-lite` replaces `protoc-gen-go` and `protoc-gen-go-vtprotobuf` and should not be used with those generators. + +Check out the [template](https://github.com/aperturerobotics/template) for a quick start! + +## Available features + +The following additional features from vtprotobuf can be enabled: + +- `size`: generates a `func (p *YourProto) SizeVT() int` helper that behaves identically to calling `proto.Size(p)` on the message, except the size calculation is fully unrolled and does not use reflection. This helper function can be used directly, and it'll also be used by the `marshal` codegen to ensure the destination buffer is properly sized before ProtoBuf objects are marshalled to it. + +- `equal`: generates the following helper methods + + - `func (this *YourProto) EqualVT(that *YourProto) bool`: this function behaves almost identically to calling `proto.Equal(this, that)` on messages, except the equality calculation is fully unrolled and does not use reflection. This helper function can be used directly. + + - `func (this *YourProto) EqualMessageVT(thatMsg any) bool`: this function behaves like the above `this.EqualVT(that)`, but allows comparing against arbitrary proto messages. If `thatMsg` is not of type `*YourProto`, false is returned. The uniform signature provided by this method allows accessing this method via type assertions even if the message type is not known at compile time. This allows implementing a generic `func EqualVT(proto.Message, proto.Message) bool` without reflection. + +- `marshal`: generates the following helper methods + + - `func (p *YourProto) MarshalVT() ([]byte, error)`: this function behaves identically to calling `proto.Marshal(p)`, except the actual marshalling has been fully unrolled and does not use reflection or allocate memory. This function simply allocates a properly sized buffer by calling `SizeVT` on the message and then uses `MarshalToSizedBufferVT` to marshal to it. + + - `func (p *YourProto) MarshalToVT(data []byte) (int, error)`: this function can be used to marshal a message to an existing buffer. The buffer must be large enough to hold the marshalled message, otherwise this function will panic. It returns the number of bytes marshalled. This function is useful e.g. when using memory pooling to re-use serialization buffers. + + - `func (p *YourProto) MarshalToSizedBufferVT(data []byte) (int, error)`: this function behaves like `MarshalTo` but expects that the input buffer has the exact size required to hold the message, otherwise it will panic. + +- `marshal_strict`: generates the following helper methods + + - `func (p *YourProto) MarshalVTStrict() ([]byte, error)`: this function behaves like `MarshalVT`, except fields are marshalled in a strict order by field's numbers they were declared in .proto file. + + - `func (p *YourProto) MarshalToVTStrict(data []byte) (int, error)`: this function behaves like `MarshalToVT`, except fields are marshalled in a strict order by field's numbers they were declared in .proto file. + + - `func (p *YourProto) MarshalToSizedBufferVTStrict(data []byte) (int, error)`: this function behaves like `MarshalToSizedBufferVT`, except fields are marshalled in a strict order by field's numbers they were declared in .proto file. + + +- `unmarshal`: generates a `func (p *YourProto) UnmarshalVT(data []byte)` that behaves similarly to calling `proto.Unmarshal(data, p)` on the message, except the unmarshalling is performed by unrolled codegen without using reflection and allocating as little memory as possible. If the receiver `p` is **not** fully zeroed-out, the unmarshal call will actually behave like `proto.Merge(data, p)`. This is because the `proto.Unmarshal` in the ProtoBuf API is implemented by resetting the destination message and then calling `proto.Merge` on it. To ensure proper `Unmarshal` semantics, ensure you've called `proto.Reset` on your message before calling `UnmarshalVT`, or that your message has been newly allocated. + +- `unmarshal_unsafe` generates a `func (p *YourProto) UnmarshalVTUnsafe(data []byte)` that behaves like `UnmarshalVT`, except it unsafely casts slices of data to `bytes` and `string` fields instead of copying them to newly allocated arrays, so that it performs less allocations. **Data received from the wire has to be left untouched for the lifetime of the message.** Otherwise, the message's `bytes` and `string` fields can be corrupted. + +- `clone`: generates the following helper methods + + - `func (p *YourProto) CloneVT() *YourProto`: this function behaves similarly to calling `proto.Clone(p)` on the message, except the cloning is performed by unrolled codegen without using reflection. If the receiver `p` is `nil` a typed `nil` is returned. + + - `func (p *YourProto) CloneMessageVT() any`: this function behaves like the above `p.CloneVT()`, but provides a uniform signature in order to be accessible via type assertions even if the type is not known at compile time. This allows implementing a generic `func CloneMessageVT() any` without reflection. If the receiver `p` is `nil`, a typed `nil` pointer of the message type will be returned inside a `any` interface. + +- `json`: generates the following helper methods + + - `func (p *YourProto) UnmarshalJSON(data []byte) error` behaves similarly to calling `protojson.Unmarshal(data, p)` on the message, except the unmarshalling is performed by unrolled codegen without using reflection and allocating as little memory as possible (with json-iterator/go). If the receiver `p` is **not** fully zeroed-out, the unmarshal call will actually behave like `proto.Merge(data, p)`. To ensure proper `Unmarshal` semantics, ensure you've called `proto.Reset` on your message before calling `UnmarshalJSON`, or that your message has been newly allocated. + + - `func (p *YourProto) UnmarshalJSONValue(val *fastjson.Value) error` unmarshals a `*fastjson.Value`. + + - `func (p *YourProto) MarshalJSON() ([]byte, error)` behaves similarly to calling `protojson.Marshal(p)` on the message, except the marshalling is performed by unrolled codegen without using reflection and allocating as little memory as possible (with json-iterator/go). + + - Adding a `//protobuf-go-lite:disable-json` comment before a message or enum will disable the json marshaler / unmarshaler. + +## License + +BSD-3 diff --git a/vendor/github.com/aperturerobotics/protobuf-go-lite/protobuf-go-lite.go b/vendor/github.com/aperturerobotics/protobuf-go-lite/protobuf-go-lite.go new file mode 100644 index 0000000000..98e2eb6423 --- /dev/null +++ b/vendor/github.com/aperturerobotics/protobuf-go-lite/protobuf-go-lite.go @@ -0,0 +1,594 @@ +package protobuf_go_lite + +import ( + "errors" + "fmt" + "io" + "math" + "math/bits" + "slices" + "unsafe" +) + +var ( + // ErrInvalidLength is returned when decoding a negative length. + ErrInvalidLength = errors.New("proto: negative length found during unmarshaling") + // ErrIntOverflow is returned when decoding a varint representation of an integer that overflows 64 bits. + ErrIntOverflow = errors.New("proto: integer overflow") + // ErrUnexpectedEndOfGroup is returned when decoding a group end without a corresponding group start. + ErrUnexpectedEndOfGroup = errors.New("proto: unexpected end of group") +) + +// Message is the base vtprotobuf message marshal/unmarshal interface. +type Message interface { + // SizeVT returns the size of the message when marshaled. + SizeVT() int + // MarshalToSizedBufferVT marshals to a buffer that already is SizeVT bytes long. + MarshalToSizedBufferVT(dAtA []byte) (int, error) + // MarshalVT marshals the message with vtprotobuf. + MarshalVT() ([]byte, error) + // UnmarshalVT unmarshals the message object with vtprotobuf. + UnmarshalVT(data []byte) error + // Reset resets the message. + Reset() +} + +// JSONMessage is a message with MarshalJSON and UnmarshalJSON. +type JSONMessage interface { + // MarshalJSON marshals the message to JSON. + MarshalJSON() ([]byte, error) + // UnmarshalJSON unmarshals the message from JSON. + UnmarshalJSON(data []byte) error +} + +// CloneMessage is a message with a CloneMessage function. +type CloneMessage interface { + // Message extends the base message type. + Message + // CloneMessageVT clones the object. + CloneMessageVT() CloneMessage +} + +// CloneVT is a message with a CloneVT function (VTProtobuf). +type CloneVT[T comparable] interface { + comparable + // CloneMessage is the non-generic clone interface. + CloneMessage + // CloneVT clones the object. + CloneVT() T +} + +// CloneVTSlice clones a slice of CloneVT messages. +func CloneVTSlice[S ~[]E, E CloneVT[E]](s S) S { + out := make([]E, len(s)) + var empty E + for i := range s { + if s[i] != empty { + out[i] = s[i].CloneVT() + } + } + return out +} + +// EqualVT is a message with a EqualVT function (VTProtobuf). +type EqualVT[T comparable] interface { + comparable + // EqualVT compares against the other message for equality. + EqualVT(other T) bool +} + +// CompareComparable returns a compare function to compare two comparable types. +func CompareComparable[T comparable]() func(t1, t2 T) bool { + return func(t1, t2 T) bool { + return t1 == t2 + } +} + +// CompareEqualVT returns a compare function to compare two VTProtobuf messages. +func CompareEqualVT[T EqualVT[T]]() func(t1, t2 T) bool { + return func(t1, t2 T) bool { + return IsEqualVT(t1, t2) + } +} + +// IsEqualVT checks if two EqualVT objects are equal. +func IsEqualVT[T EqualVT[T]](t1, t2 T) bool { + var empty T + t1Empty, t2Empty := t1 == empty, t2 == empty + if t1Empty != t2Empty { + return false + } + if t1Empty { + return true + } + return t1.EqualVT(t2) +} + +// IsEqualVTSlice checks if two slices of EqualVT messages are equal. +func IsEqualVTSlice[S ~[]E, E EqualVT[E]](s1, s2 S) bool { + return slices.EqualFunc(s1, s2, CompareEqualVT[E]()) +} + +// EncodeVarint encodes a uint64 into a varint-encoded byte slice and returns the offset of the encoded value. +// The provided offset is the offset after the last byte of the encoded value. +func EncodeVarint(dAtA []byte, offset int, v uint64) int { + offset -= SizeOfVarint(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) //nolint:gosec + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +// AppendVarint appends v to b as a varint-encoded uint64. +func AppendVarint(b []byte, v uint64) []byte { + switch { + case v < 1<<7: + b = append(b, byte(v)) + case v < 1<<14: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte(v>>7)) + case v < 1<<21: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte(v>>14)) + case v < 1<<28: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte(v>>21)) + case v < 1<<35: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte(v>>28)) + case v < 1<<42: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte(v>>35)) + case v < 1<<49: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte(v>>42)) + case v < 1<<56: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte(v>>49)) + case v < 1<<63: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte(v>>56)) + default: + b = append(b, + byte((v>>0)&0x7f|0x80), + byte((v>>7)&0x7f|0x80), + byte((v>>14)&0x7f|0x80), + byte((v>>21)&0x7f|0x80), + byte((v>>28)&0x7f|0x80), + byte((v>>35)&0x7f|0x80), + byte((v>>42)&0x7f|0x80), + byte((v>>49)&0x7f|0x80), + byte((v>>56)&0x7f|0x80), + 1) + } + return b +} + +// ConsumeVarint parses b as a varint-encoded uint64, reporting its length. +// This returns -1 upon any error, -1 for parse error and -2 for overflow. +func ConsumeVarint(b []byte) (v uint64, n int) { + var y uint64 + if len(b) <= 0 { + return 0, -1 + } + v = uint64(b[0]) + if v < 0x80 { + return v, 1 + } + v -= 0x80 + + if len(b) <= 1 { + return 0, -1 + } + y = uint64(b[1]) + v += y << 7 + if y < 0x80 { + return v, 2 + } + v -= 0x80 << 7 + + if len(b) <= 2 { + return 0, -1 + } + y = uint64(b[2]) + v += y << 14 + if y < 0x80 { + return v, 3 + } + v -= 0x80 << 14 + + if len(b) <= 3 { + return 0, -1 + } + y = uint64(b[3]) + v += y << 21 + if y < 0x80 { + return v, 4 + } + v -= 0x80 << 21 + + if len(b) <= 4 { + return 0, -1 + } + y = uint64(b[4]) + v += y << 28 + if y < 0x80 { + return v, 5 + } + v -= 0x80 << 28 + + if len(b) <= 5 { + return 0, -1 + } + y = uint64(b[5]) + v += y << 35 + if y < 0x80 { + return v, 6 + } + v -= 0x80 << 35 + + if len(b) <= 6 { + return 0, -1 + } + y = uint64(b[6]) + v += y << 42 + if y < 0x80 { + return v, 7 + } + v -= 0x80 << 42 + + if len(b) <= 7 { + return 0, -1 + } + y = uint64(b[7]) + v += y << 49 + if y < 0x80 { + return v, 8 + } + v -= 0x80 << 49 + + if len(b) <= 8 { + return 0, -1 + } + y = uint64(b[8]) + v += y << 56 + if y < 0x80 { + return v, 9 + } + v -= 0x80 << 56 + + if len(b) <= 9 { + return 0, -1 + } + y = uint64(b[9]) + v += y << 63 + if y < 2 { + return v, 10 + } + return 0, -2 +} + +// SizeOfVarint returns the size of the varint-encoded value. +func SizeOfVarint(x uint64) (n int) { + return (bits.Len64(x|1) + 6) / 7 +} + +// DecodeVarint decodes a varint at the given index, returning value, new index, and error. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeVarint(b []byte, idx int) (uint64, int, error) { + v, n := ConsumeVarint(b[idx:]) + if n < 0 { + if n == -1 { + return 0, 0, io.ErrUnexpectedEOF + } + return 0, 0, ErrIntOverflow + } + return v, idx + n, nil +} + +// DecodeVarintInt32 decodes a varint as int32. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeVarintInt32(b []byte, idx int) (int32, int, error) { + v, n := ConsumeVarint(b[idx:]) + if n < 0 { + if n == -1 { + return 0, 0, io.ErrUnexpectedEOF + } + return 0, 0, ErrIntOverflow + } + return int32(v), idx + n, nil //nolint:gosec +} + +// DecodeVarintInt64 decodes a varint as int64. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeVarintInt64(b []byte, idx int) (int64, int, error) { + v, n := ConsumeVarint(b[idx:]) + if n < 0 { + if n == -1 { + return 0, 0, io.ErrUnexpectedEOF + } + return 0, 0, ErrIntOverflow + } + return int64(v), idx + n, nil //nolint:gosec +} + +// DecodeVarintUint32 decodes a varint as uint32. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeVarintUint32(b []byte, idx int) (uint32, int, error) { + v, n := ConsumeVarint(b[idx:]) + if n < 0 { + if n == -1 { + return 0, 0, io.ErrUnexpectedEOF + } + return 0, 0, ErrIntOverflow + } + return uint32(v), idx + n, nil //nolint:gosec +} + +// DecodeVarintBool decodes a varint as bool. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeVarintBool(b []byte, idx int) (bool, int, error) { + v, n := ConsumeVarint(b[idx:]) + if n < 0 { + if n == -1 { + return false, 0, io.ErrUnexpectedEOF + } + return false, 0, ErrIntOverflow + } + return v != 0, idx + n, nil +} + +// DecodeSint32 decodes a zigzag-encoded sint32. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeSint32(b []byte, idx int) (int32, int, error) { + v, n := ConsumeVarint(b[idx:]) + if n < 0 { + if n == -1 { + return 0, 0, io.ErrUnexpectedEOF + } + return 0, 0, ErrIntOverflow + } + return int32((uint32(v) >> 1) ^ uint32((int32(v&1)<<31)>>31)), idx + n, nil //nolint:gosec +} + +// DecodeSint64 decodes a zigzag-encoded sint64. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeSint64(b []byte, idx int) (int64, int, error) { + v, n := ConsumeVarint(b[idx:]) + if n < 0 { + if n == -1 { + return 0, 0, io.ErrUnexpectedEOF + } + return 0, 0, ErrIntOverflow + } + return int64((v >> 1) ^ uint64((int64(v&1)<<63)>>63)), idx + n, nil //nolint:gosec +} + +// DecodeFixed32 decodes a fixed 32-bit value. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeFixed32(b []byte, idx int) (uint32, int, error) { + if idx+4 > len(b) { + return 0, 0, io.ErrUnexpectedEOF + } + v := uint32(b[idx]) | uint32(b[idx+1])<<8 | uint32(b[idx+2])<<16 | uint32(b[idx+3])<<24 + return v, idx + 4, nil +} + +// DecodeFixed64 decodes a fixed 64-bit value. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeFixed64(b []byte, idx int) (uint64, int, error) { + if idx+8 > len(b) { + return 0, 0, io.ErrUnexpectedEOF + } + v := uint64(b[idx]) | uint64(b[idx+1])<<8 | uint64(b[idx+2])<<16 | uint64(b[idx+3])<<24 | + uint64(b[idx+4])<<32 | uint64(b[idx+5])<<40 | uint64(b[idx+6])<<48 | uint64(b[idx+7])<<56 + return v, idx + 8, nil +} + +// DecodeFloat32 decodes a 32-bit float. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeFloat32(b []byte, idx int) (float32, int, error) { + v, idx, err := DecodeFixed32(b, idx) + if err != nil { + return 0, 0, err + } + return math.Float32frombits(v), idx, nil +} + +// DecodeFloat64 decodes a 64-bit float. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeFloat64(b []byte, idx int) (float64, int, error) { + v, idx, err := DecodeFixed64(b, idx) + if err != nil { + return 0, 0, err + } + return math.Float64frombits(v), idx, nil +} + +// DecodeBytes decodes a length-prefixed byte slice. If copy is false, returns a sub-slice. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeBytes(b []byte, idx int, cp bool) ([]byte, int, error) { + length, idx, err := DecodeVarint(b, idx) + if err != nil { + return nil, 0, err + } + l := int(length) //nolint:gosec + if l < 0 { + return nil, 0, ErrInvalidLength + } + end := idx + l + if end < idx || end > len(b) { + return nil, 0, io.ErrUnexpectedEOF + } + if cp { + out := make([]byte, l) + copy(out, b[idx:end]) + return out, end, nil + } + return b[idx:end], end, nil +} + +// DecodeString decodes a length-prefixed string (with copy). +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeString(b []byte, idx int) (string, int, error) { + length, idx, err := DecodeVarint(b, idx) + if err != nil { + return "", 0, err + } + l := int(length) //nolint:gosec + if l < 0 { + return "", 0, ErrInvalidLength + } + end := idx + l + if end < idx || end > len(b) { + return "", 0, io.ErrUnexpectedEOF + } + return string(b[idx:end]), end, nil +} + +// DecodeStringUnsafe decodes a length-prefixed string without copying. +// The returned string shares memory with the input slice. +// Assumes idx is within bounds (0 <= idx <= len(b)); generated code maintains this invariant. +func DecodeStringUnsafe(b []byte, idx int) (string, int, error) { + length, idx, err := DecodeVarint(b, idx) + if err != nil { + return "", 0, err + } + l := int(length) //nolint:gosec + if l < 0 { + return "", 0, ErrInvalidLength + } + end := idx + l + if end < idx || end > len(b) { + return "", 0, io.ErrUnexpectedEOF + } + if l == 0 { + return "", end, nil + } + return unsafe.String(&b[idx], l), end, nil +} + +// SizeOfZigzag returns the size of the zigzag-encoded value. +func SizeOfZigzag(x uint64) (n int) { + return SizeOfVarint(uint64((x << 1) ^ uint64((int64(x) >> 63)))) //nolint +} + +// Skip the first record of the byte slice and return the offset of the next record. +func Skip(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) //nolint:gosec + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflow + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLength + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroup + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLength + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} diff --git a/vendor/github.com/checkpoint-restore/go-criu/v8/stats/stats.pb.go b/vendor/github.com/checkpoint-restore/go-criu/v8/stats/stats.pb.go index ffec3809b9..a8fdec3f46 100644 --- a/vendor/github.com/checkpoint-restore/go-criu/v8/stats/stats.pb.go +++ b/vendor/github.com/checkpoint-restore/go-criu/v8/stats/stats.pb.go @@ -1,81 +1,45 @@ -// SPDX-License-Identifier: MIT - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.30.0 -// protoc v4.23.4 -// source: stats/stats.proto +// Code generated by protoc-gen-go-lite. DO NOT EDIT. +// protoc-gen-go-lite version: v0.14.0 +// source: stats.proto package stats import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + fmt "fmt" + protobuf_go_lite "github.com/aperturerobotics/protobuf-go-lite" + io "io" + slices "slices" + strconv "strconv" + strings "strings" ) -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) +// SPDX-License-Identifier: MIT // This one contains statistics about dump/restore process type DumpStatsEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FreezingTime *uint32 `protobuf:"varint,1,req,name=freezing_time,json=freezingTime" json:"freezing_time,omitempty"` - FrozenTime *uint32 `protobuf:"varint,2,req,name=frozen_time,json=frozenTime" json:"frozen_time,omitempty"` - MemdumpTime *uint32 `protobuf:"varint,3,req,name=memdump_time,json=memdumpTime" json:"memdump_time,omitempty"` - MemwriteTime *uint32 `protobuf:"varint,4,req,name=memwrite_time,json=memwriteTime" json:"memwrite_time,omitempty"` - PagesScanned *uint64 `protobuf:"varint,5,req,name=pages_scanned,json=pagesScanned" json:"pages_scanned,omitempty"` - PagesSkippedParent *uint64 `protobuf:"varint,6,req,name=pages_skipped_parent,json=pagesSkippedParent" json:"pages_skipped_parent,omitempty"` - PagesWritten *uint64 `protobuf:"varint,7,req,name=pages_written,json=pagesWritten" json:"pages_written,omitempty"` - IrmapResolve *uint32 `protobuf:"varint,8,opt,name=irmap_resolve,json=irmapResolve" json:"irmap_resolve,omitempty"` - PagesLazy *uint64 `protobuf:"varint,9,req,name=pages_lazy,json=pagesLazy" json:"pages_lazy,omitempty"` - PagePipes *uint64 `protobuf:"varint,10,opt,name=page_pipes,json=pagePipes" json:"page_pipes,omitempty"` - PagePipeBufs *uint64 `protobuf:"varint,11,opt,name=page_pipe_bufs,json=pagePipeBufs" json:"page_pipe_bufs,omitempty"` - ShpagesScanned *uint64 `protobuf:"varint,12,opt,name=shpages_scanned,json=shpagesScanned" json:"shpages_scanned,omitempty"` - ShpagesSkippedParent *uint64 `protobuf:"varint,13,opt,name=shpages_skipped_parent,json=shpagesSkippedParent" json:"shpages_skipped_parent,omitempty"` - ShpagesWritten *uint64 `protobuf:"varint,14,opt,name=shpages_written,json=shpagesWritten" json:"shpages_written,omitempty"` + unknownFields []byte + FreezingTime *uint32 `protobuf:"varint,1,req,name=freezing_time,json=freezingTime" json:"freezingTime,omitempty"` + FrozenTime *uint32 `protobuf:"varint,2,req,name=frozen_time,json=frozenTime" json:"frozenTime,omitempty"` + MemdumpTime *uint32 `protobuf:"varint,3,req,name=memdump_time,json=memdumpTime" json:"memdumpTime,omitempty"` + MemwriteTime *uint32 `protobuf:"varint,4,req,name=memwrite_time,json=memwriteTime" json:"memwriteTime,omitempty"` + PagesScanned *uint64 `protobuf:"varint,5,req,name=pages_scanned,json=pagesScanned" json:"pagesScanned,omitempty"` + PagesSkippedParent *uint64 `protobuf:"varint,6,req,name=pages_skipped_parent,json=pagesSkippedParent" json:"pagesSkippedParent,omitempty"` + PagesWritten *uint64 `protobuf:"varint,7,req,name=pages_written,json=pagesWritten" json:"pagesWritten,omitempty"` + IrmapResolve *uint32 `protobuf:"varint,8,opt,name=irmap_resolve,json=irmapResolve" json:"irmapResolve,omitempty"` + PagesLazy *uint64 `protobuf:"varint,9,req,name=pages_lazy,json=pagesLazy" json:"pagesLazy,omitempty"` + PagePipes *uint64 `protobuf:"varint,10,opt,name=page_pipes,json=pagePipes" json:"pagePipes,omitempty"` + PagePipeBufs *uint64 `protobuf:"varint,11,opt,name=page_pipe_bufs,json=pagePipeBufs" json:"pagePipeBufs,omitempty"` + ShpagesScanned *uint64 `protobuf:"varint,12,opt,name=shpages_scanned,json=shpagesScanned" json:"shpagesScanned,omitempty"` + ShpagesSkippedParent *uint64 `protobuf:"varint,13,opt,name=shpages_skipped_parent,json=shpagesSkippedParent" json:"shpagesSkippedParent,omitempty"` + ShpagesWritten *uint64 `protobuf:"varint,14,opt,name=shpages_written,json=shpagesWritten" json:"shpagesWritten,omitempty"` } func (x *DumpStatsEntry) Reset() { *x = DumpStatsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_stats_stats_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DumpStatsEntry) String() string { - return protoimpl.X.MessageStringOf(x) } func (*DumpStatsEntry) ProtoMessage() {} -func (x *DumpStatsEntry) ProtoReflect() protoreflect.Message { - mi := &file_stats_stats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DumpStatsEntry.ProtoReflect.Descriptor instead. -func (*DumpStatsEntry) Descriptor() ([]byte, []int) { - return file_stats_stats_proto_rawDescGZIP(), []int{0} -} - func (x *DumpStatsEntry) GetFreezingTime() uint32 { if x != nil && x.FreezingTime != nil { return *x.FreezingTime @@ -175,49 +139,20 @@ func (x *DumpStatsEntry) GetShpagesWritten() uint64 { } type RestoreStatsEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PagesCompared *uint64 `protobuf:"varint,1,req,name=pages_compared,json=pagesCompared" json:"pages_compared,omitempty"` - PagesSkippedCow *uint64 `protobuf:"varint,2,req,name=pages_skipped_cow,json=pagesSkippedCow" json:"pages_skipped_cow,omitempty"` - ForkingTime *uint32 `protobuf:"varint,3,req,name=forking_time,json=forkingTime" json:"forking_time,omitempty"` - RestoreTime *uint32 `protobuf:"varint,4,req,name=restore_time,json=restoreTime" json:"restore_time,omitempty"` - PagesRestored *uint64 `protobuf:"varint,5,opt,name=pages_restored,json=pagesRestored" json:"pages_restored,omitempty"` + unknownFields []byte + PagesCompared *uint64 `protobuf:"varint,1,req,name=pages_compared,json=pagesCompared" json:"pagesCompared,omitempty"` + PagesSkippedCow *uint64 `protobuf:"varint,2,req,name=pages_skipped_cow,json=pagesSkippedCow" json:"pagesSkippedCow,omitempty"` + ForkingTime *uint32 `protobuf:"varint,3,req,name=forking_time,json=forkingTime" json:"forkingTime,omitempty"` + RestoreTime *uint32 `protobuf:"varint,4,req,name=restore_time,json=restoreTime" json:"restoreTime,omitempty"` + PagesRestored *uint64 `protobuf:"varint,5,opt,name=pages_restored,json=pagesRestored" json:"pagesRestored,omitempty"` } func (x *RestoreStatsEntry) Reset() { *x = RestoreStatsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_stats_stats_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RestoreStatsEntry) String() string { - return protoimpl.X.MessageStringOf(x) } func (*RestoreStatsEntry) ProtoMessage() {} -func (x *RestoreStatsEntry) ProtoReflect() protoreflect.Message { - mi := &file_stats_stats_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RestoreStatsEntry.ProtoReflect.Descriptor instead. -func (*RestoreStatsEntry) Descriptor() ([]byte, []int) { - return file_stats_stats_proto_rawDescGZIP(), []int{1} -} - func (x *RestoreStatsEntry) GetPagesCompared() uint64 { if x != nil && x.PagesCompared != nil { return *x.PagesCompared @@ -254,209 +189,1857 @@ func (x *RestoreStatsEntry) GetPagesRestored() uint64 { } type StatsEntry struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Dump *DumpStatsEntry `protobuf:"bytes,1,opt,name=dump" json:"dump,omitempty"` - Restore *RestoreStatsEntry `protobuf:"bytes,2,opt,name=restore" json:"restore,omitempty"` + unknownFields []byte + Dump *DumpStatsEntry `protobuf:"bytes,1,opt,name=dump" json:"dump,omitempty"` + Restore *RestoreStatsEntry `protobuf:"bytes,2,opt,name=restore" json:"restore,omitempty"` } func (x *StatsEntry) Reset() { *x = StatsEntry{} - if protoimpl.UnsafeEnabled { - mi := &file_stats_stats_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) +} + +func (*StatsEntry) ProtoMessage() {} + +func (x *StatsEntry) GetDump() *DumpStatsEntry { + if x != nil { + return x.Dump } + return nil } -func (x *StatsEntry) String() string { - return protoimpl.X.MessageStringOf(x) +func (x *StatsEntry) GetRestore() *RestoreStatsEntry { + if x != nil { + return x.Restore + } + return nil } -func (*StatsEntry) ProtoMessage() {} +func (m *DumpStatsEntry) CloneVT() *DumpStatsEntry { + if m == nil { + return (*DumpStatsEntry)(nil) + } + r := new(DumpStatsEntry) + if rhs := m.FreezingTime; rhs != nil { + tmpVal := *rhs + r.FreezingTime = &tmpVal + } + if rhs := m.FrozenTime; rhs != nil { + tmpVal := *rhs + r.FrozenTime = &tmpVal + } + if rhs := m.MemdumpTime; rhs != nil { + tmpVal := *rhs + r.MemdumpTime = &tmpVal + } + if rhs := m.MemwriteTime; rhs != nil { + tmpVal := *rhs + r.MemwriteTime = &tmpVal + } + if rhs := m.PagesScanned; rhs != nil { + tmpVal := *rhs + r.PagesScanned = &tmpVal + } + if rhs := m.PagesSkippedParent; rhs != nil { + tmpVal := *rhs + r.PagesSkippedParent = &tmpVal + } + if rhs := m.PagesWritten; rhs != nil { + tmpVal := *rhs + r.PagesWritten = &tmpVal + } + if rhs := m.IrmapResolve; rhs != nil { + tmpVal := *rhs + r.IrmapResolve = &tmpVal + } + if rhs := m.PagesLazy; rhs != nil { + tmpVal := *rhs + r.PagesLazy = &tmpVal + } + if rhs := m.PagePipes; rhs != nil { + tmpVal := *rhs + r.PagePipes = &tmpVal + } + if rhs := m.PagePipeBufs; rhs != nil { + tmpVal := *rhs + r.PagePipeBufs = &tmpVal + } + if rhs := m.ShpagesScanned; rhs != nil { + tmpVal := *rhs + r.ShpagesScanned = &tmpVal + } + if rhs := m.ShpagesSkippedParent; rhs != nil { + tmpVal := *rhs + r.ShpagesSkippedParent = &tmpVal + } + if rhs := m.ShpagesWritten; rhs != nil { + tmpVal := *rhs + r.ShpagesWritten = &tmpVal + } + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *DumpStatsEntry) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + +func (m *RestoreStatsEntry) CloneVT() *RestoreStatsEntry { + if m == nil { + return (*RestoreStatsEntry)(nil) + } + r := new(RestoreStatsEntry) + if rhs := m.PagesCompared; rhs != nil { + tmpVal := *rhs + r.PagesCompared = &tmpVal + } + if rhs := m.PagesSkippedCow; rhs != nil { + tmpVal := *rhs + r.PagesSkippedCow = &tmpVal + } + if rhs := m.ForkingTime; rhs != nil { + tmpVal := *rhs + r.ForkingTime = &tmpVal + } + if rhs := m.RestoreTime; rhs != nil { + tmpVal := *rhs + r.RestoreTime = &tmpVal + } + if rhs := m.PagesRestored; rhs != nil { + tmpVal := *rhs + r.PagesRestored = &tmpVal + } + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *RestoreStatsEntry) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + +func (m *StatsEntry) CloneVT() *StatsEntry { + if m == nil { + return (*StatsEntry)(nil) + } + r := new(StatsEntry) + r.Dump = m.Dump.CloneVT() + r.Restore = m.Restore.CloneVT() + if len(m.unknownFields) > 0 { + r.unknownFields = slices.Clone(m.unknownFields) + } + return r +} + +func (m *StatsEntry) CloneMessageVT() protobuf_go_lite.CloneMessage { + return m.CloneVT() +} + +func (this *DumpStatsEntry) EqualVT(that *DumpStatsEntry) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if p, q := this.FreezingTime, that.FreezingTime; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.FrozenTime, that.FrozenTime; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.MemdumpTime, that.MemdumpTime; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.MemwriteTime, that.MemwriteTime; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.PagesScanned, that.PagesScanned; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.PagesSkippedParent, that.PagesSkippedParent; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.PagesWritten, that.PagesWritten; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.IrmapResolve, that.IrmapResolve; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.PagesLazy, that.PagesLazy; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.PagePipes, that.PagePipes; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.PagePipeBufs, that.PagePipeBufs; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.ShpagesScanned, that.ShpagesScanned; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.ShpagesSkippedParent, that.ShpagesSkippedParent; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.ShpagesWritten, that.ShpagesWritten; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *DumpStatsEntry) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*DumpStatsEntry) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *RestoreStatsEntry) EqualVT(that *RestoreStatsEntry) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if p, q := this.PagesCompared, that.PagesCompared; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.PagesSkippedCow, that.PagesSkippedCow; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.ForkingTime, that.ForkingTime; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.RestoreTime, that.RestoreTime; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + if p, q := this.PagesRestored, that.PagesRestored; (p == nil && q != nil) || (p != nil && (q == nil || *p != *q)) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *RestoreStatsEntry) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*RestoreStatsEntry) + if !ok { + return false + } + return this.EqualVT(that) +} +func (this *StatsEntry) EqualVT(that *StatsEntry) bool { + if this == that { + return true + } else if this == nil || that == nil { + return false + } + if !this.Dump.EqualVT(that.Dump) { + return false + } + if !this.Restore.EqualVT(that.Restore) { + return false + } + return string(this.unknownFields) == string(that.unknownFields) +} + +func (this *StatsEntry) EqualMessageVT(thatMsg any) bool { + that, ok := thatMsg.(*StatsEntry) + if !ok { + return false + } + return this.EqualVT(that) +} + +// NOTE: protobuf-go-lite json only supports proto3 and editions: proto2 is not supported. + +func (m *DumpStatsEntry) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DumpStatsEntry) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *DumpStatsEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ShpagesWritten != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.ShpagesWritten)) + i-- + dAtA[i] = 0x70 + } + if m.ShpagesSkippedParent != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.ShpagesSkippedParent)) + i-- + dAtA[i] = 0x68 + } + if m.ShpagesScanned != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.ShpagesScanned)) + i-- + dAtA[i] = 0x60 + } + if m.PagePipeBufs != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagePipeBufs)) + i-- + dAtA[i] = 0x58 + } + if m.PagePipes != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagePipes)) + i-- + dAtA[i] = 0x50 + } + if m.PagesLazy == nil { + return 0, fmt.Errorf("proto: required field pages_lazy not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesLazy)) + i-- + dAtA[i] = 0x48 + } + if m.IrmapResolve != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.IrmapResolve)) + i-- + dAtA[i] = 0x40 + } + if m.PagesWritten == nil { + return 0, fmt.Errorf("proto: required field pages_written not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesWritten)) + i-- + dAtA[i] = 0x38 + } + if m.PagesSkippedParent == nil { + return 0, fmt.Errorf("proto: required field pages_skipped_parent not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesSkippedParent)) + i-- + dAtA[i] = 0x30 + } + if m.PagesScanned == nil { + return 0, fmt.Errorf("proto: required field pages_scanned not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesScanned)) + i-- + dAtA[i] = 0x28 + } + if m.MemwriteTime == nil { + return 0, fmt.Errorf("proto: required field memwrite_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.MemwriteTime)) + i-- + dAtA[i] = 0x20 + } + if m.MemdumpTime == nil { + return 0, fmt.Errorf("proto: required field memdump_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.MemdumpTime)) + i-- + dAtA[i] = 0x18 + } + if m.FrozenTime == nil { + return 0, fmt.Errorf("proto: required field frozen_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.FrozenTime)) + i-- + dAtA[i] = 0x10 + } + if m.FreezingTime == nil { + return 0, fmt.Errorf("proto: required field freezing_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.FreezingTime)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RestoreStatsEntry) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RestoreStatsEntry) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} + +func (m *RestoreStatsEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.PagesRestored != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesRestored)) + i-- + dAtA[i] = 0x28 + } + if m.RestoreTime == nil { + return 0, fmt.Errorf("proto: required field restore_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.RestoreTime)) + i-- + dAtA[i] = 0x20 + } + if m.ForkingTime == nil { + return 0, fmt.Errorf("proto: required field forking_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.ForkingTime)) + i-- + dAtA[i] = 0x18 + } + if m.PagesSkippedCow == nil { + return 0, fmt.Errorf("proto: required field pages_skipped_cow not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesSkippedCow)) + i-- + dAtA[i] = 0x10 + } + if m.PagesCompared == nil { + return 0, fmt.Errorf("proto: required field pages_compared not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesCompared)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StatsEntry) MarshalVT() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVT(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatsEntry) MarshalToVT(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVT(dAtA[:size]) +} -func (x *StatsEntry) ProtoReflect() protoreflect.Message { - mi := &file_stats_stats_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) +func (m *StatsEntry) MarshalToSizedBufferVT(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Restore != nil { + size, err := m.Restore.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Dump != nil { + size, err := m.Dump.MarshalToSizedBufferVT(dAtA[:i]) + if err != nil { + return 0, err } - return ms + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa } - return mi.MessageOf(x) + return len(dAtA) - i, nil } -// Deprecated: Use StatsEntry.ProtoReflect.Descriptor instead. -func (*StatsEntry) Descriptor() ([]byte, []int) { - return file_stats_stats_proto_rawDescGZIP(), []int{2} +func (m *DumpStatsEntry) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil } -func (x *StatsEntry) GetDump() *DumpStatsEntry { - if x != nil { - return x.Dump +func (m *DumpStatsEntry) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *DumpStatsEntry) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.ShpagesWritten != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.ShpagesWritten)) + i-- + dAtA[i] = 0x70 + } + if m.ShpagesSkippedParent != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.ShpagesSkippedParent)) + i-- + dAtA[i] = 0x68 + } + if m.ShpagesScanned != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.ShpagesScanned)) + i-- + dAtA[i] = 0x60 + } + if m.PagePipeBufs != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagePipeBufs)) + i-- + dAtA[i] = 0x58 + } + if m.PagePipes != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagePipes)) + i-- + dAtA[i] = 0x50 + } + if m.PagesLazy == nil { + return 0, fmt.Errorf("proto: required field pages_lazy not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesLazy)) + i-- + dAtA[i] = 0x48 + } + if m.IrmapResolve != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.IrmapResolve)) + i-- + dAtA[i] = 0x40 + } + if m.PagesWritten == nil { + return 0, fmt.Errorf("proto: required field pages_written not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesWritten)) + i-- + dAtA[i] = 0x38 + } + if m.PagesSkippedParent == nil { + return 0, fmt.Errorf("proto: required field pages_skipped_parent not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesSkippedParent)) + i-- + dAtA[i] = 0x30 + } + if m.PagesScanned == nil { + return 0, fmt.Errorf("proto: required field pages_scanned not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesScanned)) + i-- + dAtA[i] = 0x28 + } + if m.MemwriteTime == nil { + return 0, fmt.Errorf("proto: required field memwrite_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.MemwriteTime)) + i-- + dAtA[i] = 0x20 + } + if m.MemdumpTime == nil { + return 0, fmt.Errorf("proto: required field memdump_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.MemdumpTime)) + i-- + dAtA[i] = 0x18 + } + if m.FrozenTime == nil { + return 0, fmt.Errorf("proto: required field frozen_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.FrozenTime)) + i-- + dAtA[i] = 0x10 + } + if m.FreezingTime == nil { + return 0, fmt.Errorf("proto: required field freezing_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.FreezingTime)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *RestoreStatsEntry) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RestoreStatsEntry) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *RestoreStatsEntry) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.PagesRestored != nil { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesRestored)) + i-- + dAtA[i] = 0x28 + } + if m.RestoreTime == nil { + return 0, fmt.Errorf("proto: required field restore_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.RestoreTime)) + i-- + dAtA[i] = 0x20 + } + if m.ForkingTime == nil { + return 0, fmt.Errorf("proto: required field forking_time not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.ForkingTime)) + i-- + dAtA[i] = 0x18 + } + if m.PagesSkippedCow == nil { + return 0, fmt.Errorf("proto: required field pages_skipped_cow not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesSkippedCow)) + i-- + dAtA[i] = 0x10 + } + if m.PagesCompared == nil { + return 0, fmt.Errorf("proto: required field pages_compared not set") + } else { + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(*m.PagesCompared)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *StatsEntry) MarshalVTStrict() (dAtA []byte, err error) { + if m == nil { + return nil, nil + } + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StatsEntry) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) +} + +func (m *StatsEntry) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { + if m == nil { + return 0, nil + } + i := len(dAtA) + _ = i + var l int + _ = l + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) + } + if m.Restore != nil { + size, err := m.Restore.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x12 + } + if m.Dump != nil { + size, err := m.Dump.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protobuf_go_lite.EncodeVarint(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *DumpStatsEntry) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.FreezingTime != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.FreezingTime)) + } + if m.FrozenTime != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.FrozenTime)) + } + if m.MemdumpTime != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.MemdumpTime)) + } + if m.MemwriteTime != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.MemwriteTime)) + } + if m.PagesScanned != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagesScanned)) + } + if m.PagesSkippedParent != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagesSkippedParent)) + } + if m.PagesWritten != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagesWritten)) + } + if m.IrmapResolve != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.IrmapResolve)) + } + if m.PagesLazy != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagesLazy)) + } + if m.PagePipes != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagePipes)) + } + if m.PagePipeBufs != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagePipeBufs)) + } + if m.ShpagesScanned != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.ShpagesScanned)) + } + if m.ShpagesSkippedParent != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.ShpagesSkippedParent)) + } + if m.ShpagesWritten != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.ShpagesWritten)) + } + n += len(m.unknownFields) + return n +} + +func (m *RestoreStatsEntry) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PagesCompared != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagesCompared)) + } + if m.PagesSkippedCow != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagesSkippedCow)) + } + if m.ForkingTime != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.ForkingTime)) + } + if m.RestoreTime != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.RestoreTime)) + } + if m.PagesRestored != nil { + n += 1 + protobuf_go_lite.SizeOfVarint(uint64(*m.PagesRestored)) + } + n += len(m.unknownFields) + return n +} + +func (m *StatsEntry) SizeVT() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Dump != nil { + l = m.Dump.SizeVT() + n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l)) + } + if m.Restore != nil { + l = m.Restore.SizeVT() + n += 1 + l + protobuf_go_lite.SizeOfVarint(uint64(l)) + } + n += len(m.unknownFields) + return n +} + +func (x *DumpStatsEntry) MarshalProtoText() string { + var sb strings.Builder + sb.WriteString("dump_stats_entry {") + if x.FreezingTime != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("freezing_time: ") + sb.WriteString(strconv.FormatUint(uint64(*x.FreezingTime), 10)) + } + if x.FrozenTime != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("frozen_time: ") + sb.WriteString(strconv.FormatUint(uint64(*x.FrozenTime), 10)) + } + if x.MemdumpTime != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("memdump_time: ") + sb.WriteString(strconv.FormatUint(uint64(*x.MemdumpTime), 10)) + } + if x.MemwriteTime != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("memwrite_time: ") + sb.WriteString(strconv.FormatUint(uint64(*x.MemwriteTime), 10)) + } + if x.PagesScanned != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("pages_scanned: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagesScanned), 10)) + } + if x.PagesSkippedParent != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("pages_skipped_parent: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagesSkippedParent), 10)) + } + if x.PagesWritten != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("pages_written: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagesWritten), 10)) + } + if x.IrmapResolve != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("irmap_resolve: ") + sb.WriteString(strconv.FormatUint(uint64(*x.IrmapResolve), 10)) + } + if x.PagesLazy != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("pages_lazy: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagesLazy), 10)) + } + if x.PagePipes != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("page_pipes: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagePipes), 10)) + } + if x.PagePipeBufs != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("page_pipe_bufs: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagePipeBufs), 10)) + } + if x.ShpagesScanned != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("shpages_scanned: ") + sb.WriteString(strconv.FormatUint(uint64(*x.ShpagesScanned), 10)) + } + if x.ShpagesSkippedParent != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("shpages_skipped_parent: ") + sb.WriteString(strconv.FormatUint(uint64(*x.ShpagesSkippedParent), 10)) + } + if x.ShpagesWritten != nil { + if sb.Len() > 18 { + sb.WriteString(" ") + } + sb.WriteString("shpages_written: ") + sb.WriteString(strconv.FormatUint(uint64(*x.ShpagesWritten), 10)) + } + sb.WriteString("}") + return sb.String() +} + +func (x *DumpStatsEntry) String() string { + return x.MarshalProtoText() +} +func (x *RestoreStatsEntry) MarshalProtoText() string { + var sb strings.Builder + sb.WriteString("restore_stats_entry {") + if x.PagesCompared != nil { + if sb.Len() > 21 { + sb.WriteString(" ") + } + sb.WriteString("pages_compared: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagesCompared), 10)) + } + if x.PagesSkippedCow != nil { + if sb.Len() > 21 { + sb.WriteString(" ") + } + sb.WriteString("pages_skipped_cow: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagesSkippedCow), 10)) + } + if x.ForkingTime != nil { + if sb.Len() > 21 { + sb.WriteString(" ") + } + sb.WriteString("forking_time: ") + sb.WriteString(strconv.FormatUint(uint64(*x.ForkingTime), 10)) + } + if x.RestoreTime != nil { + if sb.Len() > 21 { + sb.WriteString(" ") + } + sb.WriteString("restore_time: ") + sb.WriteString(strconv.FormatUint(uint64(*x.RestoreTime), 10)) + } + if x.PagesRestored != nil { + if sb.Len() > 21 { + sb.WriteString(" ") + } + sb.WriteString("pages_restored: ") + sb.WriteString(strconv.FormatUint(uint64(*x.PagesRestored), 10)) + } + sb.WriteString("}") + return sb.String() +} + +func (x *RestoreStatsEntry) String() string { + return x.MarshalProtoText() +} +func (x *StatsEntry) MarshalProtoText() string { + var sb strings.Builder + sb.WriteString("stats_entry {") + if x.Dump != nil { + if sb.Len() > 13 { + sb.WriteString(" ") + } + sb.WriteString("dump: ") + sb.WriteString(x.Dump.MarshalProtoText()) + } + if x.Restore != nil { + if sb.Len() > 13 { + sb.WriteString(" ") + } + sb.WriteString("restore: ") + sb.WriteString(x.Restore.MarshalProtoText()) + } + sb.WriteString("}") + return sb.String() +} + +func (x *StatsEntry) String() string { + return x.MarshalProtoText() +} +func (m *DumpStatsEntry) UnmarshalVT(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DumpStatsEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DumpStatsEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FreezingTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.FreezingTime = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FrozenTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.FrozenTime = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemdumpTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.MemdumpTime = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemwriteTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.MemwriteTime = &v + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesScanned", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesScanned = &v + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesSkippedParent", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesSkippedParent = &v + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesWritten", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesWritten = &v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IrmapResolve", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.IrmapResolve = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesLazy", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesLazy = &v + hasFields[0] |= uint64(0x00000080) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagePipes", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagePipes = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagePipeBufs", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagePipeBufs = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShpagesScanned", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.ShpagesScanned = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShpagesSkippedParent", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.ShpagesSkippedParent = &v + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShpagesWritten", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.ShpagesWritten = &v + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field freezing_time not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field frozen_time not set") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return fmt.Errorf("proto: required field memdump_time not set") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return fmt.Errorf("proto: required field memwrite_time not set") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return fmt.Errorf("proto: required field pages_scanned not set") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return fmt.Errorf("proto: required field pages_skipped_parent not set") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return fmt.Errorf("proto: required field pages_written not set") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return fmt.Errorf("proto: required field pages_lazy not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } return nil } +func (m *RestoreStatsEntry) UnmarshalVT(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RestoreStatsEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RestoreStatsEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesCompared", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesCompared = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesSkippedCow", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesSkippedCow = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForkingTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.ForkingTime = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RestoreTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.RestoreTime = &v + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesRestored", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesRestored = &v + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field pages_compared not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field pages_skipped_cow not set") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return fmt.Errorf("proto: required field forking_time not set") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return fmt.Errorf("proto: required field restore_time not set") + } -func (x *StatsEntry) GetRestore() *RestoreStatsEntry { - if x != nil { - return x.Restore + if iNdEx > l { + return io.ErrUnexpectedEOF } return nil } +func (m *StatsEntry) UnmarshalVT(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatsEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatsEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dump", wireType) + } + var msglen int + var _v uint64 + _v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + msglen = int(_v) + if err != nil { + return err + } + if msglen < 0 { + return protobuf_go_lite.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dump == nil { + m.Dump = &DumpStatsEntry{} + } + if err := m.Dump.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Restore", wireType) + } + var msglen int + var _v uint64 + _v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + msglen = int(_v) + if err != nil { + return err + } + if msglen < 0 { + return protobuf_go_lite.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Restore == nil { + m.Restore = &RestoreStatsEntry{} + } + if err := m.Restore.UnmarshalVT(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } -var File_stats_stats_proto protoreflect.FileDescriptor - -var file_stats_stats_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xad, 0x04, 0x0a, 0x10, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x66, 0x72, 0x65, 0x65, - 0x7a, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x02, 0x28, 0x0d, 0x52, - 0x0c, 0x66, 0x72, 0x65, 0x65, 0x7a, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, - 0x0b, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x02, - 0x28, 0x0d, 0x52, 0x0a, 0x66, 0x72, 0x6f, 0x7a, 0x65, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x6d, 0x65, 0x6d, 0x64, 0x75, 0x6d, 0x70, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x6d, 0x65, 0x6d, 0x64, 0x75, 0x6d, 0x70, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x77, 0x72, 0x69, 0x74, 0x65, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x77, 0x72, 0x69, - 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, - 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x05, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x70, - 0x61, 0x67, 0x65, 0x73, 0x53, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, - 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, - 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x02, 0x28, 0x04, 0x52, 0x12, 0x70, 0x61, 0x67, 0x65, 0x73, - 0x53, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x23, 0x0a, - 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x07, - 0x20, 0x02, 0x28, 0x04, 0x52, 0x0c, 0x70, 0x61, 0x67, 0x65, 0x73, 0x57, 0x72, 0x69, 0x74, 0x74, - 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x72, 0x6d, 0x61, 0x70, 0x5f, 0x72, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x69, 0x72, 0x6d, 0x61, 0x70, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x73, - 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x18, 0x09, 0x20, 0x02, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x73, 0x4c, 0x61, 0x7a, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70, - 0x69, 0x70, 0x65, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, - 0x50, 0x69, 0x70, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x70, 0x69, - 0x70, 0x65, 0x5f, 0x62, 0x75, 0x66, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x70, - 0x61, 0x67, 0x65, 0x50, 0x69, 0x70, 0x65, 0x42, 0x75, 0x66, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, - 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x63, 0x61, 0x6e, 0x6e, 0x65, 0x64, 0x18, 0x0c, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x63, 0x61, - 0x6e, 0x6e, 0x65, 0x64, 0x12, 0x34, 0x0a, 0x16, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, - 0x73, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x53, 0x6b, 0x69, - 0x70, 0x70, 0x65, 0x64, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x68, - 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0e, 0x73, 0x68, 0x70, 0x61, 0x67, 0x65, 0x73, 0x57, 0x72, 0x69, 0x74, - 0x74, 0x65, 0x6e, 0x22, 0xd5, 0x01, 0x0a, 0x13, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x70, - 0x61, 0x67, 0x65, 0x73, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x02, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x61, 0x67, 0x65, 0x73, 0x43, 0x6f, 0x6d, 0x70, 0x61, 0x72, - 0x65, 0x64, 0x12, 0x2a, 0x0a, 0x11, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x73, 0x6b, 0x69, 0x70, - 0x70, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x02, 0x28, 0x04, 0x52, 0x0f, 0x70, - 0x61, 0x67, 0x65, 0x73, 0x53, 0x6b, 0x69, 0x70, 0x70, 0x65, 0x64, 0x43, 0x6f, 0x77, 0x12, 0x21, - 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, - 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x04, 0x20, 0x02, 0x28, 0x0d, 0x52, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x61, 0x67, 0x65, 0x73, 0x5f, 0x72, 0x65, - 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x70, 0x61, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x22, 0x64, 0x0a, 0x0b, 0x73, - 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x25, 0x0a, 0x04, 0x64, 0x75, - 0x6d, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x75, 0x6d, 0x70, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x75, 0x6d, - 0x70, 0x12, 0x2e, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x5f, 0x73, 0x74, 0x61, - 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x6f, 0x72, - 0x65, -} - -var ( - file_stats_stats_proto_rawDescOnce sync.Once - file_stats_stats_proto_rawDescData = file_stats_stats_proto_rawDesc -) + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DumpStatsEntry) UnmarshalVTUnsafe(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DumpStatsEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DumpStatsEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FreezingTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.FreezingTime = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FrozenTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.FrozenTime = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemdumpTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.MemdumpTime = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemwriteTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.MemwriteTime = &v + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesScanned", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesScanned = &v + hasFields[0] |= uint64(0x00000010) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesSkippedParent", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesSkippedParent = &v + hasFields[0] |= uint64(0x00000020) + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesWritten", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesWritten = &v + hasFields[0] |= uint64(0x00000040) + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IrmapResolve", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.IrmapResolve = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesLazy", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesLazy = &v + hasFields[0] |= uint64(0x00000080) + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagePipes", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagePipes = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagePipeBufs", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagePipeBufs = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShpagesScanned", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.ShpagesScanned = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShpagesSkippedParent", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.ShpagesSkippedParent = &v + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShpagesWritten", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.ShpagesWritten = &v + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field freezing_time not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field frozen_time not set") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return fmt.Errorf("proto: required field memdump_time not set") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return fmt.Errorf("proto: required field memwrite_time not set") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return fmt.Errorf("proto: required field pages_scanned not set") + } + if hasFields[0]&uint64(0x00000020) == 0 { + return fmt.Errorf("proto: required field pages_skipped_parent not set") + } + if hasFields[0]&uint64(0x00000040) == 0 { + return fmt.Errorf("proto: required field pages_written not set") + } + if hasFields[0]&uint64(0x00000080) == 0 { + return fmt.Errorf("proto: required field pages_lazy not set") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RestoreStatsEntry) UnmarshalVTUnsafe(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RestoreStatsEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RestoreStatsEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesCompared", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesCompared = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesSkippedCow", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesSkippedCow = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForkingTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.ForkingTime = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RestoreTime", wireType) + } + var v uint32 + v, iNdEx, err = protobuf_go_lite.DecodeVarintUint32(dAtA, iNdEx) + if err != nil { + return err + } + m.RestoreTime = &v + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PagesRestored", wireType) + } + var v uint64 + v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + m.PagesRestored = &v + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return fmt.Errorf("proto: required field pages_compared not set") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return fmt.Errorf("proto: required field pages_skipped_cow not set") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return fmt.Errorf("proto: required field forking_time not set") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return fmt.Errorf("proto: required field restore_time not set") + } -func file_stats_stats_proto_rawDescGZIP() []byte { - file_stats_stats_proto_rawDescOnce.Do(func() { - file_stats_stats_proto_rawDescData = protoimpl.X.CompressGZIP(file_stats_stats_proto_rawDescData) - }) - return file_stats_stats_proto_rawDescData -} - -var file_stats_stats_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_stats_stats_proto_goTypes = []interface{}{ - (*DumpStatsEntry)(nil), // 0: dump_stats_entry - (*RestoreStatsEntry)(nil), // 1: restore_stats_entry - (*StatsEntry)(nil), // 2: stats_entry -} -var file_stats_stats_proto_depIdxs = []int32{ - 0, // 0: stats_entry.dump:type_name -> dump_stats_entry - 1, // 1: stats_entry.restore:type_name -> restore_stats_entry - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_stats_stats_proto_init() } -func file_stats_stats_proto_init() { - if File_stats_stats_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_stats_stats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DumpStatsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stats_stats_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RestoreStatsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_stats_stats_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*StatsEntry); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_stats_stats_proto_rawDesc, - NumEnums: 0, - NumMessages: 3, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_stats_stats_proto_goTypes, - DependencyIndexes: file_stats_stats_proto_depIdxs, - MessageInfos: file_stats_stats_proto_msgTypes, - }.Build() - File_stats_stats_proto = out.File - file_stats_stats_proto_rawDesc = nil - file_stats_stats_proto_goTypes = nil - file_stats_stats_proto_depIdxs = nil + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StatsEntry) UnmarshalVTUnsafe(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + var err error + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + wire, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + if err != nil { + return err + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StatsEntry: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StatsEntry: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Dump", wireType) + } + var msglen int + var _v uint64 + _v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + msglen = int(_v) + if err != nil { + return err + } + if msglen < 0 { + return protobuf_go_lite.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Dump == nil { + m.Dump = &DumpStatsEntry{} + } + if err := m.Dump.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Restore", wireType) + } + var msglen int + var _v uint64 + _v, iNdEx, err = protobuf_go_lite.DecodeVarint(dAtA, iNdEx) + msglen = int(_v) + if err != nil { + return err + } + if msglen < 0 { + return protobuf_go_lite.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Restore == nil { + m.Restore = &RestoreStatsEntry{} + } + if err := m.Restore.UnmarshalVTUnsafe(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := protobuf_go_lite.Skip(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protobuf_go_lite.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.unknownFields = append(m.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil } diff --git a/vendor/github.com/checkpoint-restore/go-criu/v8/stats/utils.go b/vendor/github.com/checkpoint-restore/go-criu/v8/stats/utils.go index 2b65cc2cda..1b225358f8 100644 --- a/vendor/github.com/checkpoint-restore/go-criu/v8/stats/utils.go +++ b/vendor/github.com/checkpoint-restore/go-criu/v8/stats/utils.go @@ -5,8 +5,6 @@ import ( "errors" "os" "path/filepath" - - "google.golang.org/protobuf/proto" ) func readStatisticsFile(imgDir *os.File, fileName string) (*StatsEntry, error) { @@ -26,7 +24,7 @@ func readStatisticsFile(imgDir *os.File, fileName string) (*StatsEntry, error) { payloadSize := binary.LittleEndian.Uint32(buf[SizeOffset:PayloadOffset]) st := &StatsEntry{} - if err := proto.Unmarshal(buf[PayloadOffset:PayloadOffset+payloadSize], st); err != nil { + if err := st.UnmarshalVT(buf[PayloadOffset : PayloadOffset+payloadSize]); err != nil { return nil, err } diff --git a/vendor/modules.txt b/vendor/modules.txt index da1fe9831f..6e797af59e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -28,14 +28,17 @@ github.com/VividCortex/ewma # github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d ## explicit github.com/acarl005/stripansi +# github.com/aperturerobotics/protobuf-go-lite v0.14.0 +## explicit; go 1.23 +github.com/aperturerobotics/protobuf-go-lite # github.com/cespare/xxhash/v2 v2.3.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 # github.com/checkpoint-restore/checkpointctl v1.5.0 ## explicit; go 1.24.6 github.com/checkpoint-restore/checkpointctl/lib -# github.com/checkpoint-restore/go-criu/v8 v8.2.0 -## explicit; go 1.24.0 +# github.com/checkpoint-restore/go-criu/v8 v8.3.0 +## explicit; go 1.25.0 github.com/checkpoint-restore/go-criu/v8/stats # github.com/chzyer/readline v1.5.1 ## explicit; go 1.15