Received: by 10.223.148.5 with SMTP id 5csp7441898wrq; Thu, 18 Jan 2018 05:37:36 -0800 (PST) X-Google-Smtp-Source: ACJfBouoo1pXNz9pFpPE8sgEodpDa39UywVVBZv1YYXF2wQgnkpepG17aG5eeWP+O7/yc1FGIYlG X-Received: by 10.98.133.93 with SMTP id u90mr26658951pfd.134.1516282656778; Thu, 18 Jan 2018 05:37:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282656; cv=none; d=google.com; s=arc-20160816; b=f4STVJqjPmdBR7qeJBPcmgGficvQ46qrqMb8/nGEpmca44tWzmeWnI0YKFm+8YrU9y 10dZY773fWCUxzdecfxUB9hiVEAl0I+PmeMLm1GtXzQe0Zky+Vsn16j53uCMenFYpdC3 0nRVTg0XjKMVw2v+e94CTUVQjE+FQiML8sMwB13KvQ7tP6Zd04GUe8pPj0WOCMszxOtg bvoddqmH0K5NM5R7sAtHqol2hYY18p/F3eF/RoOik0WMnul0eM7dhV5+DC95bGu9I0cL y4td3mtZOikSqbw6jDlIx399m/psmTi+Qrjp/JOLpeMWWa0MldV7W3+ThdHDVUtT4Ti9 Atxg== 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:dmarc-filter:arc-authentication-results; bh=kwfFnJp0yIrnhGXiKrQU4g5EnMvf1S6wEECcH+1WDcE=; b=WYG7r9W2uCZo/uIbHzHXmygCsB9WqYEEASdoYwc2Je0V/hG7OjfNyJYk9PMeLZcTiI tIPXURF7ux5tc9UYy+DU5uMos5IcTFo6Mri+2T8nNWg33pq2n8Q3uodcyTWhKw3BSfek oGyGHILT4KBPpMxdQLo00uGFWAMsWUoo4VxcQ3Zm3+7KsKtVPz+tf9fSb4xfy9F2m2hF 0PqhCcZC3J1TQmDrHfzFO59KoVnY0VEgbJbND+bDFIkyLhwyaovmdWo2+avFcgEjDcbW EE12DmrDgRZrxnkiHfK25p0CbY31WI2oJzXOqO03wVSAqeIkvZIVEnO9WoOge7dea0bn c/+A== 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 l7si5952990pgs.316.2018.01.18.05.37.22; Thu, 18 Jan 2018 05:37:36 -0800 (PST) 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 S1756249AbeARNgJ (ORCPT + 99 others); Thu, 18 Jan 2018 08:36:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:53594 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756341AbeARNgH (ORCPT ); Thu, 18 Jan 2018 08:36:07 -0500 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 4B1C321742; Thu, 18 Jan 2018 13:36:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4B1C321742 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=acme@kernel.org Received: by jouet.infradead.org (Postfix, from userid 1000) id 3ACE2144427; Thu, 18 Jan 2018 10:36:03 -0300 (-03) Date: Thu, 18 Jan 2018 10:36:03 -0300 From: Arnaldo Carvalho de Melo To: Arnaldo Carvalho de Melo Cc: Mathieu Poirier , peterz@infradead.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, namhyung@kernel.org, adrian.hunter@intel.com, mike.leach@arm.com, suzuki.poulosi@arm.com, jolsa@redhat.com, kim.phillips@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v3 00/10] perf tools: Add support for CoreSight trace decoding Message-ID: <20180118133603.GB18383@kernel.org> References: <1516211539-5166-1-git-send-email-mathieu.poirier@linaro.org> <20180117200440.GH12842@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180117200440.GH12842@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Jan 17, 2018 at 05:04:40PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Wed, Jan 17, 2018 at 10:52:09AM -0700, Mathieu Poirier escreveu: > > This patchset adds support for per-thread CoreSight trace decoding from the > > "perf report" interface. It is largely modelled on what has been done for > > intelPT traces and currently targets the ETMv4 architecture. Support for > > cpu-wide scenarios and ETMv3/PTMv1.1 will follow shortly. > > > > The trace decoding support is done using the Open CoreSight Decoding > > Library (openCSD), a stand alone open source project available here [1]. > > Integration of the openCSD library with the perf tools follow what has > > been done for other support libraries. If the library has been installed > > on a system the build scripts will automatially include support for > > CoreSight trace decoding. The status of the library on the system is > > displayed when adding the VF=1 option as per Jiri's patch [2]: > > > > ... timerfd: [ on ] > > ... sched_getcpu: [ on ] > > ... sdt: [ OFF ] > > ... setns: [ on ] > > ... libopencsd: [ on ] <--- > > > > Instructions on how to build and install the openCSD library are provided > > in the HOWTO.md of the project repository. We elected to keep the decoder > > library independent of the kernel tree as it is also used outside of the > > perf toolset and various non-linux projects. > > > > The work applies cleanly to [3] and depend on the following patches [4, 5]. > > > > Lastly there is a divergence of opinions on whether the decoding library > > should be part of the kernel tree or live on its own as we chose to do - > > your point of view on the matter would be greatly appreciated. > > We have all sorts of models with perf: > > 1) Code that perf has that other projects expressed interest in using in > the past but that we so far failed to make generic in a way that > external projects could use, with proper versioning, etc. > > It lives in tools/perf/util/ but should move to tools/lib/ while > transitioning in the direction of a lib external projects could use > (evsel, evlist, for instance). I'm not in a hurry to make that happen, > lots of other stuff sucking my time. > 2) Code that we moved to tools/lib/ and that are since being used by > other projects, such as tools/lib/subcmd/ that is used by tools/objtool/ > 3) Code that we started directly in tools/lib/ and that now are even > maintained outside the perf tools group, but continue being used by > perf, such as tools/lib/bpf/ > 4) Code that we try to share with the kernel, but using a copy that we > automatically check for drift so that we can analyse how to update our > copy, such as tools/include/ and tools/lib/rbtree.c > And of course we use a ton of external libraries, some that are mature, > like the elf libraries and that probably people are used to have > installed already and some that are more recent, like libbabeltrace. > Then there is the public you want to please, how easy they will find to > use your work, think of what would happen if Linus Torvalds or Ingo > Molnar would try to, out of the blue, use this ARM trace decoding > support in perf, would they get it working super fast and without the > slighest amount of hassle? > If you think they would be pleased, you're on to a winner! :-) To make things clearer, I don't think you have to include this in the kernel sources if you don't want to, we've been accomodating multiple ways of doing this integration. I'll make some comments on the other thread about feature detection. - Arnaldo