Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp598575imm; Wed, 29 Aug 2018 07:36:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY8c7wvWDekmIcBwnAMIyfT2fZ8Smj4YSHIBEf4ggAPFrXK8Zw/P8mkc5F9qsX5iomOQnAy X-Received: by 2002:a17:902:32f:: with SMTP id 44-v6mr6196465pld.15.1535553380258; Wed, 29 Aug 2018 07:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535553380; cv=none; d=google.com; s=arc-20160816; b=zHRJ2ohtf4Zzr79qwMK4wYDLQv1JkxwdKp8hV8KX2KdA6bmySMYcLsoAzmRvqMSn9J vDgHz5SS4kwtM0I4q4FuB2xLAPU1hlf3CcmbdhfIJ6BzneL94qk4SMGTqKelcY4MS3mY 7g0QFP9/lrl4nOplNqzP0SjGPoMm76ulLQNh16jZdYl5wCg+rCmkPvTvRlfdyyV0w1NV HP/WdeSHh0hTHS6yULX0eIz+DZLa+86uifT80pA0/pIAs6WsXAxUB1QuGkPbFSM9MDw1 hdL4m2VfcnED1utsT0nrAOCdIEOh9tG9a/up90XVG3CuWW0zfluJQSbzK8o3lAMxzDDA E3cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=mtok9cOV/Xjmf1eZxvNkKbdmQ7pn1TbnNPrY58S9GX4=; b=rklwdS2IP1mcUnwrcJpWi/gk0EEMUc1/delYoar/Q39gIDuPUWo+/R8xRk/oXo4Mmx 2u9pZICD9tvdYLOj0RrGW+/8HIINDf7oZ0wG95gBsud/yEekkHjcgvVMSCzwgPRmtkEk I2A6imcioahtNe5YuvvJh15U28pnU4bZQUaAbnLyWoR5qheM59zJ1D8mg0PmvZgrBo5N DsX8e8j6GbvCDfcYG2FCy9qNm7x8osTDv64xx9GvzUEdy/OoPu4rDCxD4Th+dmaoGlLY AD8fEM6ywDuiyuU9Y/vJUqxALsFyG8rGHuo0a19vIg3/1UH+nZd2Fyi3kup1JwEfkCGh /qlA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g19-v6si3671077pgv.138.2018.08.29.07.36.04; Wed, 29 Aug 2018 07:36:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728493AbeH2Sbj (ORCPT + 99 others); Wed, 29 Aug 2018 14:31:39 -0400 Received: from foss.arm.com ([217.140.101.70]:55828 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727444AbeH2Sbj (ORCPT ); Wed, 29 Aug 2018 14:31:39 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6732180D; Wed, 29 Aug 2018 07:34:25 -0700 (PDT) Received: from [10.33.0.154] (e111474-lin.blackburn.arm.com [10.33.0.154]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 691243F557; Wed, 29 Aug 2018 07:34:23 -0700 (PDT) Subject: Re: [PATCH v2] perf: Support for Arm A32/T32 instruction sets in CoreSight trace To: Kim Phillips Cc: Mathieu Poirier , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin , Jiri Olsa , Namhyung Kim , mike.leach@linaro.org, coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <1535535863-1818-1-git-send-email-robert.walker@arm.com> <20180829084943.eca3716eb2a2141e5eb8e6ee@arm.com> From: Robert Walker Message-ID: <8ff74d1f-e211-7423-2ad4-35369444488e@arm.com> Date: Wed, 29 Aug 2018 15:34:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180829084943.eca3716eb2a2141e5eb8e6ee@arm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kim, On 29/08/18 14:49, Kim Phillips wrote: > On Wed, 29 Aug 2018 10:44:23 +0100 > Robert Walker wrote: > >> This patch adds support for generating instruction samples from trace of >> AArch32 programs using the A32 and T32 instruction sets. >> >> T32 has variable 2 or 4 byte instruction size, so the conversion between >> addresses and instruction counts requires extra information from the trace >> decoder, requiring version 0.9.1 of OpenCSD. A check for the new struct >> member has been added to the feature check for OpenCSD. >> >> Signed-off-by: Robert Walker >> --- > ... >> +++ b/tools/build/feature/test-libopencsd.c >> @@ -3,6 +3,13 @@ >> >> int main(void) >> { >> + /* >> + * Requires ocsd_generic_trace_elem.num_instr_range introduced in >> + * OpenCSD 0.9 > 0.9 != 0.9.1 in the above commit text: which is it? I'll change it to 0.9.1 if there's another version of the patch (it was introduced in 0.9, but 0.9.1 has a necessary bug fix) >> + */ >> + ocsd_generic_trace_elem elem; >> + (void)elem.num_instr_range; >> + > This breaks building against older versions of OpenCSD, right? > >> (void)ocsd_get_version(); > Why don't we maintain building against older versions of the library, > and use the version information to make the decision on whether to use > the new feature being introduced in this patch? The intention is to fail the feature detection check if the older version is installed - perf will still compile, but without the CoreSight trace support. OpenCSD is still in development, so new features like this are being added and it would add a lot of #ifdef mess to the perf code to continue to support any machines with the old library version installed - there will only be a handful of machines affected and it's trivial to upgrade them (the new Debian packages are available).  How long would we continue to support such an older version?  I also don't see any precedent for supporting multiple dependent library versions in perf. > > Thanks, > > Kim Regards Rob