From patchwork Fri Oct 25 06:36:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 177662 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp3277561ill; Fri, 25 Oct 2019 00:25:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxb4PXblF6lCJ0LgDvV+mG0k2uNDUJDXYp3cZt7hDoCyoRIdmXeaIR4v4VbY2htgms2R/7e X-Received: by 2002:a37:4ed5:: with SMTP id c204mr1505480qkb.41.1571988319001; Fri, 25 Oct 2019 00:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571988318; cv=none; d=google.com; s=arc-20160816; b=lcgxng5CNyOKPcwJWqicMu5y1ef+yZAVLeQa0EmGo42fBIJTu0UqBD4CHnYYZiIJle k/H9T6AAXQsBdrzPy09UClRdZKj4WUYahilVuMvPq0+kmEr6LJQMYV5HVNEdJXPPazv0 oGkH5Whz8dVpYKwjqKa1XeM4OF/cUVTwkXzRYHoZBo6U2X1oPZWB2IJMliNxGST4icFW fu8TJE3NxMIBEpjLXV+HjbsEJgMYM6LsoERxu788Bo5/EmjzBZnZzKyTjK+rGJgODfYB VKp/nTOLNo/MaSlGuJMinbH4CkAdBxrUhGhl1HSt6X3BR8U8XKNs4gFfVTknZhEAAeZ4 BZzw== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=p0/8VjboGQtbPpCK+UTcACIJfDHT1FU/+NDtOrh1cRU=; b=HNXWUNvts/6TP16MTGZmBnp7gthu1S9j8AHHyKZbqCmTPFz326HocyUSaYjfCGdW0v IcRJNZcEAkbYh6WH/s0RpvWQmbtfc9o/WiPT47AxI4yhM2BIfx6Q/aULfjgW1jeyKma6 PpxWOMyYxBHkpevLcJxQonVor1QY35BNOLI3HAhZbUMEIL8hIav7fgsRv8Vf9jPFEXDd QJK/PgK2s6VrpHZXMIcQuMu00tm/wXeBdianozxBVGLBTePlwtSKLX697wPLlD1RS3oh Yi431MdaWkZVlhobkXsuHvBd7hB88T1xsxUuVF0SnocY6nUI8C7uwoqgWlayxbjF4WaA D++Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=UH1syymH; 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=fail (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 h31si735668qtb.60.2019.10.25.00.25.18 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Oct 2019 00:25:18 -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=fail header.i=@linaro.org header.s=google header.b=UH1syymH; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:56730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNtyI-0002ST-2s for patch@linaro.org; Fri, 25 Oct 2019 03:25:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37075) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iNtN8-00088S-2l for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:46:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iNtN6-0003Hv-Ul for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:46:53 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:33656) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iNtN5-0003CF-Dc for qemu-devel@nongnu.org; Fri, 25 Oct 2019 02:46:52 -0400 Received: by mail-wr1-x42c.google.com with SMTP id s1so974280wro.0 for ; Thu, 24 Oct 2019 23:46:45 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=p0/8VjboGQtbPpCK+UTcACIJfDHT1FU/+NDtOrh1cRU=; b=UH1syymHb6VlfpNc/Fvk498HXtLxWtZHl8uMAjiOK4ti5GKPYnf3oIm0BhMjlk32pN YeLShB4srmVpebIh6sPLhfGJRc9nWtEscpRK+zG9k2Em8VVowsYNADs2Gmx9YQ+iiVu3 s0x8MHya6eKWbXmJeDF+Xqv3sNOx/lOM+TIO5P1Q9c2ARL/dKztbhy5qmJClUMnkOzaL 5+Eztr+SnyIzePoEqD4t45UOYqI6buTX+VWevBds1e6R5LI1AOHtAvmsby/qkSfmgUC6 HnWHC0kD/OQC0CZKIIfUo1raiA2bDiZGn2jfOmuOQ92ij6/GgtixKYmNiXC+lHXGbQQk MzKA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=p0/8VjboGQtbPpCK+UTcACIJfDHT1FU/+NDtOrh1cRU=; b=LfUVs58pDlWhMtDGJjWWsp1UeLyWmryADzGcRfcBqyTjHY6FdXX06L7Cyn9hufd9AH 75tC5ukj3Pz5Xqudj6GiUHI5mND4LhE5cogKGFUM07hqaq9b84MuZO399ThoORqXhUq6 shfYt1sgkq1nopWQ6KtvKopdGOvQUSPv9XJkzMErkU8z+Kvn0P7k6vnjbM/pStI6ZtJf OQ2ggU9T3OKo7oYStu+t9uK4n3V3JakqUqiJ73unM2vTPRLxtWLekGGEl0XG5nxZKFv7 9MY4Nk8NkmQgt31tMoup+5uChFC1Xd0aotmhw+ugdYC2fo1Ew7/dr6kYJRhH6pXavwqw lLpA== X-Gm-Message-State: APjAAAUeuJcytMJRH3xnElIpEJ4S9OZk8/yBSitR27ptBM7DMziCWpVz nkTPR29ae85vbY/me2koTDgxpg== X-Received: by 2002:adf:f54c:: with SMTP id j12mr1378225wrp.182.1571986004315; Thu, 24 Oct 2019 23:46:44 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id t13sm1280482wra.70.2019.10.24.23.46.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Oct 2019 23:46:41 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 3E29A1FFA5; Fri, 25 Oct 2019 07:37:15 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL v2 17/73] trace: expand mem_info:size_shift to 4 bits Date: Fri, 25 Oct 2019 07:36:17 +0100 Message-Id: <20191025063713.23374-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191025063713.23374-1-alex.bennee@linaro.org> References: <20191025063713.23374-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::42c 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: Richard Henderson , "Emilio G. Cota" , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Stefan Hajnoczi Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" This will allow us to trace 32k-long memory accesses (although our maximum is something like 256 bytes at the moment). Reviewed-by: Alex Bennée Signed-off-by: Emilio G. Cota [AJB: expanded to 3->4 bits] Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson -- 2.20.1 diff --git a/trace-events b/trace-events index 20821ba545c..22133dfd3fa 100644 --- a/trace-events +++ b/trace-events @@ -149,7 +149,7 @@ vcpu guest_cpu_reset(void) # Access information can be parsed as: # # struct mem_info { -# uint8_t size_shift : 2; /* interpreted as "1 << size_shift" bytes */ +# uint8_t size_shift : 4; /* interpreted as "1 << size_shift" bytes */ # bool sign_extend: 1; /* sign-extended */ # uint8_t endianness : 1; /* 0: little, 1: big */ # bool store : 1; /* wheter it's a store operation */ diff --git a/trace/mem-internal.h b/trace/mem-internal.h index 3444fbc5968..1a010c1b277 100644 --- a/trace/mem-internal.h +++ b/trace/mem-internal.h @@ -10,10 +10,10 @@ #ifndef TRACE__MEM_INTERNAL_H #define TRACE__MEM_INTERNAL_H -#define TRACE_MEM_SZ_SHIFT_MASK 0x7 /* size shift mask */ -#define TRACE_MEM_SE (1ULL << 3) /* sign extended (y/n) */ -#define TRACE_MEM_BE (1ULL << 4) /* big endian (y/n) */ -#define TRACE_MEM_ST (1ULL << 5) /* store (y/n) */ +#define TRACE_MEM_SZ_SHIFT_MASK 0xf /* size shift mask */ +#define TRACE_MEM_SE (1ULL << 4) /* sign extended (y/n) */ +#define TRACE_MEM_BE (1ULL << 5) /* big endian (y/n) */ +#define TRACE_MEM_ST (1ULL << 6) /* store (y/n) */ static inline uint8_t trace_mem_build_info( int size_shift, bool sign_extend, MemOp endianness, bool store)