Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp8162993ybn; Tue, 1 Oct 2019 04:16:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqz0MTXsexjeddwZsQpSIR5io7NIPYBglIBo/vOlCG9RBRwIsHT+T28nIKlwAhePRYgMQ4iU X-Received: by 2002:a50:95a3:: with SMTP id w32mr24781329eda.211.1569928611431; Tue, 01 Oct 2019 04:16:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569928611; cv=none; d=google.com; s=arc-20160816; b=yreauj2nB76YiM2PC2tlE8JkgL8o37aisoi15oPTWgRcyPSxARXpMbtu9tmpDNMjgm p0VKdMIVfs7ZwNeArSjIN0BptfRKmZEuJwyCZ9KnXLWckmh60oFul2tcsju7db1fRusN RSp8ohKcYJ0y6IavW2aZqhzfu7Y7uCp39iQyqsBosNJ0tmRACIIe/rQpak3En4cfP/3/ kTr4z1pDiX64YiwrIG674z4aJVxia4on7ZdDiBJRFnwfcvC1/o6a2DQ7rbQY0aDRTdYv ZmyEFKrHTSQXtHYpYPM8EomczB0xrg+xut9TxHWEXU7K45UnN8JuREkR7lGciPPFM83B syyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=qtVxEk3U1mmikF9+1Yjdztilrye2tfrJ/+Vyd2mX048=; b=jZQBR/YVw5U0ZVBqTdyfNLbh9JRO2VFFoisSjaB4PjR0g8jtyKlEVOcpPAwDfv8X9s XLeq4B44gcy3REqhD1j5eJHUULph3WWJoK8cxtr9DbV8i36c/jOYw7crSa4TE5+f0Kmn I2PdEDehctW+prjiBHG40a2ZtXYkz+a6Z11snvUREw7+yNsBU8OtjJct3kg1geRXRKC2 Ci/b2wKVicZ4afdcyLSaw/RFCcoO679MGeIkl+PViNJ6tCAyYYq4A4CSPAtOZskioubp qW3hjo4xJKoPfjN3Qn/cHT4Pttbwg3XfR6JcpVSps2k/3JV8qK2eUwRgYzfzpqscQXVv EcqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zNX8OEJc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j18si8634315ejv.201.2019.10.01.04.16.26; Tue, 01 Oct 2019 04:16:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zNX8OEJc; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731840AbfJALNd (ORCPT + 99 others); Tue, 1 Oct 2019 07:13:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:35466 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731194AbfJALNd (ORCPT ); Tue, 1 Oct 2019 07:13:33 -0400 Received: from quaco.ghostprotocols.net (177.206.223.101.dynamic.adsl.gvt.net.br [177.206.223.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 716E621D71; Tue, 1 Oct 2019 11:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569928412; bh=WH6I5t8eoCSjD9gkLayn6DnsGmhlINWQmAEd38zJLoQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zNX8OEJcPMshplnO/Adm3KU/RkcYjCqOyzF9m8QvmVa4OYy5omi8fkiBZ50w/opVi 40yvakrpmFeU3tlz4PIxnpaCeWrLhg9gzhp2iRCp5vbtlga7ju/yKiED12GYS1EXs3 pFXnao53giUOjJTJQTR0gal2QLwv8v/bWvDXOtpY= From: Arnaldo Carvalho de Melo To: Ingo Molnar , Thomas Gleixner Cc: Jiri Olsa , Namhyung Kim , Clark Williams , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, Steve MacLean , Steve MacLean , Stephane Eranian , Alexander Shishkin , Andi Kleen , Brian Robbins , Davidlohr Bueso , Eric Saint-Etienne , Jiri Olsa , John Keeping , John Salem , Leo Yan , Mark Rutland , Peter Zijlstra , Song Liu , Tom McDonald , Arnaldo Carvalho de Melo Subject: [PATCH 14/24] perf docs: Correct and clarify jitdump spec Date: Tue, 1 Oct 2019 08:12:06 -0300 Message-Id: <20191001111216.7208-15-acme@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20191001111216.7208-1-acme@kernel.org> References: <20191001111216.7208-1-acme@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steve MacLean Specification claims latest version of jitdump file format is 2. Current jit dump reading code treats 1 as the latest version. Correct spec to match code. The original language made it unclear the value to be written in the magic field. Revise language that the writer always writes the same value. Specify that the reader uses the value to detect endian mismatches. Signed-off-by: Steve MacLean Acked-by: Stephane Eranian Cc: Alexander Shishkin Cc: Andi Kleen Cc: Brian Robbins Cc: Davidlohr Bueso Cc: Eric Saint-Etienne Cc: Jiri Olsa Cc: John Keeping Cc: John Salem Cc: Leo Yan Cc: Mark Rutland Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Song Liu Cc: Tom McDonald Link: http://lore.kernel.org/lkml/BN8PR21MB1362F63CDE7AC69736FC7F9EF7800@BN8PR21MB1362.namprd21.prod.outlook.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/Documentation/jitdump-specification.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/perf/Documentation/jitdump-specification.txt b/tools/perf/Documentation/jitdump-specification.txt index 4c62b0713651..52152d156ad9 100644 --- a/tools/perf/Documentation/jitdump-specification.txt +++ b/tools/perf/Documentation/jitdump-specification.txt @@ -36,8 +36,8 @@ III/ Jitdump file header format Each jitdump file starts with a fixed size header containing the following fields in order: -* uint32_t magic : a magic number tagging the file type. The value is 4-byte long and represents the string "JiTD" in ASCII form. It is 0x4A695444 or 0x4454694a depending on the endianness. The field can be used to detect the endianness of the file -* uint32_t version : a 4-byte value representing the format version. It is currently set to 2 +* uint32_t magic : a magic number tagging the file type. The value is 4-byte long and represents the string "JiTD" in ASCII form. It written is as 0x4A695444. The reader will detect an endian mismatch when it reads 0x4454694a. +* uint32_t version : a 4-byte value representing the format version. It is currently set to 1 * uint32_t total_size: size in bytes of file header * uint32_t elf_mach : ELF architecture encoding (ELF e_machine value as specified in /usr/include/elf.h) * uint32_t pad1 : padding. Reserved for future use -- 2.21.0