From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751728AbdASBm1 (ORCPT ); Wed, 18 Jan 2017 20:42:27 -0500 Received: from mga09.intel.com ([134.134.136.24]:30670 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751378AbdASBmY (ORCPT ); Wed, 18 Jan 2017 20:42:24 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,251,1477983600"; d="scan'208";a="54956359" From: Andi Kleen To: acme@kernel.org Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org Subject: New attempt at adding an disassembler to perf Date: Wed, 18 Jan 2017 17:41:45 -0800 Message-Id: <20170119014150.19218-1-andi@firstfloor.org> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A native disassembler in perf is very useful, in particular with perf script to trace instruction streams, but also for other analysis. Previously I attempted to do this using the udis86 library, but that was rejected because: - udis86 was not maintained anymore and lacking recent instructions - udis86 is dynamically linked and gives a runtime dependency. Doing this needs a full disassembler, not just a decoder, so the existing instruction decoder cannot be used without major changes. This patchkit addresses these issues. Intel recently released an open source version of the XED disassembler library, which is used in many other Intel software. It is very well maintained, uptodate, and supports static linking, so there is no runtime dependency. This version adds XED support to perf, and uses it to implement assembler output in perf script. It also fixes a range of issues in the previous version, see the individual change logs. Available in git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-misc.git perf/xed-6 v1: First post of XED version v2: Change probing to not be default and support XED_DIR. Other cleanups based on review. v3: Use FEATURE_FLAGS_BASIC for probing -Andi