Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751437AbdGNFw6 (ORCPT ); Fri, 14 Jul 2017 01:52:58 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:34747 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750763AbdGNFw4 (ORCPT ); Fri, 14 Jul 2017 01:52:56 -0400 Subject: Re: [PATCH] usb: gadget: functions: add ftrace export over USB To: Felipe Balbi , Alexander Shishkin , Steven Rostedt , Ingo Molnar References: <20170609061327.17899-1-felipe.balbi@linux.intel.com> <87mv9hqwt8.fsf@linux.intel.com> Cc: Linux USB , linux-kernel@vger.kernel.org, Chunyan Zhang From: Pratyush Anand Message-ID: <78398669-55b1-a4be-4864-9a3a4ed0707c@redhat.com> Date: Fri, 14 Jul 2017 11:22:51 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <87mv9hqwt8.fsf@linux.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1740 Lines: 43 Hi Felipe, On Friday 09 June 2017 03:58 PM, Felipe Balbi wrote: > Felipe Balbi writes: > >> Allow for ftrace data to be exported over a USB Gadget >> Controller. With this, we have a potentially very fast pipe for >> transmitting ftrace data to a Host PC for further analysis. >> >> Note that in order to decode the data, one needs access to kernel >> symbols in order to convert binary data into function names and what >> not. >> >> Signed-off-by: Felipe Balbi >> --- >> >> I wanted to take this through the gadget tree, but there is a >> dependency with a previous patch of mine adding and extra argument to >> the ->write() function. Hoping someone else will take it. > > just as an extra note here. In order for this to be really useful, it > would be nice to be able to control what is going to be traced over USB Probably you will also need to export *atleast* symbol information. In future, if this framework is extended to export tracepoint/kprobe/uprobe event data, then the information like event format etc will also need to be exported. What tool do you use on host machine in order to extract information from this exported target ring buffer data? IMHO, standard tools like trace-cmd will not be able to use it as it is. > as well, but that means exporting a few extra functions to GPL drivers. > > Would that be okay? I could have a set of vendor-specific control > requests to set buffer size and to read/write ftrace filter functions. > > The idea is that things like e.g. Android SDK could rely on this on > debug builds and the SDK itself would make sure to keep a copy of > vmlinux around to processing of the data coming through USB. > -- Pratyush