Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp3869710imm; Mon, 8 Oct 2018 10:51:00 -0700 (PDT) X-Google-Smtp-Source: ACcGV62/6/b9RLiIqDGZn80Q8eBsd41lJb6YXhS5viC9wSyVAV4EefRTmVZaX6LkzRpvTRLyTENX X-Received: by 2002:a17:902:7613:: with SMTP id k19-v6mr19294656pll.98.1539021060035; Mon, 08 Oct 2018 10:51:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539021059; cv=none; d=google.com; s=arc-20160816; b=ZzY7IKYgiWY5WphIwCxH5E3YiKzr8i2+YGlw06+cTceILJZ/4SaXLuXPZtYOGsSqkS jnlIu2L4ikn/RMduoZF6BMkZdtqGFkvgMaKd7CNKNelYQivbDHD8zcvmc9V/GWlQbCc/ c70paMzopNhZjoH94AgUeCc23UZSo1dVxyMuf/V0QqNX4tG5cZG2nc510mydpCtZ43Jl BC7vVxV2RXTWBmlyFTSS9/BYJJkV5mQ65x1D3c9Dsxm66pwsoEmqVjX50v5Aqyr3gR7A aVtj/vZT5F+OpunB8amXq1OP1efT5GiOu48eyos3uGGdPiHj+H8/GOU4OMl64ZizYfKB GudA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5z7ye03h9/92wFj2WCTVRhC1E64anzdMo47Lr3W0P5Q=; b=clqpj0luTW7rJTnGYpXhGd+B6dzOVghFt78ZRvZmCBeUihCwUtmwRTp2hEDxKTQhF5 1rw/5oyb8cXPuM+OzQDADR+ps4p7TEceScnKx2LCRKo2XrK+4k+M02VSNRM1BzayKdcs cdpKQYZ29B+7+549olm75Fp6zgheWvHXqiBimX+yHN5nLmtSYibEmUbI1v76aTGIN5OA sHRCkogjvi3ytFCv7uUyxHXbhqoAxtqHEVdDLjg7deCatOc08paE0fJX0uv64jfNSxVF Aec/2bJf3CRypBCOJbsJIGSjgNtFXfVagYrHxbA+m7VUDUTSfnjOXl24jfhe9xcX0GhZ YR8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oUaNTzJb; 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 20-v6si18473570pfk.287.2018.10.08.10.50.45; Mon, 08 Oct 2018 10:50:59 -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=oUaNTzJb; 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 S1726460AbeJIBDK (ORCPT + 99 others); Mon, 8 Oct 2018 21:03:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:60318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbeJIBDJ (ORCPT ); Mon, 8 Oct 2018 21:03:09 -0400 Received: from jouet.infradead.org (unknown [190.15.121.82]) (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 C7B6F2145D; Mon, 8 Oct 2018 17:50:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1539021018; bh=3Wauq6xlfHvu3uPPzdIv/fgqWncjfqtiYgdvmoAFii8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oUaNTzJbLn+VgiSQC3uefCGNgFmdHzHGVz3nT+sozU44lPm8lUKBfHrJ1M22+CXub ppRDYQ7QAkNsAhvJArHKe4LnAIaIWxKDJfsVGkuoqnmb5JRxJPbh0iVhuSu4qL52xQ aAULvLSyqh3+CwXF9s/Ro77XhZV77NmiMEekRgQ0= Received: by jouet.infradead.org (Postfix, from userid 1000) id 67418141DDC; Mon, 8 Oct 2018 14:50:14 -0300 (-03) Date: Mon, 8 Oct 2018 14:50:14 -0300 From: Arnaldo Carvalho de Melo To: Andi Kleen Cc: jolsa@kernel.org, linux-kernel@vger.kernel.org, Andi Kleen Subject: Re: [PATCH v6 1/5] tools, perf, script: Add --insn-trace for instruction decoding Message-ID: <20181008175014.GS3541@kernel.org> References: <20180920180540.14039-1-andi@firstfloor.org> <20180920180540.14039-2-andi@firstfloor.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180920180540.14039-2-andi@firstfloor.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Sep 20, 2018 at 11:05:36AM -0700, Andi Kleen escreveu: > From: Andi Kleen > > Add a --insn-trace short hand option for decoding and disassembling > instruction streams for intel_pt. This automatically pipes the > output into the xed disassembler to generate disassembled instructions. > This just makes this use model much nicer to use > > Before > > % perf record -e intel_pt// ... > % perf script --itrace=i0ns --ns -F +insn,-event,-period | xed -F insn: -A -64 > swapper 0 [000] 117276.429606186: ffffffff81010486 pt_config ([kernel.kallsyms]) nopl %eax, (%rax,%rax,1) > swapper 0 [000] 117276.429606186: ffffffff8101048b pt_config ([kernel.kallsyms]) add $0x10, %rsp > swapper 0 [000] 117276.429606186: ffffffff8101048f pt_config ([kernel.kallsyms]) popq %rbx > swapper 0 [000] 117276.429606186: ffffffff81010490 pt_config ([kernel.kallsyms]) popq %rbp > swapper 0 [000] 117276.429606186: ffffffff81010491 pt_config ([kernel.kallsyms]) popq %r12 > swapper 0 [000] 117276.429606186: ffffffff81010493 pt_config ([kernel.kallsyms]) popq %r13 > swapper 0 [000] 117276.429606186: ffffffff81010495 pt_config ([kernel.kallsyms]) popq %r14 > swapper 0 [000] 117276.429606186: ffffffff81010497 pt_config ([kernel.kallsyms]) popq %r15 > swapper 0 [000] 117276.429606186: ffffffff81010499 pt_config ([kernel.kallsyms]) retq > swapper 0 [000] 117276.429606186: ffffffff8101063e pt_event_add ([kernel.kallsyms]) cmpl $0x1, 0x1b0(%rbx) > swapper 0 [000] 117276.429606186: ffffffff81010645 pt_event_add ([kernel.kallsyms]) mov $0xffffffea, %eax > swapper 0 [000] 117276.429606186: ffffffff8101064a pt_event_add ([kernel.kallsyms]) mov $0x0, %edx > swapper 0 [000] 117276.429606186: ffffffff8101064f pt_event_add ([kernel.kallsyms]) popq %rbx > swapper 0 [000] 117276.429606186: ffffffff81010650 pt_event_add ([kernel.kallsyms]) cmovnz %edx, %eax > swapper 0 [000] 117276.429606186: ffffffff81010653 pt_event_add ([kernel.kallsyms]) jmp 0xffffffff81010635 > swapper 0 [000] 117276.429606186: ffffffff81010635 pt_event_add ([kernel.kallsyms]) retq > swapper 0 [000] 117276.429606186: ffffffff8115e687 event_sched_in.isra.107 ([kernel.kallsyms]) test %eax, %eax > > Now > > % perf record -e intel_pt// ... > % perf script --insn-trace --xed > ... same output ... > > XED needs to be installed with: > > > git clone https://github.com/intelxed/mbuild.git mbuild > > git clone https://github.com/intelxed/xed > > cd xed > > mkdir obj > > cd obj > > ../mfile.py > > sudo ../mfile.py --prefix=/usr/local install > > Signed-off-by: Andi Kleen Fixed up whitespace damage in the Documentation for building xed, applied. - Arnaldo