Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2557624ybm; Thu, 23 May 2019 20:08:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrmIAsANTRvyOyKywURss7+robdu1Vanft+qgrP4ylSmtLJ1BasoW95zszuW8w0ItO+hnn X-Received: by 2002:a17:902:e28a:: with SMTP id cf10mr100889990plb.77.1558667308183; Thu, 23 May 2019 20:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558667308; cv=none; d=google.com; s=arc-20160816; b=FCGL20mogoyDVakjaZFlpBJBJuRF5pr7+jT83bBUk3PrHjfQN4lZhgyc1M4L80Hrv5 tMzFawOUz481VDbHfA1d7Vo5k3IBTpGagKe3Q6dDeDWZTQCXTXw3eKJqnsOPJmvzA88G P5vS+kfBfa816eSg+Xi7JTiQ9K4letZ39r9GFpB+leUGBDxf4ljy79NWaVEZX0LM68rY FZPf9jhMhDCLphtic1eSgkKhqdmvKU/9xdvs2pjvWAKpe3myji/CzhA1MavcVp/vnXaL ioV7Q/n/4Mbp+Ocn8v022FPC7U/E0DjmRljxhXgrr241bxEjUNgw3R3stbR8b/IMuHPb bCJA== 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:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=nvvIQXI74Gqqj3aNyD31TsjZd6dcR/B7PHGliInAbN4=; b=q9+cd0hp8yeCMELnW4mmKtpOi6BeMqb1zrt3cZumgl4G3ZUSbaT2BNP/C2V8b52xjY yjHoJIk3useOxeL3FSQGYc+P4dtfU9LwOuiKhNNKN7mcP7kgM62d6N58+a+Y06dl6HG0 bj6JAPHji/iEwrYAtkLfOo/kV669F6kEumJu6WB1peKrIPn8iZGbot/DEzU/IcjkqeLw 3z8ZOU+UHHJElETRK7rPqeHf89SVfrb1MN+NCAjiasAIYZZG2KHRfseADllvOamj1k8W pqg52PsLYYhkdzAHtOa2DRxGrF7vOL6vzqwKP8t7ctnFsd01cQuy5IHj5MO4JSnpjtn5 L2Rw== 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 b3si2572859plk.200.2019.05.23.20.08.07; Thu, 23 May 2019 20:08:28 -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 S2388093AbfEXDFT (ORCPT + 99 others); Thu, 23 May 2019 23:05:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:38642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387434AbfEXDFT (ORCPT ); Thu, 23 May 2019 23:05:19 -0400 Received: from oasis.local.home (cpe-66-24-58-225.stny.res.rr.com [66.24.58.225]) (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 2B18B205ED; Fri, 24 May 2019 03:05:17 +0000 (UTC) Date: Thu, 23 May 2019 23:05:15 -0400 From: Steven Rostedt To: Felipe Balbi Cc: Ingo Molnar , linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, Divya Indi Subject: Re: [RFC] Allowing modules to control tracing subsystem Message-ID: <20190523230515.01c5f58a@oasis.local.home> In-Reply-To: <87k1gdezb4.fsf@linux.intel.com> References: <87h8bvffth.fsf@linux.intel.com> <87k1gdezb4.fsf@linux.intel.com> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 02 Apr 2019 08:44:31 +0300 Felipe Balbi wrote: > Hi, > > Felipe Balbi writes: Hi Felipe, I somehow missed both your original email and this gentle reminder. > > Hi guys, > > > > I've been thinking about turning my f-trace.c USB function [1] into an > > implementation of the USB Debug Class [2]. In order to support all > > requests, I would need means to control parts of the tracing subsystem, > > for example enabling and disabling tracing, flushing the trace buffer, > > changing trace buffer size, choose which trace events to enable, etc. I believe a lot of these are already available. Also note, that Divya made it possible to have your own tracing instance for a module. > > > > Some of those functions (e.g. print_trace_line()) are available for > > things like trace_kdb.c [3], but they're not available for modules; > > i.e. they're not exported symbols. > > > > This will involve a rather large change to tracing subsystem however we > > could rely on such infrastructure for remote debugging of e.g. IVIs, > > phones, etc. > > > > The USB Debug Class already predicts the presence of JTAG access and > > Hardware tracing modules to be exported over USB. It also allows for > > GDB-type access. Adding our linux kernel tracing would make it into a > > complete tracing solution. > > > > In order to fully support this we would need, not only to expose some > > internal trace functions for modules, but I suppose the trace format > > would have to be slightly better defined so that it be decoded remotely > > give access to vmlinux. > > > > What do you guys think about this? Would this be something that folks > > would be interested in? Currently we can only export ftrace data, not > > trace events or anything else. Ideally we would export raw trace buffer > > entries to be decoded at a later moment. > > Let me know what changes are needed and we can work something out. Sorry for the delay, it appears I missed quite a bit of emails in this period :-/ -- Steve > > cheers > > > > [1] https://marc.info/?i=20190321094748.7031-1-felipe.balbi@linux.intel.com > > [2] https://www.usb.org/sites/default/files/documents/usb_debug_class_rev_1_0_final_0.pdf > > [3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/trace/trace_kdb.c#n20 > > A gentle reminder here. >