From fed899ed4a625d124a881a2da67430be5d15325c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 27 Mar 2024 14:36:01 +0100 Subject: pkg/rpctype: make RPC compression optional RPC compression take up to 10% of CPU time in profiles, but it's unlikely to be beneficial for local VM runs (we are mostly copying memory in this case). Enable RPC compression based on the VM type (local VM don't use it, remove machines use it). --- tools/syz-hubtool/hubtool.go | 2 +- tools/syz-runtest/runtest.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/syz-hubtool/hubtool.go b/tools/syz-hubtool/hubtool.go index 9789639db..08d55cd95 100644 --- a/tools/syz-hubtool/hubtool.go +++ b/tools/syz-hubtool/hubtool.go @@ -57,7 +57,7 @@ func main() { return } log.Printf("connecting to hub at %v...", *flagHubAddress) - conn, err := rpctype.NewRPCClient(*flagHubAddress, 1) + conn, err := rpctype.NewRPCClient(*flagHubAddress, 1, true) if err != nil { log.Fatalf("failed to connect to hub: %v", err) } diff --git a/tools/syz-runtest/runtest.go b/tools/syz-runtest/runtest.go index 405b22255..d18bf7d07 100644 --- a/tools/syz-runtest/runtest.go +++ b/tools/syz-runtest/runtest.go @@ -61,7 +61,7 @@ func main() { reqMap: make(map[int]*runtest.RunRequest), lastReq: make(map[string]int), } - s, err := rpctype.NewRPCServer(cfg.RPC, "Manager", mgr) + s, err := rpctype.NewRPCServer(cfg.RPC, "Manager", mgr, true) if err != nil { log.Fatalf("failed to create rpc server: %v", err) } -- cgit mrf-deployment