From patchwork Fri May 22 02:34:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 187114 Delivered-To: patch@linaro.org Received: by 2002:a92:5b0a:0:0:0:0:0 with SMTP id p10csp2102156ilb; Thu, 21 May 2020 19:34:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwHrFRhxZ//Pg4kjeI8Jr1U1SbXTCYeMi9a/9ZrRNK96r9qN0D+b7dXP+i8s/fOjQH766vr X-Received: by 2002:a5b:50c:: with SMTP id o12mr20227650ybp.264.1590114898683; Thu, 21 May 2020 19:34:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590114898; cv=none; d=google.com; s=arc-20160816; b=hjDUgP61bHcTG6kMrTvVDO2kZlP94mTwxopshx7f54v35gaj0MVBMIGunDdwNQsk3k KRUaXbPR5mfpDgXrfPgcpfogf5RI68uFfVbV3awN4a/5NcNvuj72mKFZQS0WoQC77Wdu R9FjAE0TRQcC0ORAy6sAicklZMfL//ITn7RO78bbtSZRtwdwsmI/HsafrJNcKtlkHprl n8pfWM/V/SIAN8fO7Geimz7KRYds79cI4KmM/TmHAbDj0zMT5i1+Fg6XYi42uLXE8oE7 yAnJTwpM6ZgCyH9MDBsLa+/kXa9P7UX7m3UDQdAlOXCjN/43g1sCXYKdNNXbgl5ybC1X Yf1Q== 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=XDhdcN+j5iDcQZfB4w0j46QmOfMVA3mEc/DoJHzCG4s=; b=EdSU0nYNDgrEBJpfsPSMgWWf7t3H3E53F6qi0DqWbcjZ1JGmVl9E1lIUKBSzNmvZ6q c7VUeY9cI1tBwNIqZiiiqMZpvI4lYNOAn53GTVe+QcYWT6kBh2lFHago5suDHFDigCjx YKKPfswyrVDWZInyFBHgnzIsfj/i+MjQsuTFNn0mPHKSKAvIALDp7XS2oRw+kRN7XW4m 871O4gn12AGCLXbEuL5uNziAB0aaKxWRouyFq0V3VoH3JEuVrYHCwUHYcHu+5zFnoipv G5kSuuMewxsyCZrXudQp2SYBKQeG/D8P+3WMg0Ft8sjfhfL68dbAde4ee3saNZGckxxi /cvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MPJ3mNqq; 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 v136si1832624ybv.463.2020.05.21.19.34.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 May 2020 19:34:58 -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=MPJ3mNqq; 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]:43034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbxWU-00027H-5G for patch@linaro.org; Thu, 21 May 2020 22:34:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jbxWI-00023f-SR for qemu-devel@nongnu.org; Thu, 21 May 2020 22:34:46 -0400 Received: from mail-pl1-x630.google.com ([2607:f8b0:4864:20::630]:42276) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jbxWG-00055h-QD for qemu-devel@nongnu.org; Thu, 21 May 2020 22:34:46 -0400 Received: by mail-pl1-x630.google.com with SMTP id x11so2823348plv.9 for ; Thu, 21 May 2020 19:34:43 -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=XDhdcN+j5iDcQZfB4w0j46QmOfMVA3mEc/DoJHzCG4s=; b=MPJ3mNqqgkDSmGZ0WhDR9fTosnzsUdO6QSbJ3PBaKOZJU0fXX7dhFJSm0m0GcjCsd1 gYCjE3uDy4IrfLFY6Yrvt7aroRSQF3ERTENqG5DNZGwMuG/hlByOgIKLcZLkEkYwndab DORA1Xu28rFpoo7Ge452MhtFv5OfDGWNHZnwvL04WPCNAqn8OZ1pqRga5KkKPuitKl2W Ll5ltdTfi4bVy6SPyN5RlWJTUDbrg3K2SJXk5kUK3sK8HIrKj3jGtcWYTZ1NrYisfYPs OwqLV5NZ/TbWO/k6JSXtpP1VLm05676LfKLQbFW4ry0XNDUirLJCW2HQGCtgFCkzkEF1 QYHQ== 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=XDhdcN+j5iDcQZfB4w0j46QmOfMVA3mEc/DoJHzCG4s=; b=GtGbgALxfy/ChF/HzZeSY6uYRA4aDl1b8BBnlP9lEKFHD/i8Y7SctVGa5ylxvMRYVk rGEA02bNY8zgiL5OXqzc/n2sclyOQr1PMrIAJkvasbpY8q5YgQxQc/H5VE756uONb8ul hptLj7YrXUOLkdx37q7EXfLN62sK7T2ukdbC9gZle1sOqxUSxhGqwZRlsBNxL19cBwJd hDKVk0bxFhzE6laJtx3HCNiEaxWu/lYWgG8yt9RlXjeSPpUuYQ9puT+SsJJy685jKgUU 8MWuCIXICyAeI4opp5NZJF2Qj/+g+aZxNH/VXqFpgIwu3O35ZhIftAU4Lq8wgDS+FVgd GbIw== X-Gm-Message-State: AOAM531MhoxOheilS+dx3XXBqSr3ETc4OvYNxrwrhvjBwgmWessZuC0X /yOAnCfERVlcVhoMPWisQ1HJ9CwJjp4= X-Received: by 2002:a17:902:7:: with SMTP id 7mr12723016pla.45.1590114882192; Thu, 21 May 2020 19:34:42 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id gt10sm5443755pjb.30.2020.05.21.19.34.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 19:34:41 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v3 00/25] risu cleanups and improvements Date: Thu, 21 May 2020 19:34:15 -0700 Message-Id: <20200522023440.26261-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::630; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x630.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: alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Version 3 changes the --dump option to --fulldump and --diffdump, after an off-hand suggestion by Alex. These are now mode options, similar to --master. Which means that dumping is an orthogonal apprentice type, which means that we can dump from a socket. I'm not sure that will be useful as such, but I think it makes main be a bit cleaner. If using old trace files with the new risu, you get Unexpected magic number: 0x000078 If for somehow you use different risu for master and apprentice on sockets, the apprentice will hang waiting for data that the master will never write. This is less than helpful, but should be trivial to avoid. While cleaning up the interface for reginfo_dump_mismatch(), I noticed some bugs on the ppc64 side. The patches without reviews are: 0014-Merge-reginfo.c-into-risu.c.patch 0015-Rearrange-reginfo-and-memblock-buffers.patch 0016-Split-out-recv_register_info.patch 0017-Add-magic-and-size-to-the-trace-header.patch 0018-Compute-reginfo_size-based-on-the-reginfo.patch 0019-aarch64-Reorg-sve-reginfo-to-save-space.patch 0020-aarch64-Use-arch_init-to-configure-sve.patch 0021-ppc64-Use-uint64_t-to-represent-double.patch 0022-Standardize-reginfo_dump_mismatch-printing.patch 0023-Add-fulldump-and-diffdup-options.patch 0024-Remove-return-value-from-reginfo_dump.patch 0025-ppc64-Clean-up-reginfo-handling.patch most of which are new, and those that aren't new have had significant modifications. r~ Richard Henderson (25): Use bool for tracing variables Unify master_fd and apprentice_fd to comm_fd Hoist trace file and socket 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 Merge reginfo.c into risu.c Rearrange reginfo and memblock buffers Split out recv_register_info Add magic and size to the trace header Compute reginfo_size based on the reginfo aarch64: Reorg sve reginfo to save space aarch64: Use arch_init to configure sve ppc64: Use uint64_t to represent double Standardize reginfo_dump_mismatch printing Add --fulldump and --diffdup options Remove return value from reginfo_dump ppc64: Clean up reginfo handling Makefile | 2 +- risu.h | 103 +++---- risu_reginfo_aarch64.h | 16 +- risu_reginfo_ppc64.h | 3 +- comms.c | 34 +-- reginfo.c | 183 ----------- risu.c | 676 ++++++++++++++++++++++++++++++----------- risu_aarch64.c | 6 +- risu_arm.c | 6 +- risu_i386.c | 4 +- risu_m68k.c | 4 +- risu_ppc64.c | 4 +- risu_reginfo_aarch64.c | 212 +++++++------ risu_reginfo_arm.c | 32 +- risu_reginfo_i386.c | 22 +- risu_reginfo_m68k.c | 37 +-- risu_reginfo_ppc64.c | 183 +++++------ 17 files changed, 803 insertions(+), 724 deletions(-) delete mode 100644 reginfo.c -- 2.20.1