Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1584846 > unrolled thread
| Started by | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| First post | 2017-02-20 20:20 +0100 |
| Last post | 2017-02-21 09:10 +0100 |
| Articles | 12 — 5 participants |
Back to article view | Back to linux.kernel
[GIT PULL 00/18] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-20 20:20 +0100
[PATCH 16/18] perf diff: Add -q/--quiet option Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-20 20:20 +0100
[PATCH 12/18] perf record: Add -a as default target Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-20 20:20 +0100
[PATCH 15/18] perf report: Add -q/--quiet option Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-20 20:20 +0100
Re: [PATCH 11/18] perf stat: Add -a as default target Borislav Petkov <bp@alien8.de> - 2017-02-20 20:20 +0100
Re: [PATCH 11/18] perf stat: Add -a as default target Arnaldo Carvalho de Melo <acme@redhat.com> - 2017-02-20 21:00 +0100
Re: [PATCH 11/18] perf stat: Add -a as default target Borislav Petkov <bp@alien8.de> - 2017-02-20 21:10 +0100
Re: [PATCH 11/18] perf stat: Add -a as default target Jiri Olsa <jolsa@redhat.com> - 2017-02-21 08:50 +0100
[PATCH 11/18] perf stat: Add -a as default target Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-20 20:20 +0100
[PATCH 08/18] perf build: Add special fixdep cleaning rule Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-20 20:20 +0100
[PATCH 05/18] perf cpumap: Add cpu__max_present_cpu() Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-02-20 20:20 +0100
Re: [GIT PULL 00/18] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2017-02-21 09:10 +0100
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-02-20 20:20 +0100 |
| Subject | [GIT PULL 00/18] perf/core improvements and fixes |
| Message-ID | <td1vr-dn-7@gated-at.bofh.it> |
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Hi Ingo,
Please consider pulling,
- Arnaldo
Test results at the end of this message, as usual.
The following changes since commit 0c8967c9df230d2c4dde6649f410b62e01806c22:
Merge tag 'perf-core-for-mingo-4.11-20170215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-02-16 20:53:13 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.11-20170220
for you to fetch changes up to 68ba32352d51474d163d58e084b62a12bb610b21:
perf record: Honor --quiet option properly (2017-02-20 11:50:36 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
New features:
- Make -a/--all-cpus be the default target in 'perf record' and 'perf stat',
just like it is with 'perf trace' (Jiri Olsa)
- Introduce -q/--quiet to the 'annotate', 'diff' and 'report', fix up
its behaviour in 'record'. This makes the output more compact by
elliminating headers, leaving just the histogram lines (Namhyung Kim)
Fixes:
- Handle offline/absent CPUs (Jan Stancek)
Infrastructure:
- Filter out -specs=/a/b/c from CC options when building the python
support, allowing that feature to be built with clang (Arnaldo Carvalho de Melo)
- Fix DEBUG=1 build with clang (Arnaldo Carvalho de Melo)
Trivial:
- Fix spelling of 'preempt' in a libtraceevent function name (Steven Rostedt)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
----------------------------------------------------------------
Arnaldo Carvalho de Melo (3):
tools perf scripting python: clang doesn't have -spec, remove it
perf python: Filter out -specs=/a/b/c from the python binding cc options
perf session: Fix DEBUG=1 build with clang
Jan Stancek (3):
perf cpumap: Add cpu__max_present_cpu()
perf header: Make build_cpu_topology skip offline/absent CPUs
perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map
Jiri Olsa (5):
perf build: Add special fixdep cleaning rule
perf tools: Move new_term arguments into struct parse_events_term template
perf tools: Fail on using multiple bits long terms without value
perf stat: Add -a as default target
perf record: Add -a as default target
Namhyung Kim (6):
perf utils: Add perf_quiet_option()
perf utils: Check verbose flag properly
perf report: Add -q/--quiet option
perf diff: Add -q/--quiet option
perf annotate: Add -q/--quiet option
perf record: Honor --quiet option properly
Steven Rostedt (VMware) (1):
tools lib traceevent: It's preempt not prempt
tools/build/Makefile | 4 +-
tools/build/Makefile.include | 3 +
tools/lib/traceevent/event-parse.c | 4 +-
tools/lib/traceevent/event-parse.h | 2 +-
tools/perf/Documentation/perf-annotate.txt | 4 ++
tools/perf/Documentation/perf-diff.txt | 4 ++
tools/perf/Documentation/perf-record.txt | 2 +-
tools/perf/Documentation/perf-report.txt | 4 ++
tools/perf/Documentation/perf-stat.txt | 2 +-
tools/perf/Makefile.config | 7 +++
tools/perf/Makefile.perf | 4 +-
tools/perf/builtin-annotate.c | 4 ++
tools/perf/builtin-diff.c | 14 +++--
tools/perf/builtin-mem.c | 4 +-
tools/perf/builtin-record.c | 8 ++-
tools/perf/builtin-report.c | 21 +++++--
tools/perf/builtin-sched.c | 12 ++--
tools/perf/builtin-stat.c | 11 ++--
tools/perf/builtin-top.c | 2 +-
tools/perf/builtin-trace.c | 6 +-
tools/perf/pmu-events/json.c | 2 +-
tools/perf/tests/attr.c | 2 +-
tools/perf/tests/builtin-test.c | 2 +-
tools/perf/tests/code-reading.c | 2 +-
tools/perf/tests/fdarray.c | 2 +-
tools/perf/tests/llvm.c | 2 +-
tools/perf/tests/parse-events.c | 2 +-
tools/perf/tests/perf-record.c | 4 +-
tools/perf/tests/python-use.c | 2 +-
tools/perf/tests/thread-map.c | 6 +-
tools/perf/tests/topology.c | 4 +-
tools/perf/tests/vmlinux-kallsyms.c | 2 +-
tools/perf/ui/browsers/map.c | 6 +-
tools/perf/ui/hist.c | 2 +-
tools/perf/util/annotate.c | 2 +-
tools/perf/util/cpumap.c | 22 +++++++
tools/perf/util/cpumap.h | 1 +
tools/perf/util/debug.c | 17 ++++++
tools/perf/util/debug.h | 1 +
tools/perf/util/dso.c | 2 +-
tools/perf/util/env.c | 2 +-
tools/perf/util/header.c | 33 ++++++----
tools/perf/util/hist.c | 6 +-
tools/perf/util/parse-events.c | 71 +++++++++++++---------
tools/perf/util/parse-events.h | 2 +
tools/perf/util/parse-events.y | 14 ++---
tools/perf/util/pmu.c | 21 +++++--
tools/perf/util/probe-event.c | 2 +-
.../util/scripting-engines/trace-event-python.c | 4 +-
tools/perf/util/session.c | 2 +-
tools/perf/util/setup.py | 9 ++-
tools/perf/util/sort.c | 8 +--
tools/perf/util/stat.c | 2 +-
tools/perf/util/symbol-elf.c | 2 +-
54 files changed, 256 insertions(+), 129 deletions(-)
Test results:
The first ones are container (docker) based builds of tools/perf with and
without libelf support, objtool where it is supported and samples/bpf/, ditto.
Several are cross builds, the ones with -x-ARCH, and the android one, and those
may not have all the features built, due to lack of multi-arch devel packages,
available and being used so far on just a few, like
debian:experimental-x-{arm64,mipsel}.
The 'perf test' one will perform a variety of tests exercising
tools/perf/util/, tools/lib/{bpf,traceevent,etc}, as well as run perf commands
with a variety of command line event specifications to then intercept the
sys_perf_event syscall to check that the perf_event_attr fields are set up as
expected, among a variety of other unit tests.
Then there is the 'make -C tools/perf build-test' ones, that build tools/perf/
with a variety of feature sets, exercising the build with an incomplete set of
features as well as with a complete one. It is planned to have it run on each
of the containers mentioned above, using some container orchestration
infrastructure. Get in contact if interested in helping having this in place.
# dm
1 alpine:3.4: Ok
2 android-ndk:r12b-arm: Ok
3 archlinux:latest: Ok
4 centos:5: Ok
5 centos:6: Ok
6 centos:7: Ok
7 debian:7: Ok
8 debian:8: Ok
9 debian:experimental: Ok
10 debian:experimental-x-arm64: Ok
11 debian:experimental-x-mips: Ok
12 debian:experimental-x-mips64: Ok
13 debian:experimental-x-mipsel: Ok
14 fedora:20: Ok
15 fedora:21: Ok
16 fedora:22: Ok
17 fedora:23: Ok
18 fedora:24: Ok
19 fedora:24-x-ARC-uClibc: Ok
20 fedora:25: Ok
21 fedora:rawhide: Ok
22 mageia:5: Ok
23 opensuse:13.2: Ok
24 opensuse:42.1: Ok
25 opensuse:tumbleweed: Ok
26 ubuntu:12.04.5: Ok
27 ubuntu:14.04.4-x-linaro-arm64: Ok
28 ubuntu:15.10: Ok
29 ubuntu:16.04: Ok
30 ubuntu:16.04-x-arm: Ok
31 ubuntu:16.04-x-arm64: Ok
32 ubuntu:16.04-x-powerpc: Ok
33 ubuntu:16.04-x-powerpc64: Ok
34 ubuntu:16.04-x-powerpc64el: Ok
35 ubuntu:16.04-x-s390: Ok
36 ubuntu:16.10: Ok
#
# uname -a
Linux jouet 4.10.0-rc8 #2 SMP Wed Feb 15 15:26:36 BRT 2017 x86_64 x86_64 x86_64 GNU/Linux
# perf test
1: vmlinux symtab matches kallsyms : Ok
2: Detect openat syscall event : Ok
3: Detect openat syscall event on all cpus : Ok
4: Read samples using the mmap interface : Ok
5: Parse event definition strings : Ok
6: PERF_RECORD_* events & perf_sample fields : Ok
7: Parse perf pmu format : Ok
8: DSO data read : Ok
9: DSO data cache : Ok
10: DSO data reopen : Ok
11: Roundtrip evsel->name : Ok
12: Parse sched tracepoints fields : Ok
13: syscalls:sys_enter_openat event fields : Ok
14: Setup struct perf_event_attr : Ok
15: Match and link multiple hists : Ok
16: 'import perf' in python : Ok
17: Breakpoint overflow signal handler : Ok
18: Breakpoint overflow sampling : Ok
19: Number of exit events of a simple workload : Ok
20: Software clock events period values : Ok
21: Object code reading : Ok
22: Sample parsing : Ok
23: Use a dummy software event to keep tracking: Ok
24: Parse with no sample_id_all bit set : Ok
25: Filter hist entries : Ok
26: Lookup mmap thread : Ok
27: Share thread mg : Ok
28: Sort output of hist entries : Ok
29: Cumulate child hist entries : Ok
30: Track with sched_switch : Ok
31: Filter fds with revents mask in a fdarray : Ok
32: Add fd to a fdarray, making it autogrow : Ok
33: kmod_path__parse : Ok
34: Thread map : Ok
35: LLVM search and compile :
35.1: Basic BPF llvm compile : Ok
35.2: kbuild searching : Ok
35.3: Compile source for BPF prologue generation: Ok
35.4: Compile source for BPF relocation : Ok
36: Session topology : Ok
37: BPF filter :
37.1: Basic BPF filtering : Ok
37.2: BPF pinning : Ok
37.3: BPF prologue generation : Ok
37.4: BPF relocation checker : Ok
38: Synthesize thread map : Ok
39: Remove thread map : Ok
40: Synthesize cpu map : Ok
41: Synthesize stat config : Ok
42: Synthesize stat : Ok
43: Synthesize stat round : Ok
44: Synthesize attr update : Ok
45: Event times : Ok
46: Read backward ring buffer : Ok
47: Print cpu map : Ok
48: Probe SDT events : Ok
49: is_printable_array : Ok
50: Print bitmap : Ok
51: perf hooks : Ok
52: builtin clang support : Skip (not compiled in)
53: unit_number__scnprintf : Ok
54: x86 rdpmc : Ok
55: Convert perf time to TSC : Ok
56: DWARF unwind : Ok
57: x86 instruction decoder - new instructions : Ok
58: Intel cqm nmi context read : Skip
#
$ make -C tools/perf build-test
make: Entering directory '/home/acme/git/linux/tools/perf'
- tarpkg: ./tests/perf-targz-src-pkg .
make_with_clangllvm_O: make LIBCLANGLLVM=1
make_no_libaudit_O: make NO_LIBAUDIT=1
make_tags_O: make tags
make_minimal_O: make NO_LIBPERL=1 NO_LIBPYTHON=1 NO_NEWT=1 NO_GTK2=1 NO_DEMANGLE=1 NO_LIBELF=1 NO_LIBUNWIND=1 NO_BACKTRACE=1 NO_LIBNUMA=1 NO_LIBAUDIT=1 NO_LIBBIONIC=1 NO_LIBDW_DWARF_UNWIND=1 NO_AUXTRACE=1 NO_LIBBPF=1 NO_LIBCRYPTO=1 NO_SDT=1 NO_JVMTI=1
make_clean_all_O: make clean all
make_no_libunwind_O: make NO_LIBUNWIND=1
make_no_libpython_O: make NO_LIBPYTHON=1
make_install_bin_O: make install-bin
make_no_newt_O: make NO_NEWT=1
make_no_slang_O: make NO_SLANG=1
make_doc_O: make doc
make_no_libbpf_O: make NO_LIBBPF=1
make_perf_o_O: make perf.o
make_install_prefix_O: make install prefix=/tmp/krava
make_no_auxtrace_O: make NO_AUXTRACE=1
make_no_libnuma_O: make NO_LIBNUMA=1
make_with_babeltrace_O: make LIBBABELTRACE=1
make_install_prefix_slash_O: make install prefix=/tmp/krava/
make_help_O: make help
make_pure_O: make
make_no_libelf_O: make NO_LIBELF=1
make_no_scripts_O: make NO_LIBPYTHON=1 NO_LIBPERL=1
make_debug_O: make DEBUG=1
make_install_O: make install
make_no_libbionic_O: make NO_LIBBIONIC=1
make_static_O: make LDFLAGS=-static
make_util_map_o_O: make util/map.o
make_no_ui_O: make NO_NEWT=1 NO_SLANG=1 NO_GTK2=1
make_no_libperl_O: make NO_LIBPERL=1
make_no_backtrace_O: make NO_BACKTRACE=1
make_no_libdw_dwarf_unwind_O: make NO_LIBDW_DWARF_UNWIND=1
make_util_pmu_bison_o_O: make util/pmu-bison.o
make_no_gtk2_O: make NO_GTK2=1
make_no_demangle_O: make NO_DEMANGLE=1
OK
make: Leaving directory '/home/acme/git/linux/tools/perf'
$
[toc] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-02-20 20:20 +0100 |
| Subject | [PATCH 16/18] perf diff: Add -q/--quiet option |
| Message-ID | <td1F8-h6-17@gated-at.bofh.it> |
| In reply to | #1584846 |
From: Namhyung Kim <namhyung@kernel.org>
The -q/--quiet option is to suppress any message. Sometimes users just
want to see the numbers and it can be used for that case.
Committer notes:
Before:
# perf diff | head -10
Failed to open /tmp/perf-6678.map, continuing without symbols
Failed to open /tmp/perf-6678.map, continuing without symbols
Failed to open /tmp/perf-2646.map, continuing without symbols
# Event 'cycles'
#
# Baseline Delta Abs Shared Object Symbol
# ........ ......... .......................... ............................................
#
5.36% -1.76% [kernel.vmlinux] [k] intel_idle
2.80% +1.48% firefox [.] 0x00000000000101fe
57.12% -1.25% libxul.so [.] 0x00000000009bea92
1.36% -1.11% [kernel.vmlinux] [k] __schedule
4.26% -1.00% perf-6678.map [.] 0x00007fac4b0e9320
After:
# perf diff -q | head -10
5.36% -1.76% [kernel.vmlinux] [k] intel_idle
2.80% +1.48% firefox [.] 0x00000000000101fe
57.12% -1.25% libxul.so [.] 0x00000000009bea92
1.36% -1.11% [kernel.vmlinux] [k] __schedule
4.26% -1.00% perf-6678.map [.] 0x00007fac4b0e9320
1.86% +0.95% [kernel.vmlinux] [k] update_blocked_averages
0.80% -0.70% [kernel.vmlinux] [k] native_sched_clock
0.74% -0.58% [kernel.vmlinux] [k] native_write_msr
0.76% -0.56% qemu-system-x86_64 [.] 0x00000000002395c0
+0.54% libpulsecommon-10.0.so [.] 0x000000000002d91b
#
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Suggested-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170217081742.17417-5-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-diff.txt | 4 ++++
tools/perf/builtin-diff.c | 14 ++++++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Documentation/perf-diff.txt b/tools/perf/Documentation/perf-diff.txt
index 66dbe3dee74b..a79c84ae61aa 100644
--- a/tools/perf/Documentation/perf-diff.txt
+++ b/tools/perf/Documentation/perf-diff.txt
@@ -73,6 +73,10 @@ OPTIONS
Be verbose, for instance, show the raw counts in addition to the
diff.
+-q::
+--quiet::
+ Do not show any message. (Suppress -v)
+
-f::
--force::
Don't do ownership validation.
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 7ad0d78ea743..1b96a3122228 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -691,7 +691,7 @@ static void hists__process(struct hists *hists)
hists__precompute(hists);
hists__output_resort(hists, NULL);
- hists__fprintf(hists, true, 0, 0, 0, stdout,
+ hists__fprintf(hists, !quiet, 0, 0, 0, stdout,
symbol_conf.use_callchain);
}
@@ -739,12 +739,14 @@ static void data_process(void)
hists__link(hists_base, hists);
}
- fprintf(stdout, "%s# Event '%s'\n#\n", first ? "" : "\n",
- perf_evsel__name(evsel_base));
+ if (!quiet) {
+ fprintf(stdout, "%s# Event '%s'\n#\n", first ? "" : "\n",
+ perf_evsel__name(evsel_base));
+ }
first = false;
- if (verbose > 0 || data__files_cnt > 2)
+ if (verbose > 0 || ((data__files_cnt > 2) && !quiet))
data__fprintf();
/* Don't sort callchain for perf diff */
@@ -807,6 +809,7 @@ static const char * const diff_usage[] = {
static const struct option options[] = {
OPT_INCR('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
+ OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"),
OPT_BOOLEAN('b', "baseline-only", &show_baseline_only,
"Show only items with match in baseline"),
OPT_CALLBACK('c', "compute", &compute,
@@ -1328,6 +1331,9 @@ int cmd_diff(int argc, const char **argv, const char *prefix __maybe_unused)
argc = parse_options(argc, argv, options, diff_usage, 0);
+ if (quiet)
+ perf_quiet_option();
+
if (symbol__init(NULL) < 0)
return -1;
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-02-20 20:20 +0100 |
| Subject | [PATCH 12/18] perf record: Add -a as default target |
| Message-ID | <td1F8-h6-33@gated-at.bofh.it> |
| In reply to | #1584846 |
From: Jiri Olsa <jolsa@redhat.com>
Running 'perf record' with no target (-a, -p, -t, etc) will now collect
system wide data.
Commiter notes:
Testing it:
[root@jouet ~]# perf record
^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 1.351 MB perf.data (366 samples) ]
#
is equivalent to:
# perf record -a
^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 1.411 MB perf.data (978 samples) ]
#
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20170217170018.GA15389@krava
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-record.txt | 2 +-
tools/perf/builtin-record.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 27256bc68eda..b16003ec14a7 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -157,7 +157,7 @@ OPTIONS
-a::
--all-cpus::
- System-wide collection from all CPUs.
+ System-wide collection from all CPUs (default if no target is specified).
-p::
--pid=::
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 6cd6776052e7..b87bbef73394 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -1677,8 +1677,10 @@ int cmd_record(int argc, const char **argv, const char *prefix __maybe_unused)
argc = parse_options(argc, argv, record_options, record_usage,
PARSE_OPT_STOP_AT_NON_OPTION);
+
+ /* Make system wide (-a) the default target. */
if (!argc && target__none(&rec->opts.target))
- usage_with_options(record_usage, record_options);
+ rec->opts.target.system_wide = true;
if (nr_cgroups && !rec->opts.target.system_wide) {
usage_with_options_msg(record_usage, record_options,
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-02-20 20:20 +0100 |
| Subject | [PATCH 15/18] perf report: Add -q/--quiet option |
| Message-ID | <td1F8-h6-27@gated-at.bofh.it> |
| In reply to | #1584846 |
From: Namhyung Kim <namhyung@kernel.org>
The -q/--quiet option is to suppress any message. Sometimes users just
want to see the numbers and it can be used for that case.
Before:
$ perf report | head -15
Failed to open /lib/modules/3.19.3-3-ARCH/kernel/fs/ext4/ext4.ko.gz, continuing without symbols
Failed to open /lib/modules/3.19.3-3-ARCH/kernel/fs/jbd2/jbd2.ko.gz, continuing without symbols
Failed to open /tmp/perf-14507.map, continuing without symbols
...
# To display the perf.data header info, please use --header/--header-only options.
#
#
# Total Lost Samples: 0
#
# Samples: 39K of event 'cycles'
# Event count (approx.): 30444796573
#
# Overhead Command Shared Object Symbol
# ........ ........... ................... .........................
#
9.28% swapper [kernel.vmlinux] [k] intel_idle
5.64% swapper [kernel.vmlinux] [k] native_write_msr_safe
1.93% swapper [kernel.vmlinux] [k] __switch_to
1.89% swapper [kernel.vmlinux] [k] menu_select
1.75% sched-pipe [kernel.vmlinux] [k] __switch_to
After:
$ perf report -q | head
9.28% swapper [kernel.vmlinux] [k] intel_idle
5.64% swapper [kernel.vmlinux] [k] native_write_msr_safe
1.93% swapper [kernel.vmlinux] [k] __switch_to
1.89% swapper [kernel.vmlinux] [k] menu_select
1.75% sched-pipe [kernel.vmlinux] [k] __switch_to
1.67% swapper [kernel.vmlinux] [k] cpu_startup_entry
1.48% sched-pipe [kernel.vmlinux] [k] enqueue_entity
1.46% swapper [kernel.vmlinux] [k] __schedule
1.36% swapper [kernel.vmlinux] [k] native_read_tsc
1.34% sched-pipe [kernel.vmlinux] [k] __schedule
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Suggested-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170217081742.17417-4-namhyung@kernel.org
[ Removed builtin-report.c verbose > 0 hunk added to the previous patch ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-report.txt | 4 ++++
tools/perf/builtin-report.c | 19 +++++++++++++++----
2 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/tools/perf/Documentation/perf-report.txt b/tools/perf/Documentation/perf-report.txt
index f2914f03ae7b..c04cc0647c16 100644
--- a/tools/perf/Documentation/perf-report.txt
+++ b/tools/perf/Documentation/perf-report.txt
@@ -25,6 +25,10 @@ OPTIONS
--verbose::
Be more verbose. (show symbol address, etc)
+-q::
+--quiet::
+ Do not show any message. (Suppress -v)
+
-n::
--show-nr-samples::
Show the number of samples for each symbol
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index a94488114bbf..0a88670e56f3 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -320,6 +320,9 @@ static size_t hists__fprintf_nr_sample_events(struct hists *hists, struct report
size_t size = sizeof(buf);
int socked_id = hists->socket_filter;
+ if (quiet)
+ return 0;
+
if (symbol_conf.filter_relative) {
nr_samples = hists->stats.nr_non_filtered_samples;
nr_events = hists->stats.total_non_filtered_period;
@@ -372,7 +375,11 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
{
struct perf_evsel *pos;
- fprintf(stdout, "#\n# Total Lost Samples: %" PRIu64 "\n#\n", evlist->stats.total_lost_samples);
+ if (!quiet) {
+ fprintf(stdout, "#\n# Total Lost Samples: %" PRIu64 "\n#\n",
+ evlist->stats.total_lost_samples);
+ }
+
evlist__for_each_entry(evlist, pos) {
struct hists *hists = evsel__hists(pos);
const char *evname = perf_evsel__name(pos);
@@ -382,7 +389,7 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
continue;
hists__fprintf_nr_sample_events(hists, rep, evname, stdout);
- hists__fprintf(hists, true, 0, 0, rep->min_percent, stdout,
+ hists__fprintf(hists, !quiet, 0, 0, rep->min_percent, stdout,
symbol_conf.use_callchain);
fprintf(stdout, "\n\n");
}
@@ -716,6 +723,7 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
"input file name"),
OPT_INCR('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
+ OPT_BOOLEAN('q', "quiet", &quiet, "Do not show any message"),
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
"dump raw trace in ASCII"),
OPT_STRING('k', "vmlinux", &symbol_conf.vmlinux_name,
@@ -863,6 +871,9 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
report.symbol_filter_str = argv[0];
}
+ if (quiet)
+ perf_quiet_option();
+
if (symbol_conf.vmlinux_name &&
access(symbol_conf.vmlinux_name, R_OK)) {
pr_err("Invalid file: %s\n", symbol_conf.vmlinux_name);
@@ -983,14 +994,14 @@ int cmd_report(int argc, const char **argv, const char *prefix __maybe_unused)
goto error;
}
- if (report.header || report.header_only) {
+ if ((report.header || report.header_only) && !quiet) {
perf_session__fprintf_info(session, stdout,
report.show_full_info);
if (report.header_only) {
ret = 0;
goto error;
}
- } else if (use_browser == 0) {
+ } else if (use_browser == 0 && !quiet) {
fputs("# To display the perf.data header info, please use --header/--header-only options.\n#\n",
stdout);
}
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2017-02-20 20:20 +0100 |
| Subject | Re: [PATCH 11/18] perf stat: Add -a as default target |
| Message-ID | <td1F8-h6-29@gated-at.bofh.it> |
| In reply to | #1584846 |
On Mon, Feb 20, 2017 at 04:08:32PM -0300, Arnaldo Carvalho de Melo wrote:
> From: Jiri Olsa <jolsa@redhat.com>
>
> Boris asked for default -a option in case we monitor only uncore events.
>
> While implementing that I thought it might be actually useful to make it
> overall default.
>
> Running 'perf stat' will now collect system wide data.
>
> Committer note:
>
> Testing it:
>
> # perf stat
> ^C
> Performance counter stats for 'system wide':
>
> 3571.559178 cpu-clock (msec) # 4.000 CPUs utilized
> 3,346 context-switches # 0.937 K/sec
> 277 cpu-migrations # 0.078 K/sec
> 57,271 page-faults # 0.016 M/sec
> 4,535,633,835 cycles # 1.270 GHz
> 6,389,736,516 instructions # 1.41 insn per cycle
> 1,541,293,875 branches # 431.547 M/sec
> 14,526,396 branch-misses # 0.94% of all branches
>
> 0.892950118 seconds time elapsed
>
> #
>
> Requested-and-Acked-by: Borislav Petkov <bp@alien8.de>
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Link: http://lkml.kernel.org/r/20170217170034.GB15389@krava
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> tools/perf/Documentation/perf-stat.txt | 2 +-
> tools/perf/builtin-stat.c | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
> index d96ccd4844df..aecf2a87e7d6 100644
> --- a/tools/perf/Documentation/perf-stat.txt
> +++ b/tools/perf/Documentation/perf-stat.txt
> @@ -63,7 +63,7 @@ report::
>
> -a::
> --all-cpus::
> - system-wide collection from all CPUs
> + system-wide collection from all CPUs (default if no target is specified)
>
> -c::
> --scale::
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index ca27a8a705ac..9989b03c21f2 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -2445,8 +2445,9 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
> } else if (big_num_opt == 0) /* User passed --no-big-num */
> big_num = false;
>
> + /* Make system wide (-a) the default target. */
> if (!argc && target__none(&target))
> - usage_with_options(stat_usage, stat_options);
> + target.system_wide = true;
>
> if (run_count < 0) {
> pr_err("Run count must be a positive number\n");
> --
This one doesn't work, see https://lkml.kernel.org/r/20170218175225.5cylpqti7oluqehv@pd.tnic
I have a better diff there :-)
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@redhat.com> |
|---|---|
| Date | 2017-02-20 21:00 +0100 |
| Subject | Re: [PATCH 11/18] perf stat: Add -a as default target |
| Message-ID | <td2hQ-vb-27@gated-at.bofh.it> |
| In reply to | #1584850 |
Em Mon, Feb 20, 2017 at 08:15:59PM +0100, Borislav Petkov escreveu: > This one doesn't work, see https://lkml.kernel.org/r/20170218175225.5cylpqti7oluqehv@pd.tnic > > I have a better diff there :-) I answered to that message, have you seen it? - Arnaldo
[toc] | [prev] | [next] | [standalone]
| From | Borislav Petkov <bp@alien8.de> |
|---|---|
| Date | 2017-02-20 21:10 +0100 |
| Subject | Re: [PATCH 11/18] perf stat: Add -a as default target |
| Message-ID | <td2rw-OT-19@gated-at.bofh.it> |
| In reply to | #1584868 |
On Mon, Feb 20, 2017 at 04:55:40PM -0300, Arnaldo Carvalho de Melo wrote:
> I answered to that message, have you seen it?
Nope, there's nothing in my mbox from you on that thread after jolsa's
reply. Strange...
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
[toc] | [prev] | [next] | [standalone]
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Date | 2017-02-21 08:50 +0100 |
| Subject | Re: [PATCH 11/18] perf stat: Add -a as default target |
| Message-ID | <tddmV-7Y2-7@gated-at.bofh.it> |
| In reply to | #1584874 |
On Mon, Feb 20, 2017 at 08:59:32PM +0100, Borislav Petkov wrote: > On Mon, Feb 20, 2017 at 04:55:40PM -0300, Arnaldo Carvalho de Melo wrote: > > I answered to that message, have you seen it? > > Nope, there's nothing in my mbox from you on that thread after jolsa's > reply. Strange... > I think we want to keep this change and work on separate patch for -a for uncore events.. I'll follow up in the other thread jirka
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-02-20 20:20 +0100 |
| Subject | [PATCH 11/18] perf stat: Add -a as default target |
| Message-ID | <td1F8-h6-31@gated-at.bofh.it> |
| In reply to | #1584846 |
From: Jiri Olsa <jolsa@redhat.com>
Boris asked for default -a option in case we monitor only uncore events.
While implementing that I thought it might be actually useful to make it
overall default.
Running 'perf stat' will now collect system wide data.
Committer note:
Testing it:
# perf stat
^C
Performance counter stats for 'system wide':
3571.559178 cpu-clock (msec) # 4.000 CPUs utilized
3,346 context-switches # 0.937 K/sec
277 cpu-migrations # 0.078 K/sec
57,271 page-faults # 0.016 M/sec
4,535,633,835 cycles # 1.270 GHz
6,389,736,516 instructions # 1.41 insn per cycle
1,541,293,875 branches # 431.547 M/sec
14,526,396 branch-misses # 0.94% of all branches
0.892950118 seconds time elapsed
#
Requested-and-Acked-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20170217170034.GB15389@krava
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/Documentation/perf-stat.txt | 2 +-
tools/perf/builtin-stat.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Documentation/perf-stat.txt b/tools/perf/Documentation/perf-stat.txt
index d96ccd4844df..aecf2a87e7d6 100644
--- a/tools/perf/Documentation/perf-stat.txt
+++ b/tools/perf/Documentation/perf-stat.txt
@@ -63,7 +63,7 @@ report::
-a::
--all-cpus::
- system-wide collection from all CPUs
+ system-wide collection from all CPUs (default if no target is specified)
-c::
--scale::
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
index ca27a8a705ac..9989b03c21f2 100644
--- a/tools/perf/builtin-stat.c
+++ b/tools/perf/builtin-stat.c
@@ -2445,8 +2445,9 @@ int cmd_stat(int argc, const char **argv, const char *prefix __maybe_unused)
} else if (big_num_opt == 0) /* User passed --no-big-num */
big_num = false;
+ /* Make system wide (-a) the default target. */
if (!argc && target__none(&target))
- usage_with_options(stat_usage, stat_options);
+ target.system_wide = true;
if (run_count < 0) {
pr_err("Run count must be a positive number\n");
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-02-20 20:20 +0100 |
| Subject | [PATCH 08/18] perf build: Add special fixdep cleaning rule |
| Message-ID | <td1F8-h6-35@gated-at.bofh.it> |
| In reply to | #1584846 |
From: Jiri Olsa <jolsa@redhat.com>
Ingo reported following build failure:
On Sat, Feb 11, 2017 at 12:12:34PM +0100, Ingo Molnar wrote:
>
> So I had this oldish 32-bit 15.10 Ubuntu installation around (fully updated), and
> trying to build perf gave me:
>
> deimos:~/tip/tools/perf> make
> BUILD: Doing 'make -j4' parallel build
> make[3]: *** No rule to make target '/usr/include/x86_64-linux-gnu/sys/types.h', needed by 'fixdep.o'. Stop.
> Makefile:42: recipe for target 'fixdep-in.o' failed
> make[2]: *** [fixdep-in.o] Error 2
> /home/mingo/tip/tools/build/Makefile.include:4: recipe for target 'fixdep' failed
> make[1]: *** [fixdep] Error 2
> Makefile:68: recipe for target 'all' failed
> make: *** [all] Error 2
>
> Now this got a bit better after I did a 'make mrproper' in the kernel tree:
>
> deimos:~/tip/tools/perf> make
> BUILD: Doing 'make -j4' parallel build
> HOSTCC fixdep.o
> /home/mingo/tip/tools/build/fixdep: 1: /home/mingo/tip/tools/build/fixdep: Syntax error: "(" unexpected
> /home/mingo/tip/tools/build/Makefile.build:101: recipe for target 'fixdep.o' failed
> make[3]: *** [fixdep.o] Error 2
> Makefile:42: recipe for target 'fixdep-in.o' failed
> make[2]: *** [fixdep-in.o] Error 2
> /home/mingo/tip/tools/build/Makefile.include:4: recipe for target 'fixdep' failed
> make[1]: *** [fixdep] Error 2
> Makefile:68: recipe for target 'all' failed
> make: *** [all] Error 2
>
> After some digging it turns out that my 'fixdep' binary was 64-bit:
>
> deimos:~/tip/tools/perf> file /home/mingo/tip/tools/build/fixdep
> /home/mingo/tip/tools/build/fixdep: ELF 64-bit LSB executable, x86-64, version 1
> (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux
> 2.6.32, BuildID[sha1]=d527f736b57b5ba47210fbcb562a3b52867d21c1, not stripped
>
> But it did not get cleaned out by 'make clean'.
>
> Only after I did a 'make clean' in tools/ itself, did it get built properly.
It shows we don't clean up properly the fixdep objects, so adding
special rule for that.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1487340058-10496-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/build/Makefile | 4 ++--
tools/build/Makefile.include | 3 +++
tools/perf/Makefile.perf | 4 ++--
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/tools/build/Makefile b/tools/build/Makefile
index aaf7ed329a45..477f00eda591 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -35,8 +35,8 @@ all: $(OUTPUT)fixdep
clean:
$(call QUIET_CLEAN, fixdep)
- $(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
- $(Q)rm -f fixdep
+ $(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
+ $(Q)rm -f $(OUTPUT)fixdep
$(OUTPUT)fixdep-in.o: FORCE
$(Q)$(MAKE) $(build)=fixdep
diff --git a/tools/build/Makefile.include b/tools/build/Makefile.include
index ad22e4e7bc59..d360f39a445b 100644
--- a/tools/build/Makefile.include
+++ b/tools/build/Makefile.include
@@ -3,4 +3,7 @@ build := -f $(srctree)/tools/build/Makefile.build dir=. obj
fixdep:
$(Q)$(MAKE) -C $(srctree)/tools/build CFLAGS= LDFLAGS= $(OUTPUT)fixdep
+fixdep-clean:
+ $(Q)$(MAKE) -C $(srctree)/tools/build clean
+
.PHONY: fixdep
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 4da19b6ba94a..79fe31f20a17 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -726,13 +726,13 @@ config-clean:
$(call QUIET_CLEAN, config)
$(Q)$(MAKE) -C $(srctree)/tools/build/feature/ $(if $(OUTPUT),OUTPUT=$(OUTPUT)feature/,) clean >/dev/null
-clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean config-clean
+clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clean config-clean fixdep-clean
$(call QUIET_CLEAN, core-objs) $(RM) $(LIB_FILE) $(OUTPUT)perf-archive $(OUTPUT)perf-with-kcore $(LANG_BINDINGS)
$(Q)find $(if $(OUTPUT),$(OUTPUT),.) -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
$(Q)$(RM) $(OUTPUT).config-detected
$(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 $(OUTPUT)pmu-events/jevents $(OUTPUT)$(LIBJVMTI).so
$(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \
- $(OUTPUT)util/intel-pt-decoder/inat-tables.c $(OUTPUT)fixdep \
+ $(OUTPUT)util/intel-pt-decoder/inat-tables.c \
$(OUTPUT)tests/llvm-src-{base,kbuild,prologue,relocation}.c \
$(OUTPUT)pmu-events/pmu-events.c
$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Date | 2017-02-20 20:20 +0100 |
| Subject | [PATCH 05/18] perf cpumap: Add cpu__max_present_cpu() |
| Message-ID | <td1F8-h6-39@gated-at.bofh.it> |
| In reply to | #1584846 |
From: Jan Stancek <jstancek@redhat.com>
Similar to cpu__max_cpu() (which returns the max possible CPU), returns
the max present CPU.
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/8ea4601b5cacc49927235b4ebac424bd6eeccb06.1487146877.git.jstancek@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/cpumap.c | 22 ++++++++++++++++++++++
tools/perf/util/cpumap.h | 1 +
2 files changed, 23 insertions(+)
diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index 2c0b52264a46..8c7504939113 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -9,6 +9,7 @@
#include "asm/bug.h"
static int max_cpu_num;
+static int max_present_cpu_num;
static int max_node_num;
static int *cpunode_map;
@@ -442,6 +443,7 @@ static void set_max_cpu_num(void)
/* set up default */
max_cpu_num = 4096;
+ max_present_cpu_num = 4096;
mnt = sysfs__mountpoint();
if (!mnt)
@@ -455,6 +457,17 @@ static void set_max_cpu_num(void)
}
ret = get_max_num(path, &max_cpu_num);
+ if (ret)
+ goto out;
+
+ /* get the highest present cpu number for a sparse allocation */
+ ret = snprintf(path, PATH_MAX, "%s/devices/system/cpu/present", mnt);
+ if (ret == PATH_MAX) {
+ pr_err("sysfs path crossed PATH_MAX(%d) size\n", PATH_MAX);
+ goto out;
+ }
+
+ ret = get_max_num(path, &max_present_cpu_num);
out:
if (ret)
@@ -505,6 +518,15 @@ int cpu__max_cpu(void)
return max_cpu_num;
}
+int cpu__max_present_cpu(void)
+{
+ if (unlikely(!max_present_cpu_num))
+ set_max_cpu_num();
+
+ return max_present_cpu_num;
+}
+
+
int cpu__get_node(int cpu)
{
if (unlikely(cpunode_map == NULL)) {
diff --git a/tools/perf/util/cpumap.h b/tools/perf/util/cpumap.h
index 06bd689f5989..1a0549af8f5c 100644
--- a/tools/perf/util/cpumap.h
+++ b/tools/perf/util/cpumap.h
@@ -62,6 +62,7 @@ int cpu__setup_cpunode_map(void);
int cpu__max_node(void);
int cpu__max_cpu(void);
+int cpu__max_present_cpu(void);
int cpu__get_node(int cpu);
int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res,
--
2.9.3
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2017-02-21 09:10 +0100 |
| Message-ID | <tddGi-8jR-11@gated-at.bofh.it> |
| In reply to | #1584846 |
* Arnaldo Carvalho de Melo <acme@kernel.org> wrote: > From: Arnaldo Carvalho de Melo <acme@redhat.com> > > Hi Ingo, > > Please consider pulling, > > - Arnaldo > > Test results at the end of this message, as usual. > > The following changes since commit 0c8967c9df230d2c4dde6649f410b62e01806c22: > > Merge tag 'perf-core-for-mingo-4.11-20170215' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2017-02-16 20:53:13 +0100) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-4.11-20170220 > > for you to fetch changes up to 68ba32352d51474d163d58e084b62a12bb610b21: > > perf record: Honor --quiet option properly (2017-02-20 11:50:36 -0300) > > ---------------------------------------------------------------- > perf/core improvements and fixes: > > New features: > > - Make -a/--all-cpus be the default target in 'perf record' and 'perf stat', > just like it is with 'perf trace' (Jiri Olsa) > > - Introduce -q/--quiet to the 'annotate', 'diff' and 'report', fix up > its behaviour in 'record'. This makes the output more compact by > elliminating headers, leaving just the histogram lines (Namhyung Kim) > > Fixes: > > - Handle offline/absent CPUs (Jan Stancek) > > Infrastructure: > > - Filter out -specs=/a/b/c from CC options when building the python > support, allowing that feature to be built with clang (Arnaldo Carvalho de Melo) > > - Fix DEBUG=1 build with clang (Arnaldo Carvalho de Melo) > > Trivial: > > - Fix spelling of 'preempt' in a libtraceevent function name (Steven Rostedt) > > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> > > ---------------------------------------------------------------- > Arnaldo Carvalho de Melo (3): > tools perf scripting python: clang doesn't have -spec, remove it > perf python: Filter out -specs=/a/b/c from the python binding cc options > perf session: Fix DEBUG=1 build with clang > > Jan Stancek (3): > perf cpumap: Add cpu__max_present_cpu() > perf header: Make build_cpu_topology skip offline/absent CPUs > perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map > > Jiri Olsa (5): > perf build: Add special fixdep cleaning rule > perf tools: Move new_term arguments into struct parse_events_term template > perf tools: Fail on using multiple bits long terms without value > perf stat: Add -a as default target > perf record: Add -a as default target > > Namhyung Kim (6): > perf utils: Add perf_quiet_option() > perf utils: Check verbose flag properly > perf report: Add -q/--quiet option > perf diff: Add -q/--quiet option > perf annotate: Add -q/--quiet option > perf record: Honor --quiet option properly > > Steven Rostedt (VMware) (1): > tools lib traceevent: It's preempt not prempt > > tools/build/Makefile | 4 +- > tools/build/Makefile.include | 3 + > tools/lib/traceevent/event-parse.c | 4 +- > tools/lib/traceevent/event-parse.h | 2 +- > tools/perf/Documentation/perf-annotate.txt | 4 ++ > tools/perf/Documentation/perf-diff.txt | 4 ++ > tools/perf/Documentation/perf-record.txt | 2 +- > tools/perf/Documentation/perf-report.txt | 4 ++ > tools/perf/Documentation/perf-stat.txt | 2 +- > tools/perf/Makefile.config | 7 +++ > tools/perf/Makefile.perf | 4 +- > tools/perf/builtin-annotate.c | 4 ++ > tools/perf/builtin-diff.c | 14 +++-- > tools/perf/builtin-mem.c | 4 +- > tools/perf/builtin-record.c | 8 ++- > tools/perf/builtin-report.c | 21 +++++-- > tools/perf/builtin-sched.c | 12 ++-- > tools/perf/builtin-stat.c | 11 ++-- > tools/perf/builtin-top.c | 2 +- > tools/perf/builtin-trace.c | 6 +- > tools/perf/pmu-events/json.c | 2 +- > tools/perf/tests/attr.c | 2 +- > tools/perf/tests/builtin-test.c | 2 +- > tools/perf/tests/code-reading.c | 2 +- > tools/perf/tests/fdarray.c | 2 +- > tools/perf/tests/llvm.c | 2 +- > tools/perf/tests/parse-events.c | 2 +- > tools/perf/tests/perf-record.c | 4 +- > tools/perf/tests/python-use.c | 2 +- > tools/perf/tests/thread-map.c | 6 +- > tools/perf/tests/topology.c | 4 +- > tools/perf/tests/vmlinux-kallsyms.c | 2 +- > tools/perf/ui/browsers/map.c | 6 +- > tools/perf/ui/hist.c | 2 +- > tools/perf/util/annotate.c | 2 +- > tools/perf/util/cpumap.c | 22 +++++++ > tools/perf/util/cpumap.h | 1 + > tools/perf/util/debug.c | 17 ++++++ > tools/perf/util/debug.h | 1 + > tools/perf/util/dso.c | 2 +- > tools/perf/util/env.c | 2 +- > tools/perf/util/header.c | 33 ++++++---- > tools/perf/util/hist.c | 6 +- > tools/perf/util/parse-events.c | 71 +++++++++++++--------- > tools/perf/util/parse-events.h | 2 + > tools/perf/util/parse-events.y | 14 ++--- > tools/perf/util/pmu.c | 21 +++++-- > tools/perf/util/probe-event.c | 2 +- > .../util/scripting-engines/trace-event-python.c | 4 +- > tools/perf/util/session.c | 2 +- > tools/perf/util/setup.py | 9 ++- > tools/perf/util/sort.c | 8 +-- > tools/perf/util/stat.c | 2 +- > tools/perf/util/symbol-elf.c | 2 +- > 54 files changed, 256 insertions(+), 129 deletions(-) Pulled, thanks a lot Arnaldo! Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web