Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp733519ybh; Tue, 21 Jul 2020 06:43:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkMbYBB7nC+mHW4LZ0OND5o1uKN9fidaWwC4XDxEnQqx14aX+I8b8SL/AQGXUC4qVA27aZ X-Received: by 2002:a17:906:4f16:: with SMTP id t22mr24765580eju.179.1595338997732; Tue, 21 Jul 2020 06:43:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595338997; cv=none; d=google.com; s=arc-20160816; b=iD4kFdn3RtlnxlcrrtgjVO1bV5ux3TPwQwHYdVDRBP+yid3RXBkEi6Sp0OXAazMQLJ 573a2s/huaGFz7xt4pqG4pNzix7aM62WXP3KKn6hdm6cnQg+VqjSHeQI9VW+LGhkd2Np xMI9FtMv4tsMpraD5nu3PWzYr6s+1sBL//RipHdiaxIDDvd3QzG2SuoiH6pDyvU8Yaku yxhDhImj0NrwsEnXZCdbUKKh9k+7BPO+mhE8qYHAZ7njIyX7iyeLl+1UA+aT/prF8mzb +v81gzFRfEUb2MfOyMutbV5bVUYOndszpCDe+OoO5QBNDKQt+BYsgjD67YE5/M/9RTV4 TD0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+EynrwAgZ+BIcVK8jOHfPKfboNTbROApvtg8PYw4Yzk=; b=QJXgCtp68k4Jc9tJKAZxeEsN0qON3KmZWBO8jhaIXz3WZyYHeic8Y5bQWLImdmDczN kBs55vIYMj+IqlmOWwt4G6h1jenUcZMnFPNXWz4zcoSYhrCaWBFBkDLEa+5F7XTi6XuH OimmHAcZi7egBlHGtUk9iFS1GwkPk5O6uyfDjlFTa7Zj0h8O/05MSL/1sQkfUe4h1tTw V1FiVuFcdCdWpnevoMf85iPxqiiaMUlVeA0njSfGo4D28QSXwrwjue501eYpvwjL6RsT 6DdVRimRUAlp4yKs0mQ53bq7pxIngwr87R3WcdauBznZ6KLyo16y+bz44JT5vgdPP5aQ 3egQ== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c20si12577482edj.314.2020.07.21.06.42.54; Tue, 21 Jul 2020 06:43:17 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728538AbgGUNjr (ORCPT + 99 others); Tue, 21 Jul 2020 09:39:47 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39551 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728477AbgGUNjr (ORCPT ); Tue, 21 Jul 2020 09:39:47 -0400 Received: by mail-wr1-f67.google.com with SMTP id q5so21239288wru.6 for ; Tue, 21 Jul 2020 06:39:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+EynrwAgZ+BIcVK8jOHfPKfboNTbROApvtg8PYw4Yzk=; b=aa5DXzi4KmKVOZWF8Eypoee/j7sBRa8UFBg2S/TwXg9Phk+m3ApW8eRyApoGfZ7GwP J7SAU2g1TZjj1tkZvn9vA3KXeicBw/d+oR+PqKCDb2hdty0ava7lpno4ze/SmISCc0ny LVlbKn8uOWP5ZrcUHkHz0otJ7pTowORnCRqbRIkg8BkanruXi+ypTqCD2s7qsi+Ybwmw vSGkb/RKKXlQE4QQmHrzd+m4Trb9+2GB8XU7TcslN1w74JuJzJPl6IqgxCsnBgV719VE qeXi6nD+qJsbIWybfq8rMHmtj8nsro5eVprmginq2BWUJl0SW6ZyNimllmsPtdzZmCzq 5TEQ== X-Gm-Message-State: AOAM530HmL+jFhNSGvX4Z4bIEOe58g7a+KiWaasAHKcEH9xJT3KatoQv gfqIe9Nq//CXefOgug0pDqOoJaokkPVmtXk1/0Y= X-Received: by 2002:adf:dfd0:: with SMTP id q16mr954300wrn.60.1595338785533; Tue, 21 Jul 2020 06:39:45 -0700 (PDT) MIME-Version: 1.0 References: <20200718064826.9865-1-changbin.du@gmail.com> In-Reply-To: <20200718064826.9865-1-changbin.du@gmail.com> From: Namhyung Kim Date: Tue, 21 Jul 2020 22:39:34 +0900 Message-ID: Subject: Re: [PATCH v7 00/18] perf: ftrace enhancement To: Changbin Du Cc: Jiri Olsa , Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Steven Rostedt , linux-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Sat, Jul 18, 2020 at 3:48 PM 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 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: > > $ sudo perf ftrace -h > > Usage: perf ftrace [] [] > or: perf ftrace [] -- [] > > -a, --all-cpus system-wide collection from all CPUs > -C, --cpu list of cpus to monitor > -D, --delay ms to wait before starting tracing after program start > -F, --funcs Show available functions to filter > -G, --graph-funcs > trace given functions using function_graph tracer > -g, --nograph-funcs > Set nograph filter on given functions > -m, --buffer-size > size of per cpu buffer > -N, --notrace-funcs > do not trace given functions > -p, --pid trace on existing process id > -T, --trace-funcs > trace given functions using function tracer > -t, --tracer > tracer to use: function or function_graph (This option is deprecated) > -v, --verbose be more verbose > --func-opts > function tracer options, available options: call-graph,irq-info > --graph-opts > graph tracer options, available options: nosleep-time,noirqs,verbose,thresh=,depth= > --inherit trace children processes > --tid trace on existing thread id (exclusive to --pid) > > v7: > o add back '--tid '. > v6: > o fix return value of read_tracing_file_to_stdout(). > o make __cmd_ftrace() shorter. > o remove option '-t, --tid '. > v5: > o trivial fixes. > v4: > o add util/parse-sublevel-options.c > O remove -D/--graph-depth > v3: > o add --func-opts and --graph-opts to set tracer specific options. > o support units as a suffix for option '-m/--buffer-size'. > v2: > o patches for option '-u/--userstacktrace' and '--no-pager' are dropped. > o update all related perf documentation. > o rename some options. Now all funcgraph tracer options are prefixed with > '--graph-', while all function tracer options are prefixed with '--func-'. > o mark old options deprecated instead of removing them. Acked-by: Namhyung Kim Thanks Namhyung > > > Changbin Du (18): > perf ftrace: select function/function_graph tracer automatically > perf ftrace: add option '-F/--funcs' to list available functions > perf ftrace: factor out function write_tracing_file_int() > perf ftrace: add option '-m/--buffer-size' to set per-cpu buffer size > perf ftrace: show trace column header > perf ftrace: add option '--inherit' to trace children processes > perf: util: add general function to parse sublevel options > perf ftrace: add support for tracing option 'func_stack_trace' > perf ftrace: add support for trace option sleep-time > perf ftrace: add support for trace option funcgraph-irqs > perf ftrace: add support for tracing option 'irq-info' > perf ftrace: add option 'verbose' to show more info for graph tracer > perf ftrace: add support for trace option tracing_thresh > perf: ftrace: allow set graph depth by '--graph-opts' > perf ftrace: add option -D/--delay to delay tracing > perf ftrace: add option --tid to filter by thread id > perf: ftrace: Add set_tracing_options() to set all trace options > perf ftrace: add change log > > tools/perf/Documentation/perf-config.txt | 5 - > tools/perf/Documentation/perf-ftrace.txt | 36 +- > tools/perf/builtin-ftrace.c | 415 +++++++++++++++++++++-- > tools/perf/util/Build | 1 + > tools/perf/util/debug.c | 61 +--- > tools/perf/util/parse-sublevel-options.c | 70 ++++ > tools/perf/util/parse-sublevel-options.h | 11 + > 7 files changed, 513 insertions(+), 86 deletions(-) > create mode 100644 tools/perf/util/parse-sublevel-options.c > create mode 100644 tools/perf/util/parse-sublevel-options.h > > -- > 2.25.1 >