Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp177096ybh; Fri, 17 Jul 2020 23:53:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgxElfFS2GetqK8cUhobBliqaiVNtYXPFMOK/ZoXPgDHYMk9PDR+WXYpYfver3rIzr6NiE X-Received: by 2002:a50:9f6a:: with SMTP id b97mr12280173edf.322.1595055228067; Fri, 17 Jul 2020 23:53:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595055228; cv=none; d=google.com; s=arc-20160816; b=pzI+sDAfpEi7yuHcD1HentuJ+i7T56cj0Nf8AAfKb3FrH/Vq2pCZEcC+ZzeoLBAtCO uNx8AqUIOYB9gwYYktv3Ewtc3zPENBsKrS8CqZhY0h987nTEADgtiBlEaLxUGFVhA+Rp kMRZG0Vp7vw3HGIi8LCu5mqU5VshjbqxJMoEI+GV18ni4ldZyPRT13y4Igezu5JMypdy WK4lRUo76MHg9a7LwwQOn7FK+Hsnh9+ZVjsCtf2Z3FWZ93Er54aYmjCtNtGYQhRs0Wh1 LmZ5WObX+UD8eD3dRMG+sczz2vtXQsMu5WjUfjn+Q6Lc9Q6viPX1Ub3GcjX7VNTnmoEs lBgQ== 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:date:subject:cc:to:from :dkim-signature; bh=cSLHeLlHnsqkzyv/gBgjnRP/gYQK1GlVe1v627QurAU=; b=i3WxzLIS2i5SZCiCsNmIUk+rB0SaeUU7kSCDca9sPwNaWzqhsUKtrPgHG5bTAK9jPx PdwTeI3nuSuVuJrIXCDDd3bjA/spfYzQ30NRj+o7R3T39jWt6RmYbof0+zA2O6cmAjz+ NNHMsJAUU4T6nEoT99VhryBbtvvjT+bPlelWG+IO+g9OSBHXsuSb9X+EjAsJ2AxIIIOa DFDDN8nclOq7PsbrouBSsi6zVd38S1wIXnD2gwWwezE3QjnXdSLbk46yI+543YvtLVTT 8v3FwT6/Of4kJ8DdR4laBOcJGwPY2UISGaWkP/Y/m7nR/MBo9OHLETrHUVTnA9Wb3LKp UXmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7dqtIv2; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk23si7617959edb.219.2020.07.17.23.53.25; Fri, 17 Jul 2020 23:53:48 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=G7dqtIv2; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729147AbgGRGum (ORCPT + 99 others); Sat, 18 Jul 2020 02:50:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726641AbgGRGum (ORCPT ); Sat, 18 Jul 2020 02:50:42 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 619BFC0619D2 for ; Fri, 17 Jul 2020 23:50:42 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id o1so6351370plk.1 for ; Fri, 17 Jul 2020 23:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cSLHeLlHnsqkzyv/gBgjnRP/gYQK1GlVe1v627QurAU=; b=G7dqtIv2Cd57gGa+ocMkla7D7MvKXCuphdnk+pWcrPATC06Dpi5Vjk2O6VbGFTZXCo Md8Kb5e0oBCI5gfylCl5eUe3OQOjHZrxpJ1fF1N4MCs8CaWoprITXwDOvbxoNAQZiCNQ mUQGz83Wvtz5CLK0F/82Iq8Q8l/qaeUsjAexF8FeV7OXK9XlDrQircHgkNSj7JM/9tXN AHtHEEULoI7HVHkES/C/z7XJYt8xYvNKGQ+Gihkhgzl0jAR1PfWlbKgki9z8lSJy1Prh UjA+6oUlhW8d4ao8rrBABvVj5D9S1MQD0gMv0Qb8cEjxc9TBXYGhMIkQt8Vm2Wlplt/Y JRlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cSLHeLlHnsqkzyv/gBgjnRP/gYQK1GlVe1v627QurAU=; b=t4l0A2hycOnhhRxxdvVAYVdtaW1o0h9C7FhL9R/a2yspE9wbhaz84SHyh2HZSSKohR R+UVPcata4GbSH+y6r1QxzWZaaDyl68WrQHI3Cb4k2a+49XlsIx+FPzndliFclPrSgUz aWX1vp/SuXeGdVDK52kI6FRiLfg6L6clt5AwxNg9Wt+oH64Sl2SCBi/UjUWXHkYKhFQ0 SyaFoi2ikdEzBXxz2ofQ7SK7LYHIDq7axDDeQTj2gEKnJTIWDQA4vMhaQD686slXBlhI 1Q58Uiri3myvvByoywBoQUNW+WjPwKxgtJi/qyAKDO3q9yqPpTjFOjHcaBho9+rA3gVH hrOg== X-Gm-Message-State: AOAM533hqiuTYWNX7MOeiEoOZBuiBRdvf8yjcNA8MFKR0OXG7XDrP+6f 8h997Q7KVsdbRMn8Z+txezM= X-Received: by 2002:a17:90a:2b0f:: with SMTP id x15mr8330485pjc.230.1595055041937; Fri, 17 Jul 2020 23:50:41 -0700 (PDT) Received: from vultr.guest ([149.248.10.52]) by smtp.gmail.com with ESMTPSA id q10sm10422781pfk.86.2020.07.17.23.50.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jul 2020 23:50:41 -0700 (PDT) From: Changbin Du To: Jiri Olsa , Arnaldo Carvalho de Melo Cc: Peter Zijlstra , Ingo Molnar , Namhyung Kim , Steven Rostedt , linux-kernel@vger.kernel.org, Changbin Du Subject: [PATCH v7 14/18] perf: ftrace: allow set graph depth by '--graph-opts' Date: Sat, 18 Jul 2020 14:48:22 +0800 Message-Id: <20200718064826.9865-15-changbin.du@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200718064826.9865-1-changbin.du@gmail.com> References: <20200718064826.9865-1-changbin.du@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is to have a consistent view of all graph tracer options. The original option '--graph-depth' is marked as deprecated. Signed-off-by: Changbin Du --- tools/perf/Documentation/perf-ftrace.txt | 5 +---- tools/perf/builtin-ftrace.c | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools/perf/Documentation/perf-ftrace.txt index 96e5e8d7f65c..6f17939b8789 100644 --- a/tools/perf/Documentation/perf-ftrace.txt +++ b/tools/perf/Documentation/perf-ftrace.txt @@ -95,16 +95,13 @@ OPTIONS This can be used more than once to specify multiple functions. It will be passed to 'set_graph_notrace' in tracefs. --D:: ---graph-depth=:: - Set max depth for function graph tracer to follow - --graph-opts:: List of options allowed to set: nosleep-time - Measure on-CPU time only for function_graph tracer. noirqs - Ignore functions that happen inside interrupt. verbose - Show process names, PIDs, timestamps, etc. thresh= - Setup trace duration threshold in microseconds. + depth= - Set max depth for function graph tracer to follow. SEE ALSO -------- diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c index 5d948239bd70..3ddd7568b456 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -750,6 +750,7 @@ static int parse_graph_tracer_opts(const struct option *opt, { .name = "noirqs", .value_ptr = &ftrace->graph_noirqs }, { .name = "verbose", .value_ptr = &ftrace->graph_verbose }, { .name = "thresh", .value_ptr = &ftrace->graph_thresh }, + { .name = "depth", .value_ptr = &ftrace->graph_depth }, { .name = NULL, } }; @@ -801,10 +802,8 @@ int cmd_ftrace(int argc, const char **argv) parse_filter_func), OPT_CALLBACK('g', "nograph-funcs", &ftrace.nograph_funcs, "func", "Set nograph filter on given functions", parse_filter_func), - OPT_INTEGER('D', "graph-depth", &ftrace.graph_depth, - "Max depth for function graph tracer"), OPT_CALLBACK(0, "graph-opts", &ftrace, "options", - "graph tracer options, available options: nosleep-time,noirqs,verbose,thresh=", + "graph tracer options, available options: nosleep-time,noirqs,verbose,thresh=,depth=", parse_graph_tracer_opts), OPT_CALLBACK('m', "buffer-size", &ftrace.percpu_buffer_size, "size", "size of per cpu buffer", parse_buffer_size), -- 2.25.1