From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755477AbbIAIyj (ORCPT ); Tue, 1 Sep 2015 04:54:39 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:35301 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755241AbbIAIyg (ORCPT ); Tue, 1 Sep 2015 04:54:36 -0400 Date: Tue, 1 Sep 2015 10:54:32 +0200 From: Ingo Molnar To: Adrian Hunter Cc: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org, Jiri Olsa , Andy Lutomirski , Masami Hiramatsu , Denys Vlasenko , Peter Zijlstra , Dave Hansen , Qiaowei Ren , "H. Peter Anvin" , Thomas Gleixner Subject: Re: [PATCH 0/4] x86/insn: perf tools: Add a few new x86 instructions Message-ID: <20150901085432.GE6315@gmail.com> References: <1441029522-20235-1-git-send-email-adrian.hunter@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441029522-20235-1-git-send-email-adrian.hunter@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Adrian Hunter wrote: > Hi > > perf tools has a copy of the x86 instruction decoder for decoding > Intel PT. [...] So that's the arch/x86/lib/insn.c instruction length decoder that the kernel uses for kprobes et al - and the two versions already forked slightly: -#include "inat.h" -#include "insn.h" +#include +#include it would be nice to add a diff check to the perf build, and (non-fatally) warn during the build if the two versions depart from each other? This will make sure the two versions are fully in sync in the long run as well. ( Alternatively we could perhaps also librarize it into tools/lib/, and teach the kernel build to pick that one up? ) Thanks, Ingo