From patchwork Tue May 19 02:53:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 186902 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp3446287ilb; Mon, 18 May 2020 19:54:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLUH8P4GxOHfwEw0CCN2URjCHo8TOYLbs8XUx8Q6doEPzJCYWIw9jHInR2IHiXUzuMHofW X-Received: by 2002:ac8:3ae4:: with SMTP id x91mr13909907qte.19.1589856853574; Mon, 18 May 2020 19:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589856853; cv=none; d=google.com; s=arc-20160816; b=UX4x/qMfaKh3U33kT/7wjYecEVERnPIoQn7zcl5mXq/B4G2QLpAO/4cQKJ/2XBASiE SU1e+JmcPtHXDGNwkorx5DDfHVae6366SsjJaUBsGwaZAtvAx15zzm4g0eLpn1hIlCYE ih/uSCiKtTL6WoezqMLOrTZk6M/gy9peWlzkPk6R5EEXmyE+0E8ImA7gcb8QeN9tcHdS 2XomXOu8JSW2ktjiceI8bKPOmrA6oriR/PfjqqoMb/B0v8F5FWt6PZ7Nsd/qcBsVGh+w liRKQbkz76D1LkTB0Dz/am4Q/TgS91/LYmvmKoeWXczGrNK2qZmkh5JN9ghLWJli3c/e BpJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=wKGbphf+Kes9iMm8h2LB5BORjWrEvB9cReHSSjeTBt0=; b=F41Ll9RL8FJpFU6KdQlrAtcYeQcowZtolcDeCN6uKTNjQLruC0eLYmMJ4gZbsvP1OM h/yQHrytmRDTHxYYhTBmXrgXEkEfcfKd6HDhJZOra4uZykZS75M2rPlGRZFL2DZwZ9BY DY+xQ4TT91IkQu4bd2Gouzvcuaqfazxe7SABioUmIzVgZ8omON5SiQO3ASgdj0ES9cSP 9Pfq1EnUSb+SCCGUdPXZV/lz4WUzPNnGVqu60lhtG4oZYA7TFpRwQ4hE6EeiH1Kzs5xS 5U2snW1GNRhVzV12hFdwizNovtvy7YbqrRHhfeVYxdExp6OqQQqObtIQHVi8svxmU5b/ IY8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZtmaXZ9H; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a15si6574860qko.24.2020.05.18.19.54.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 May 2020 19:54:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZtmaXZ9H; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jasOT-00056o-48 for patch@linaro.org; Mon, 18 May 2020 22:54:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46764) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jasOH-00056b-BP for qemu-devel@nongnu.org; Mon, 18 May 2020 22:54:01 -0400 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:43409) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jasOF-0002OF-OQ for qemu-devel@nongnu.org; Mon, 18 May 2020 22:54:00 -0400 Received: by mail-pg1-x529.google.com with SMTP id f4so5725260pgi.10 for ; Mon, 18 May 2020 19:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wKGbphf+Kes9iMm8h2LB5BORjWrEvB9cReHSSjeTBt0=; b=ZtmaXZ9HsAlL6finuK9klFppWpOoPTBYCPbJHL3cGL1KZ5A8KZHYDMYCyqUNzFSbH7 hcDM/rPeviTxERi2eua4yr81pk4Geb5jNzRyqd7sIaJOSVpNmfeKi86QY+gaCQ/8qca4 GfhE3mTq0XsMtg8Mfojh3BSSOchIQMuDf26fdDa0TXyU6LlfhsgAC2rrsRKI1FKJ8I1R Z3WplsYtYTULhxTqjl+sLziaQxdUvU8UqaABYAGTYiDQduNsMvGiqrFXP04HpD4Tc4Ns yTMhxaRsHC3jY4ImcDx5nS3tqrNrTilmjxQMQb6pUMzFDH2V833PmPuv/aIHpMH47TC2 wriQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wKGbphf+Kes9iMm8h2LB5BORjWrEvB9cReHSSjeTBt0=; b=Zms6m1xjPiF3dvSoe4cBB0eP0+3tXgxa4ydsXKtDIBcty/0UCdteVM4C5Wi/FPddvh wvvA5bzfjvYINFarcEgGrcqAhVwurp2vF+3R/NPgpt1K45ojmbab+TLelv890CvTFBpf eY4s3h+dLWFP10NRFtirTPnoXZNUYkFJQn87fGlla33Vst12EY8lLQ6Jtt8VDiokowQk 9w3y4F35uknu/oSN84w2w93lV55Jv6FgEl89BW0naNbGN1ieEMb7XEbCp/ZbEdZZr1tI YmIG7DJsS4D3N5uLgoXk2dVCC2wB+SDrocVbKDoKfybaRsGlqtFYCXCvfX1K0dJk/oii kVOQ== X-Gm-Message-State: AOAM533xmeXMr8QLrdI/LHZbBOY90qM7T6laW27LbwrRi1xacAYRzBIU VSawyPCNfbZXKOsKAwSvKHiAlPNF5Ss= X-Received: by 2002:a63:5fc8:: with SMTP id t191mr17592126pgb.185.1589856837536; Mon, 18 May 2020 19:53:57 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id a2sm8772418pgh.57.2020.05.18.19.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 19:53:56 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [RISU v2 00/17] risu cleanups and improvements Date: Mon, 18 May 2020 19:53:38 -0700 Message-Id: <20200519025355.4420-1-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x529.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This patch set does alter the format of the trace files, and thus means we'll have to re-generate these. However, the space saved for sve trace files is significant, so I consider it worthwhile. In addition, the new --dump option allows one to inspect the contents of the trace file. Version 2 adds a number of patches that clean up the whole reporting of errors thing. This allows us to give sensible output when things go awry. If using old trace files with the new risu, you get mismatch header after 1 checkpoints header mismatch detail (master : apprentice): magic: 000000fc vs 52695375 If for somehow you use different risu for master and apprentice on sockets, you get i/o error after 1 checkpoints Which is less helpful, but since the master has not written enough data to the socket, the apprentice notices and reports the i/o error before having a look at the header contents. r~ Richard Henderson (17): Use bool for tracing variables Unify master_fd and apprentice_fd to comm_fd Hoist trace file opening Adjust tracefile open for write Use EXIT_FAILURE, EXIT_SUCCESS Make some risu.c symbols static Add enum RisuOp Add enum RisuResult Unify i/o functions and use RisuResult Pass non-OK result back through siglongjmp Always write for --master Simplify syncing with master Split RES_MISMATCH for registers and memory Add magic and size to the trace header Compute reginfo_size based on the reginfo aarch64: Reorg sve reginfo to save space Add --dump option to inspect trace files risu.h | 88 +++++---- risu_reginfo_aarch64.h | 16 +- comms.c | 34 ++-- reginfo.c | 274 ++++++++++++++++----------- risu.c | 409 +++++++++++++++++++++++++---------------- risu_aarch64.c | 6 +- risu_arm.c | 6 +- risu_i386.c | 4 +- risu_m68k.c | 4 +- risu_ppc64.c | 4 +- risu_reginfo_aarch64.c | 192 ++++++++++--------- risu_reginfo_arm.c | 6 +- risu_reginfo_i386.c | 8 +- risu_reginfo_m68k.c | 6 +- risu_reginfo_ppc64.c | 6 +- 15 files changed, 635 insertions(+), 428 deletions(-) -- 2.20.1