Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp9007295ybi; Fri, 7 Jun 2019 01:50:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqyfR/d8U6Qz+VbIkihaMrRyt8J7CZAUeC3CVx8WZ8+C3ZQM+wZp/mPgFhHt4fW1PBNKDhbm X-Received: by 2002:aa7:8d8c:: with SMTP id i12mr30780217pfr.200.1559897418723; Fri, 07 Jun 2019 01:50:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559897418; cv=none; d=google.com; s=arc-20160816; b=xNtqzq+lpP7eu5O4izyUrVSs1x4L1kWOMddI19eJlnIAxySHNTTtBtC69ZhnDXAqAQ Wf7YOhBBnNGp93AKEOW1jeapmccwJuzO+/9Y79JwSiD87s1unujqrqPhjqdsdBx35IqF LxRutZmgPY8WLJxhs1BIyMNzcRb3au5Gcp/tjjpKHoPPR/BRSzVoYiu5zjd70L+lv6x+ or1mYfb/sg9padAeWwfq8czHuEIyvQrRbUmTsyz13C7sVQ9F9y2NncwXzXYf9UAUuXrF x7UOSSR1Sd5xGgBPB4Hja7NX22la0Zl5Ngm8lx5bssT4i23lC1c9iAwAmWsX3EaGftRT ol0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=G3P+6TFobcCeV9PZS9FFQlKX07+IbiFeHWHe/cH8tm0=; b=cOAToM+NUE+LVZJMPxgbIGVfv2ttF51q3WqWd/EHsLjV9xRqOR7k6rtLKquAr1RQYx D5/krGFnx3SFLqYS1VRO28TKwUGPdv597PwGtkfF1m9PalnxmYnCiJpvFmGivWw5KHjc mTNz3bMyBHZVEpAMie6snnbzG64fapsLeq4y8v3M6PcHQcyrt3OWw/5jBYEjdbh6gXFN EakY9k74Y06LrNhkq86fM7PKlPpLRWpmBx4MNnNwFDh39pPrryuk8jBSVYjr0KRnhjAy FgARbpIDTEJCi+hDTijdJh2sqP19k7JoHz70bYb5sLDgLkC+TXDBcaLqLRbs4DFxXRot QCEA== 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 9si1235404pjs.5.2019.06.07.01.50.02; Fri, 07 Jun 2019 01:50:18 -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 S1727330AbfFGIs4 (ORCPT + 99 others); Fri, 7 Jun 2019 04:48:56 -0400 Received: from foss.arm.com ([217.140.110.172]:35822 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726531AbfFGIsz (ORCPT ); Fri, 7 Jun 2019 04:48:55 -0400 X-Greylist: delayed 484 seconds by postgrey-1.27 at vger.kernel.org; Fri, 07 Jun 2019 04:48:55 EDT Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3228D344; Fri, 7 Jun 2019 01:40:51 -0700 (PDT) Received: from [10.1.196.93] (en101.cambridge.arm.com [10.1.196.93]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5A3CB3F246; Fri, 7 Jun 2019 01:40:50 -0700 (PDT) Subject: Re: [PATCH] Documentation: coresight: Update the generic device names To: leo.yan@linaro.org Cc: mathieu.poirier@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, corbet@lwn.net References: <1559229077-26436-1-git-send-email-suzuki.poulose@arm.com> <20190603190133.GA20462@xps15> <99055755-6525-694e-a15d-5de7318a80da@arm.com> <20190607022136.GE5970@leoy-ThinkPad-X240s> From: Suzuki K Poulose Message-ID: <78c98c28-4f3f-825b-18e1-c71fb63a80eb@arm.com> Date: Fri, 7 Jun 2019 09:40:48 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190607022136.GE5970@leoy-ThinkPad-X240s> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leo, >>>> A Coresight PMU works the same way as any other PMU, i.e the name of the PMU is >>>> listed along with configuration options within forward slashes '/'. Since a >>>> Coresight system will typically have more than one sink, the name of the sink to >>>> -work with needs to be specified as an event option. Names for sink to choose >>>> -from are listed in sysFS under ($SYSFS)/bus/coresight/devices: >>>> +work with needs to be specified as an event option. >>>> +On newer kernels the available sinks are listed in sysFS under: >>>> +($SYSFS)/bus/event_source/devices/cs_etm/sinks/ >>>> - root@linaro-nano:~# ls /sys/bus/coresight/devices/ >>>> - 20010000.etf 20040000.funnel 20100000.stm 22040000.etm >>>> - 22140000.etm 230c0000.funnel 23240000.etm 20030000.tpiu >>>> - 20070000.etr 20120000.replicator 220c0000.funnel >>>> - 23040000.etm 23140000.etm 23340000.etm >>>> + root@localhost:/sys/bus/event_source/devices/cs_etm/sinks# ls >>>> + tmc_etf0 tmc_etr0 tpiu0 >>>> - root@linaro-nano:~# perf record -e cs_etm/@20070000.etr/u --per-thread program >>>> +On older kernels, this may need to be found from the list of coresight devices, >>>> +available under ($SYSFS)/bus/coresight/devices/: >>>> + >>>> + root@localhost:/sys/bus/coresight/devices# ls >>>> + etm0 etm1 etm2 etm3 etm4 etm5 funnel0 funnel1 funnel2 replicator0 stm0 tmc_etf0 tmc_etr0 tpiu0 >>>> + >>>> + root@linaro-nano:~# perf record -e cs_etm/@tmc_etr0/u --per-thread program >>> >>> On the "older" kernels you are referring to one would find the original naming >>> convention. Everything else looks good to me. >> >> True, but do we care what we see there ? All we care about is the location, >> where to find them. I could fix it, if you think thats needed. > > IIUC, either the old kernel or newer kernel, both we can find the event > from ($SYSFS)/bus/event_source/devices/cs_etm/sinks/; the only > difference between them is the naming convention. The cs_etm/sinks was only added with the CPU-wide trace support. So, if someone refers to this document alone and then tries to do something on on older kernel, which is quite possible for a production device running a stable kernel, {s,}he might be surprised. > > So the doc can use the same location to find event for both new and > old kernel, and explain the naming convention difference? My question is really, does the naming convention matter ? What you see under the directory is the name. But yes, I am open to add a section to explain the fact that we changed the naming scheme, if everyone agrees to it. Cheers Suzuki