lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-cff17205d6bd363703034510a84d66044aff176e@git.kernel.org>
Date:   Mon, 19 Mar 2018 23:28:31 -0700
From:   tip-bot for Yisheng Xie <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     acme@...hat.com, tglx@...utronix.de, hpa@...or.com,
        alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
        linux-kernel@...r.kernel.org, xieyisheng1@...wei.com,
        namhyung@...nel.org, mingo@...nel.org, peterz@...radead.org
Subject: [tip:perf/core] perf record: Avoid duplicate call of
 perf_default_config()

Commit-ID:  cff17205d6bd363703034510a84d66044aff176e
Gitweb:     https://git.kernel.org/tip/cff17205d6bd363703034510a84d66044aff176e
Author:     Yisheng Xie <xieyisheng1@...wei.com>
AuthorDate: Mon, 12 Mar 2018 19:25:57 +0800
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 16 Mar 2018 13:55:58 -0300

perf record: Avoid duplicate call of perf_default_config()

We have brought perf_default_config to the very beginning at main(), so
it no need to call perf_default_config() once more for most of config in
perf-record but only for record.call-graph.

Signed-off-by: Yisheng Xie <xieyisheng1@...wei.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/1520853957-36106-2-git-send-email-xieyisheng1@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/builtin-record.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index b81494587120..d33103291b02 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1279,10 +1279,12 @@ static int perf_record_config(const char *var, const char *value, void *cb)
 			return -1;
 		return 0;
 	}
-	if (!strcmp(var, "record.call-graph"))
-		var = "call-graph.record-mode"; /* fall-through */
+	if (!strcmp(var, "record.call-graph")) {
+		var = "call-graph.record-mode";
+		return perf_default_config(var, value, cb);
+	}
 
-	return perf_default_config(var, value, cb);
+	return 0;
 }
 
 struct clockid_map {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ