Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp714132ybt; Wed, 8 Jul 2020 09:52:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfpW8uS5IzWxc7n6BgJ3RmGhjW4l6ZeaUE/JQzcSaoPi/h+NM6Q+FZecigoLYNYIoTU7/l X-Received: by 2002:a50:e387:: with SMTP id b7mr66218219edm.190.1594227144005; Wed, 08 Jul 2020 09:52:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594227143; cv=none; d=google.com; s=arc-20160816; b=TTAu8kyMyNxK2XZMh75T20ZrhMQz2nFMZGu7Xhubpy+HwNnetAr8A2T03ADzQOyteg uDzhxK7S9kFdTISNMmVNtMol0uC8tyUGbdbjgdtsMzS4gWE3WNU5Z1JipCiDU3BklCw9 opZlze1ro3uwAUuHCE3xPThYyWGiopG2Bhe1H1lnwfXgifVrX7b9efNjCd6sQF03Ydnq HzhEHgMYrsA2Mrf+0Lp0Qvrv1TdMn+O+MUZG3lbmUi7RRKR+vdr/j9P6ynqyleFWO8WA ItiqtcldqCdaj2f1FJZQ0vjbx80T5AFg117fccdpPAJA/k5wFXwDqa8QPWig1SkhISzi VW2w== 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=3HQGnYb9pZsxftO4JJWykAsPx8KEJzL34JEyAYFl3vA=; b=t495eNMnPGCYZXET672WLKaebJNVSAk063qjzt6qGunHf1lbufVq339BJyfqbqidKo NBn6SUDPhmNRUGoyQM19P7nlzwdodcuXGpxoH3czovOuEejDn29e2J93AjZTU55n38aR VB2cSTzEBGPYIQpHFEG9bsZyErkFUqc/t1g3lFjQelvSyHINDh3skwmSc+f6i9I9sSVq zNjzfHpxUqfpNFvsPVSuUmtfZU/uGMmeb8GeoO8csFZFOYry5dIf6e+HU/D/iGM/5CRY b9tCePlBFejXsdK8b6grlTYo/1RxWZH+95Vef6RJmPoTfhE9ZLR7QmibUTP4iJYcUIJG 8ogw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uSbZAATW; 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 m27si208128eja.699.2020.07.08.09.52.00; Wed, 08 Jul 2020 09:52:23 -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=uSbZAATW; 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 S1730919AbgGHQsh (ORCPT + 99 others); Wed, 8 Jul 2020 12:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730915AbgGHQsg (ORCPT ); Wed, 8 Jul 2020 12:48:36 -0400 Received: from mail-pj1-x1042.google.com (mail-pj1-x1042.google.com [IPv6:2607:f8b0:4864:20::1042]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B30F0C061A0B for ; Wed, 8 Jul 2020 09:48:36 -0700 (PDT) Received: by mail-pj1-x1042.google.com with SMTP id t15so1430560pjq.5 for ; Wed, 08 Jul 2020 09:48:36 -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=3HQGnYb9pZsxftO4JJWykAsPx8KEJzL34JEyAYFl3vA=; b=uSbZAATWMJ99oFvIx4aAjx5Pb4t7eZ//9WLMxAGpuWC1RGkOYktyuEk40sroUv9LpS MM6m1esZV1okFL7U/ICYCxDSQlxTUHaa9L4YsmcjHhV3Yr4PnxDWr/H7CTW+WkjmAA3S nDcgCDJNylEntdacV+E2dZGJN+n9DpEO+KcQwkTpiHV1fvzbCbGwg3Q+ZCf8eqHa1YCb BlgRQeHVKo7mwMJsKnLcee7nG4l/aQIGPAX0SqsF6R41N0awUkpMUSFZAGkGvDTDdLUy yF9n6v2DO7FcUHslGUV+DqLzT9HT/YM7uGxaItMZhKDt8lsj1Wderh7YU7UN1Z675vrs A+gg== 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=3HQGnYb9pZsxftO4JJWykAsPx8KEJzL34JEyAYFl3vA=; b=R5G6HAgaD+LxhAGPt1lu7Tny468QioJA9tAmz7ld32Kgn+FrLRxlzLc+DuTrLNf5Tn P+82mjxRIKkEi/wubVECbEKeOIYvCNSH6iACtaMotYp/y/oe1+4uBiMgTCR46Qs0icpF nJd5/sHhTbuocjyyhY+F9YGAF/ER5iTiQg97QJVCPpyOAWNOlBFTPphigpog/yRb2Uls 6uQgcOJXL5NpSevv9Ca5tX/im5ZnoguqlWKUkqeeJp6nKARjV3ipQ38y7j4r8WiBKAws ArMCdJ7u+3cL2oWettY4tDXNMufiJEsVED59uR46/iZiYv28hD4/sKZAQ4lltrfc93wm UAWg== X-Gm-Message-State: AOAM530MViwE9mo8DhtLo/MrAoVkHPFOTnr9w/PLFXJWtTBGhpxcTXlX MGsTMXqiojMu++a95FPGluY= X-Received: by 2002:a17:90b:3685:: with SMTP id mj5mr10479843pjb.123.1594226916299; Wed, 08 Jul 2020 09:48:36 -0700 (PDT) Received: from vultr.guest ([149.248.10.52]) by smtp.gmail.com with ESMTPSA id r8sm310803pfg.147.2020.07.08.09.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jul 2020 09:48:35 -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 v3 16/17] perf: ftrace: allow set graph depth by '--graph-opts' Date: Thu, 9 Jul 2020 00:46:04 +0800 Message-Id: <20200708164605.31245-17-changbin.du@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200708164605.31245-1-changbin.du@gmail.com> References: <20200708164605.31245-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 | 4 +++- tools/perf/builtin-ftrace.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/perf/Documentation/perf-ftrace.txt b/tools/perf/Documentation/perf-ftrace.txt index bcb1504892ef..fa99ec1ef58a 100644 --- a/tools/perf/Documentation/perf-ftrace.txt +++ b/tools/perf/Documentation/perf-ftrace.txt @@ -105,7 +105,8 @@ OPTIONS -D:: --graph-depth=:: - Set max depth for function graph tracer to follow + Set max depth for function graph tracer to follow. This option is + deprecated, use '--graph-opts depth=' instead. --graph-opts:: List of options allowed to set: @@ -113,6 +114,7 @@ OPTIONS 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 21d6d6791dc3..a20187b1556a 100644 --- a/tools/perf/builtin-ftrace.c +++ b/tools/perf/builtin-ftrace.c @@ -758,6 +758,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, } }; @@ -812,9 +813,9 @@ int cmd_ftrace(int argc, const char **argv) 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"), + "Max depth for function graph tracer (This option is deprecated)"), 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_UINTEGER('d', "delay", &ftrace.initial_delay, "ms to wait before starting tracing after program start"), -- 2.25.1