Skip to content

Commit

Permalink
Optimize stats
Browse files Browse the repository at this point in the history
We recently introduced support for CRIT in go-criu. However, the linker
in the Go toolchain creates statically-linked binaries, including the
Go runtime and other information necessary to support dynamic type
checks. As a result, when updating Podman to use the latest go-criu
version, the auto-generated protobuf binding for all CRIU images are
compiled into the Podman binary, significantly increasing its size.

Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
  • Loading branch information
rst0git committed Oct 6, 2022
1 parent 210268b commit 0609ce9
Show file tree
Hide file tree
Showing 5 changed files with 576 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ all: build
lint:
golangci-lint run ./...

build: rpc/rpc.pb.go
build: rpc/rpc.pb.go stats/stats.pb.go
$(GO) build -v ./...
# Build crit binary
$(MAKE) -C crit bin/crit
Expand All @@ -27,6 +27,12 @@ rpc/rpc.proto:
rpc/rpc.pb.go: rpc/rpc.proto
protoc --go_out=. --go_opt=M$^=rpc/ $^

stats/stats.proto:
curl -sSL https://raw.githubusercontent.com/checkpoint-restore/criu/master/images/stats.proto -o $@

stats/stats.pb.go: stats/stats.proto
protoc --go_out=. --go_opt=M$^=stats/ $^

vendor:
GO111MODULE=on $(GO) mod tidy
GO111MODULE=on $(GO) mod vendor
Expand Down
Loading

0 comments on commit 0609ce9

Please sign in to comment.