Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1176836ybk; Sun, 10 May 2020 08:27:38 -0700 (PDT) X-Google-Smtp-Source: APiQypJXijf1G8WUNjpIIlf/SoP8vg4S8B9LUC2eoQBfng92OqT6KqmdWis0nIKXy4KGPA4kP4V+ X-Received: by 2002:a17:906:951:: with SMTP id j17mr5404378ejd.352.1589124458455; Sun, 10 May 2020 08:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589124458; cv=none; d=google.com; s=arc-20160816; b=gwTsvanLAqrgL2z8smzhaZhxPFjtcUucOZEc61NcGeH2oHj5dc61j07C2uiGt+j5ca cDC9xiaKIkZxBZ8Omy9RdeVANKl3+M51WpV4hm4jOTQ17bJEDng7DLijTGI9sUr04On2 6WsdsnGQMafoq0YD2zL7Rpu3ohCA+MSp2IbrKZo0/WSf143a2iRQIm2N5ZE2JA1CoMif eQ/C0VOj8SaZexVHQ/fkUl8s5hv/R9qP0qRfkvuXmxG4/+9+3d8vkOfrXgeBgRQqqkYn /GINpuGMC20MlI0rWmnUDrLjZPFyWQXeJ6VkgtM0t5AZt2FfHeiUoeGU6Ecp/TJVkDSW B90Q== 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=FVc0eNnqKztXHqV4CYXLZC5COzafEr7TxM95j14dVTs=; b=KulME3Mk9dPdwH7HOEXf21A7hF9aa6tvx7y75tqgnisyFj/3xT1oC3yukfdsR7CgMW QAVuRSRrtwr+5AWCuLBrHO6kkRXB7eDCzkUAOfxyvIBzORBKKMMq59ApUUxLeI0TbAhT 3imtCVTjxDwJyWbibrZAQaaYjP9JzFJbdSSoo8YluYzswt+KeFU+mjvk+LMdNFiIG+BV 4vzdp8uLAwjCFmjYtXIv/YdXsNEshN7+9/+6hPvbIK1dsESAAm1oKhO3xAHvr8Rog74D IFqUNiNbcFZ3f7W8Cdb+C1+FbqFCS4kHF7S+GMddWHYC9S7HqfzfsyXVx4xItnOrUfEh uoLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id yc25si1047771ejb.373.2020.05.10.08.27.12; Sun, 10 May 2020 08:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728762AbgEJPXj convert rfc822-to-8bit (ORCPT + 99 others); Sun, 10 May 2020 11:23:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:35886 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726104AbgEJPXj (ORCPT ); Sun, 10 May 2020 11:23:39 -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 0322B20735; Sun, 10 May 2020 15:23:37 +0000 (UTC) Date: Sun, 10 May 2020 11:23:36 -0400 From: Steven Rostedt To: Changbin Du Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Namhyung Kim , linux-kernel@vger.kernel.org, "linux-trace-devel@vger.kernel.org" Subject: Re: [PATCH 00/19] perf: ftrace enhancement Message-ID: <20200510112336.444906c1@oasis.local.home> In-Reply-To: <20200510150628.16610-1-changbin.du@gmail.com> References: <20200510150628.16610-1-changbin.du@gmail.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=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 10 May 2020 23:06:09 +0800 Changbin Du wrote: > The perf has basic kernel ftrace support but lack support of most tracing > options. This serias is target to enhance the perf ftrace functionality so > that we can make full use of kernel ftrace with only perf. > > In general, this serias be cataloged into two main changes: > 1) Improve usability of existing functions. For example, we don't need to type > extra option to select the tracer. > 2) Add new options to support all other ftrace functions. > > Here is a glance of all ftrace functions with this serias: > * - improved existing options. > + - new added options. > > $ sudo perf ftrace -h > > Usage: perf ftrace [] [] > or: perf ftrace [] -- [] > > * -a, --all-cpus system-wide collection from all CPUs > + -b, --buffer-size > size of per cpu buffer in kb > -C, --cpu list of cpus to monitor > + -d, --delay Wait ms before tracing > -D, --graph-depth > Max depth for function graph tracer > * -G, --graph-funcs > Set graph filter on given functions (imply to use function_graph tracer) > -g, --nograph-funcs > Set nograph filter on given functions (imply to use function_graph tracer) > + -L, --list-functions List available functions to filter > + -l, --long-info Show process names, PIDs, timestamps, irq-info if available > -N, --notrace-funcs > do not trace given functions > + -P, --no-pager Do not use pager > -p, --pid trace on existing process id > + -s, --func-stack-trace > Show kernel stack trace for function tracer > + -t, --tid trace on existing thread id (exclusive to --pid) > -T, --trace-funcs > trace given functions only > + -u, --userstacktrace Show stacktrace of the current user space thread > -v, --verbose be more verbose > + --funcgraph-tail Show function tails comment (function_graph only) > + --latency-format displays additional information about the latency (function_graph only) > + --nofuncgraph-irqs > Ignore functions that happen inside interrupt (function_graph only) > + --nosleep-time Measure on-CPU time only (function_graph only) > + --trace-children Trace children processes > + --tracing-thresh > Only show functions of which the duration is greater than µs > Note, we are working on making more of the trace-cmd functionality into libraries. See this work here: https://lore.kernel.org/r/20191219113502.28964-2-tz.stoyanov@gmail.com Which introduces a libtracefs, that is to handle all the work needed to interact with the tracefs directory. This will also be useful for perf to read the event directory without having to open code that work. I'm all for giving perf the functionality of ftrace, but I would like to have it do so with a more generic solution that other tools could benefit from as well. Thanks! -- Steve