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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-a17f06978769735ab5c7598c46881fa201e9b1a2@git.kernel.org>
Date:   Tue, 29 Aug 2017 14:20:19 -0700
From:   tip-bot for Jiri Olsa <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     a.p.zijlstra@...llo.nl, mark.rutland@....com, dsahern@...il.com,
        namhyung@...nel.org, andi@...stfloor.org, hpa@...or.com,
        acme@...hat.com, tglx@...utronix.de, linux-kernel@...r.kernel.org,
        mingo@...nel.org, alexander.shishkin@...ux.intel.com,
        jolsa@...nel.org
Subject: [tip:perf/core] perf record: Set read_format for inherit_stat

Commit-ID:  a17f06978769735ab5c7598c46881fa201e9b1a2
Gitweb:     http://git.kernel.org/tip/a17f06978769735ab5c7598c46881fa201e9b1a2
Author:     Jiri Olsa <jolsa@...nel.org>
AuthorDate: Thu, 24 Aug 2017 18:27:31 +0200
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 28 Aug 2017 11:05:10 -0300

perf record: Set read_format for inherit_stat

Set read_format for what we expect to get from read event generated by
perf_event_attr::inherit_stat.

Signed-off-by: Jiri Olsa <jolsa@...nel.org>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: http://lkml.kernel.org/r/20170824162737.7813-5-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/evsel.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index a5888c7..d9bd632 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -902,8 +902,13 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
 	if (opts->no_samples)
 		attr->sample_freq = 0;
 
-	if (opts->inherit_stat)
+	if (opts->inherit_stat) {
+		evsel->attr.read_format |=
+			PERF_FORMAT_TOTAL_TIME_ENABLED |
+			PERF_FORMAT_TOTAL_TIME_RUNNING |
+			PERF_FORMAT_ID;
 		attr->inherit_stat = 1;
+	}
 
 	if (opts->sample_address) {
 		perf_evsel__set_sample_bit(evsel, ADDR);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ