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>] [day] [month] [year] [list]
Date:	Sat, 20 Feb 2016 03:34:58 -0800
From:	tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	namhyung@...nel.org, tglx@...utronix.de, mingo@...nel.org,
	steven@...inklabs.net, hpa@...or.com, wangnan0@...wei.com,
	adrian.hunter@...el.com, acme@...hat.com, jolsa@...nel.org,
	linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf tests: Use perf_evlist__strerror_open()
  to provide hints about max_freq

Commit-ID:  6880bbf96930ec6f8b40b5b93f21973f3297672a
Gitweb:     http://git.kernel.org/tip/6880bbf96930ec6f8b40b5b93f21973f3297672a
Author:     Arnaldo Carvalho de Melo <acme@...hat.com>
AuthorDate: Thu, 18 Feb 2016 13:40:57 -0300
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Fri, 19 Feb 2016 19:12:43 -0300

perf tests: Use perf_evlist__strerror_open() to provide hints about max_freq

Before:

  # perf test -v "code reading" 2>&1 | tail -4
  perf_evlist__open failed
  test child finished with -1
  ---- end ----
  Test object code reading: FAILED!
  #

After:

  # perf test -v "code reading" 2>&1 | tail -7
  perf_evlist__open() failed!
  Error: Invalid argument.
  Hint:  Check /proc/sys/kernel/perf_event_max_sample_rate.
  Hint:  The current value is 1000 and 4000 is being requested.
  test child finished with -1
  ---- end ----
  Test object code reading: FAILED!
  #

Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Namhyung Kim <namhyung@...nel.org>
Cc: Steven Noonan <steven@...inklabs.net>
Cc: Wang Nan <wangnan0@...wei.com>
Link: http://lkml.kernel.org/n/tip-ifbx7vmrc38loe6317owz2jx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/tests/code-reading.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/tools/perf/tests/code-reading.c b/tools/perf/tests/code-reading.c
index 313a48c..f84339c 100644
--- a/tools/perf/tests/code-reading.c
+++ b/tools/perf/tests/code-reading.c
@@ -559,7 +559,13 @@ static int do_test_code_reading(bool try_kcore)
 				evlist = NULL;
 				continue;
 			}
-			pr_debug("perf_evlist__open failed\n");
+
+			if (verbose) {
+				char errbuf[512];
+				perf_evlist__strerror_open(evlist, errno, errbuf, sizeof(errbuf));
+				pr_debug("perf_evlist__open() failed!\n%s\n", errbuf);
+			}
+
 			goto out_put;
 		}
 		break;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ