Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753101AbbH0PyL (ORCPT ); Thu, 27 Aug 2015 11:54:11 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:36558 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568AbbH0PyI (ORCPT ); Thu, 27 Aug 2015 11:54:08 -0400 MIME-Version: 1.0 In-Reply-To: <55DF2DB5.7000909@codeaurora.org> References: <1436258518-9339-1-git-send-email-zhang.chunyan@linaro.org> <1436258518-9339-3-git-send-email-zhang.chunyan@linaro.org> <55DDFE01.50201@codeaurora.org> <55DF2DB5.7000909@codeaurora.org> Date: Thu, 27 Aug 2015 09:54:07 -0600 Message-ID: Subject: Re: [PATCH 2/5] coresight-etm4x: Change the name of the ctxid_val to ctxid_pid From: Mathieu Poirier To: Christopher Covington Cc: Chunyan Zhang , Greg KH , Mark Brown , Serge Broslavsky , Lyra Zhang , "linux-arm-kernel@lists.infradead.org" , linux-api@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2501 Lines: 49 On 27 August 2015 at 09:33, Christopher Covington wrote: > On 08/27/2015 11:12 AM, Mathieu Poirier wrote: >> On 26 August 2015 at 11:57, Christopher Covington wrote: >>> On 07/07/2015 04:41 AM, Chunyan Zhang wrote: >>>> 'ctxid_val' array was used to store the value of ETM context ID comparator >>>> which actually stores the process ID to be traced, so using 'ctxid_pid' as >>>> its name instead make it easier to understand. >>> >>> Previous discussion with some ARM folks has led me to believe there isn't a >>> guarantee that the Context ID Register will always have a PID. Why not allow >>> filtering on thread group ID, session ID, cgroup related identifiers, etc.? >> >> Coresight tracers only support contextID tracing. The HW >> automatically does the match between the contextID comparator register >> in the tracer with the contextID register of the core. Tracing is >> enabled if both values match (and the tracer is configured to do so). > > Is there a reason to only ever allow Process IDs to be written into the > Coresight and CPU Context ID registers? Is there anything in the hardware that > would prevent writing, for example, Thread Group IDs into the Coresight and > CPU Context ID registers? If there's no hardware limitation, why should there > be kernel or device tree architecture that states or implies that patches to > support such a use case are unacceptable? I'm not saying your idea is unacceptable - I actually think there is value in it. At this time the scheduler will automatically write the PID to the contextID register when a task is running, a reality this feature is exploiting. There is no limitation as to what can be written to the coresight contextID register - tracing will start for as long as the values and mask are configured properly. I do not know the limitation imposed on the core's contextID register (if any). We'd also have to make sure that all the code, everywhere, relying on that information has been modified to take into account the new semantic. > > Thanks, > Christopher Covington > > -- > Qualcomm Innovation Center, Inc. > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/