summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/tests.h
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@kernel.org>2017-01-09 10:51:55 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2017-01-11 20:48:01 +0100
commit9808143ba2e54818a3cf445d9b69b3f5f15451ee (patch)
tree00c2425c5e06608fda53fc24d875cd4e1dabce63 /tools/perf/tests/tests.h
parentperf evlist: Fix typo in perf_evlist__start_workload() (diff)
downloadlinux-9808143ba2e54818a3cf445d9b69b3f5f15451ee.tar.xz
linux-9808143ba2e54818a3cf445d9b69b3f5f15451ee.zip
perf tools: Add unit_number__scnprintf function
Add unit_number__scnprintf function to display size units and use it in -m option info message. Before: $ perf record -m 10M ls rounding mmap pages size to 16777216 bytes (4096 pages) ... After: $ perf record -m 10M ls rounding mmap pages size to 16M (4096 pages) ... Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/r/1483955520-29063-2-git-send-email-jolsa@kernel.org [ Rename it to unit_number__scnprintf for consistency ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/tests.h')
-rw-r--r--tools/perf/tests/tests.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/tests/tests.h b/tools/perf/tests/tests.h
index a512f0c8ff5b..1fa9b9d83aa5 100644
--- a/tools/perf/tests/tests.h
+++ b/tools/perf/tests/tests.h
@@ -96,6 +96,7 @@ int test__perf_hooks(int subtest);
int test__clang(int subtest);
const char *test__clang_subtest_get_desc(int subtest);
int test__clang_subtest_get_nr(void);
+int test__unit_number__scnprint(int subtest);
#if defined(__arm__) || defined(__aarch64__)
#ifdef HAVE_DWARF_UNWIND_SUPPORT