25 Mar, 2016
1 commit
-
Pull perf fixes from Ingo Molnar:
"This tree contains various perf fixes on the kernel side, plus three
hw/event-enablement late additions:- Intel Memory Bandwidth Monitoring events and handling
- the AMD Accumulated Power Mechanism reporting facility
- more IOMMU events... and a final round of perf tooling updates/fixes"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (44 commits)
perf llvm: Use strerror_r instead of the thread unsafe strerror one
perf llvm: Use realpath to canonicalize paths
perf tools: Unexport some methods unused outside strbuf.c
perf probe: No need to use formatting strbuf method
perf help: Use asprintf instead of adhoc equivalents
perf tools: Remove unused perf_pathdup, xstrdup functions
perf tools: Do not include stringify.h from the kernel sources
tools include: Copy linux/stringify.h from the kernel
tools lib traceevent: Remove redundant CPU output
perf tools: Remove needless 'extern' from function prototypes
perf tools: Simplify die() mechanism
perf tools: Remove unused DIE_IF macro
perf script: Remove lots of unused arguments
perf thread: Rename perf_event__preprocess_sample_addr to thread__resolve
perf machine: Rename perf_event__preprocess_sample to machine__resolve
perf tools: Add cpumode to struct perf_sample
perf tests: Forward the perf_sample in the dwarf unwind test
perf tools: Remove misplaced __maybe_unused
perf list: Fix documentation of :ppp
perf bench numa: Fix assertion for nodes bitfield
...
24 Mar, 2016
1 commit
-
There is code in tools/ that is directly including this file from the
kernel, and this is verboten for a while, copy it so that the next csets
can fix this situation.Cc: Adrian Hunter
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-e0r3nks2uai020ndghvxv5qw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
09 Mar, 2016
1 commit
-
Copy hashtable.h from include/linux/tools.h. It's needed by objtool in
the next patch in the series.Add some includes that it needs, and remove references to
kernel-specific features like RCU and __read_mostly.Also change some if its dependency headers' includes to use quotes
instead of brackets so gcc can find them.Signed-off-by: Josh Poimboeuf
Cc: Andrew Morton
Cc: Andy Lutomirski
Cc: Arnaldo Carvalho de Melo
Cc: Arnaldo Carvalho de Melo
Cc: Bernd Petrovitsch
Cc: Borislav Petkov
Cc: Chris J Arges
Cc: Jiri Slaby
Cc: Linus Torvalds
Cc: Michal Marek
Cc: Namhyung Kim
Cc: Pedro Alves
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: live-patching@vger.kernel.org
Link: http://lkml.kernel.org/r/be3bef72f6540d8a510515408119d968a0e18179.1457502970.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar
12 Jan, 2016
1 commit
-
Commit 7f5f873c6a07 ("rculist: Use WRITE_ONCE() when deleting from
reader-visible list") added the use of the WRITE_ONCE macro to the
kernel version of list.h, which broke the stacktool build because the
tools list.h includes the kernel list.h.Avoid this type of situation in the future and make list.h
self-sufficient by copying the kernel list.h routines directly into
tools list.h.This is a straight copy except for adjustments to the include statements
and copying of the tools-specific list routines (list_del_range and
list_for_each_from).Signed-off-by: Josh Poimboeuf
Cc: "H. Peter Anvin"
Cc: Andi Kleen
Cc: Andrew Morton
Cc: Andy Lutomirski
Cc: Bernd Petrovitsch
Cc: Borislav Petkov
Cc: Chris J Arges
Cc: Jiri Slaby
Cc: Linus Torvalds
Cc: Michal Marek
Cc: Namhyung Kim
Cc: Pedro Alves
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: live-patching@vger.kernel.org
Cc: x86@kernel.org
Link: http://lkml.kernel.org/r/59cdc19c6589d1b5ef43d83b0e2d5a4a40301374.1450442274.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo
08 Jan, 2016
1 commit
-
So that lib/find_bit.c doesn't requires anything inside tools/perf/
Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: George Spelvin
Cc: Namhyung Kim
Cc: Rasmus Villemoes
Cc: Wang Nan
Cc: Yury Norov
Link: http://lkml.kernel.org/n/tip-7lxe7jgohaac5faodndhdmvk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
17 Dec, 2015
1 commit
-
strlcpy() will be needed by the subcmd library. Move it to the shared
tools/lib/string.c file which can be used by other tools.Signed-off-by: Josh Poimboeuf
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/71e2804b973bf39ad3d3b9be10f99f2ea630be46.1450193761.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo
19 Nov, 2015
2 commits
-
Copying it to tools/lib/string.c, the counterpart to the kernel's
lib/string.c.This is preparation for enhancing BPF program configuration, which will
allow config string like 'inlines=yes'.Signed-off-by: Wang Nan
Cc: Alexei Starovoitov
Cc: Jonathan Cameron
Cc: Masami Hiramatsu
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1447675815-166222-6-git-send-email-wangnan0@huawei.com
[ Copied it to tools/lib/string.c instead, to make it usable by other tools/ ]
Signed-off-by: Arnaldo Carvalho de Melo -
That will contain more string functions with counterparts, sometimes
verbatim copies, in the kernel.Acked-by: Wang Nan
Cc: Adrian Hunter
Cc: Alexey Dobriyan
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Link: http://lkml.kernel.org/n/tip-rah6g97kn21vfgmlramorz6o@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
12 Nov, 2015
1 commit
-
list.h needs WRITE_ONCE() since 7f5f873c6a07 ("rculist: Use WRITE_ONCE()
when deleting from reader-visible list") add it before including the
kernel's list.h file.This fixes builds of 'make perf-tar-src-pkg' perf tool tarball builds,
i.e. out of tree builds.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-e0rb8f7jwz0jn24ttyick9u6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
13 Oct, 2015
1 commit
-
Vinson reported build breakage with gcc 4.4 due to strict-aliasing.
CC util/annotate.o
cc1: warnings being treated as errors
util/annotate.c: In function ‘disasm__purge’:
linux-next/tools/include/linux/compiler.h:66: error: dereferencing
pointer ‘res.41’ does break strict-aliasing rulesThe reason is READ_ONCE/WRITE_ONCE code we took from kernel sources. They
intentionaly break aliasing rules. While this is ok for kernel because it's
built with -fno-strict-aliasing, it breaks perf which is build with
-Wstrict-aliasing=3.Using extra __may_alias__ type to allow aliasing in this case.
Reported-and-tested-by: Vinson Lee
Signed-off-by: Jiri Olsa
Cc: Adrian Hunter
Cc: Andi Kleen
Cc: Martin Liska
Cc: Peter Zijlstra
Cc: Rabin Vincent
Cc: linux-next@vger.kernel.org
Link: http://lkml.kernel.org/r/20151013085214.GB2705@krava.brq.redhat.com
Signed-off-by: Arnaldo Carvalho de Melo
01 Oct, 2015
1 commit
-
The error variable breaks build on CentOS 6.7, due to collision with
global error symbol:CC util/evlist.o
cc1: warnings being treated as errors
In file included from util/evlist.c:28:
tools/include/linux/err.h: In function ‘ERR_PTR’:
tools/include/linux/err.h:34: error: declaration of ‘error’ shadows a global declaration
util/util.h:135: error: shadowed declaration is hereUsing 'error_' name instead to fix it.
Signed-off-by: Jiri Olsa
Link: http://lkml.kernel.org/n/tip-i9mdgdbrgauy3fe76s9rd125@git.kernel.org
Reported-by: Vinson Lee
[ Use 'error_' instead of 'err' to, visually, not diverge too much from include/linux/err.h ]
Signed-off-by: Arnaldo Carvalho de Melo
15 Sep, 2015
1 commit
-
Adding part of the kernel's interface:
inline void * __must_check ERR_PTR(long error);
inline long __must_check PTR_ERR(__force const void *ptr);
inline bool __must_check IS_ERR(__force const void *ptr);It will be used to propagate error through pointers in following
patches.Signed-off-by: Jiri Olsa
Reviewed-by: Raphael Beamonte
Cc: David Ahern
Cc: Matt Fleming
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1441615087-13886-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
03 Sep, 2015
1 commit
-
This patch copies filter.h from include/linux/kernel.h to
tools/include/linux/filter.h to enable other libraries to use macros in it,
like libbpf which will be introduced by further patches.Currently, the filter.h copy only contains the useful macros needed by
libbpf for not introducing too much dependence.tools/perf/MANIFEST is also updated for 'make perf-*-src-pkg'.
One change:
The 'imm' field of BPF_EMIT_CALL becomes ((FUNC) - BPF_FUNC_unspec) to
suit user space code generator.Signed-off-by: He Kuang
Cc: David Ahern
Cc: Alexei Starovoitov
Cc: Brendan Gregg
Cc: Daniel Borkmann
Cc: David Ahern
Cc: Jiri Olsa
Cc: Kaixu Xia
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Wang Nan
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1440822125-52691-22-git-send-email-wangnan0@huawei.com
Signed-off-by: Wang Nan
[ Removed stylistic changes, so that a diff to the original file gets reduced ]
Signed-off-by: Arnaldo Carvalho de Melo
25 Aug, 2015
1 commit
-
Commit 3f735377b ("tools: Copy lib/rbtree.c to tools/lib/") has
removed export.h, which was still in use by liblockdep. Restore
it.Signed-off-by: Sasha Levin
Cc: Linus Torvalds
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Link: http://lkml.kernel.org/r/1440479985-6696-1-git-send-email-sasha.levin@oracle.com
Signed-off-by: Ingo Molnar
06 Jul, 2015
4 commits
-
To complete the transitioning to not to share the same files with the
kernel, also moving it from tools/perf/include/linux/ to
tools/include/linux to make the whoke rbtree kit to other tools/ living
codebases.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-5bxyehixafckqm6ez25alnfo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
The previous step, copying the contents minus the rcupdate.h parts, was
done as a minimal fix, now do the move from tools/perf/.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-52fllxtsgmtke66pmv98mcma@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
So that we can remove kernel specific stuff we've been stubbing out via
a tools/include/linux/export.h that gets removed in this patch and to
avoid breakages in the future like the one fixed recently where
rcupdate.h started being used in rbtree.h.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-rxuzfsozpb8hv1emwpx06rm6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
We need it to build rbtree.c after this cset:
commit d72da4a4d973
Author: Peter Zijlstra
Date: Wed May 27 11:09:36 2015 +0930rbtree: Make lockless searches non-fatal
Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-qlnzhezv5ddwst0w9fydju0y@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
03 Jun, 2015
2 commits
-
This patch moves list.h from tools/perf/util/include/linux/list.h to
tools/include/linux/list.h to enable other libraries use macros in it,
like libbpf which will be introduced by further patches. Since list.h
depend on poison.h, poison.h is also moved.Both file use relative path, so one '..' is removed for each header to
make them suit for new directory.MANIFEST is also updated for 'make perf-*-src-pkg'.
Signed-off-by: Wang Nan
Cc: Alexei Starovoitov
Cc: Brendan Gregg
Cc: Daniel Borkmann
Cc: David Ahern
Cc: He Kuang
Cc: Jiri Olsa
Cc: Kaixu Xia
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1433144296-74992-3-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo -
This patch moves kernel.h from tools/perf/util/include/linux/kernel.h
to tools/include/linux/kernel.h to enable other libraries use macros in
it, like libbpf which will be introduced by further patches.MANIFEST is also updated for 'make perf-*-src-pkg'.
Signed-off-by: Wang Nan
Acked-by: Alexei Starovoitov
Cc: Brendan Gregg
Cc: Daniel Borkmann
Cc: David Ahern
Cc: He Kuang
Cc: Jiri Olsa
Cc: Kaixu Xia
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Zefan Li
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1433144296-74992-2-git-send-email-wangnan0@huawei.com
[ Fixed up the ifdef guard to match other entries in tools/include/linux ]
Signed-off-by: Arnaldo Carvalho de Melo
18 May, 2015
1 commit
-
Following patches will introduce linux/bpf.h to a new libbpf library,
which requires definition of __aligned_u64. This patch add it to the
common types.h for tools.Signed-off-by: Wang Nan
Cc: Adrian Hunter
Cc: Alexei Starovoitov
Cc: Brendan Gregg
Cc: Daniel Borkmann
Cc: David Ahern
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: pi3orama@163.com
Cc: Zefan Li
Link: http://lkml.kernel.org/r/1431676290-1230-5-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo
09 May, 2015
2 commits
-
Uses the arch/x86/ kernel code for x86_64/i386, fallbacking to a gcc
intrinsics implementation that has been tested in at least sparc64.Will be used for reference counting in tools/perf.
Acked-by: David Ahern
Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-knfpjowhgyh6x4z0kfuk389j@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
To make it generally accessible by other tools/ projects, also will be
used in the tools/arch/*/include/asm/barrier.h files that are being
introduced now.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-qnjdqwu3vcnt14vqmr6wu788@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
17 Jan, 2015
1 commit
-
We need to use lib/hweight.c for that, just like we do for lib/rbtree.c,
so tools need to link hweight.o. For now do it directly, but we need to
have a tools/lib/lk.a or .so that collects these goodies...Reported-by: Jan Beulich
Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-a1e91dx3apzqw5kbdt7ut21s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
17 Dec, 2014
5 commits
-
To replace equivalent code used in the mmap_pages command line
parameter handling in tools/perf.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-i44zs02xt4zexfxywpklo7km@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Will be used to make sure we pass a power of two when automatically
setting up the perf_mmap addr range length, as the kernel code
validating input on /proc/sys/kernel/perf_event_mlock_kb accepts any
integer, if we plain use it to set up the mmap lenght, we may get an
EINVAL when passing a non power of two.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-zflvep0q01dmkruf4o291l4p@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Will be used when adopting rounddown_pow_of_two.
Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-9m0tt5300q1ygv51hejjas82@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
So that we better mirror the kernel sources and make it available for
other tools.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-mvfu6x753tksnto3t6412m93@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
From tools/perf/util/include/linux, so that it becomes accessible to
other tools/.Cc: Adrian Hunter
Cc: Borislav Petkov
Cc: David Ahern
Cc: Don Zickus
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Mike Galbraith
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Stephane Eranian
Link: http://lkml.kernel.org/n/tip-uqohgzilp3ebd3cbybnf3luc@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
05 May, 2014
1 commit
-
Into tools/include/linux/compiler.h header.
Acked-by: Arnaldo Carvalho de Melo
Acked-by: Peter Zijlstra
Cc: Arnaldo Carvalho de Melo
Cc: Corey Ashford
Cc: Borislav Petkov
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Namhyung Kim
Cc: Paul Mackerras
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/n/tip-9sk90owm370kuq3f0ssjjui2@git.kernel.org
Signed-off-by: Jiri Olsa
02 May, 2014
2 commits
-
Combine all definitions into a common tools/include/linux/types.h and
kill the wild growth elsewhere. Move DECLARE_BITMAP to its proper
bitmap.h header.Signed-off-by: Borislav Petkov
Acked-by: Rusty Russell
Link: http://lkml.kernel.org/n/tip-azczs7qcv6h9xek9od10hiv2@git.kernel.org
Signed-off-by: Jiri Olsa -
So tools/ has been growing three, at a different stage of their
development export.h headers and so we should unite into one. Add
tools/include/ to the include path of virtio and liblockdep to pick the
shared header now.Signed-off-by: Borislav Petkov
Acked-by: Rusty Russell
Cc: Arnaldo Carvalho de Melo
Cc: Ingo Molnar
Cc: Michael S. Tsirkin
Cc: Paul Mackerras
Cc: Peter Zijlstra
Cc: Sasha Levin
Cc: virtio-dev@lists.oasis-open.org
Cc: virtualization@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/1397493185-19521-2-git-send-email-bp@alien8.de
Signed-off-by: Jiri Olsa
18 Feb, 2014
1 commit
-
Put it into tools/include/ for general usage.
Signed-off-by: Borislav Petkov
Cc: David Ahern
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Robert Richter
Link: http://lkml.kernel.org/r/1391611914-26054-3-git-send-email-bp@alien8.de
Signed-off-by: Arnaldo Carvalho de Melo
13 Jan, 2014
2 commits
-
Signed-off-by: Namhyung Kim
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1389276059-8829-3-git-send-email-namhyung@kernel.org
[ Added the new header to tools/perf/MANIFEST ]
Signed-off-by: Arnaldo Carvalho de Melo -
So that it can be shared with others like libtraceevent.
Signed-off-by: Namhyung Kim
Acked-by: Borislav Petkov
Cc: Frederic Weisbecker
Cc: Ingo Molnar
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Steven Rostedt
Link: http://lkml.kernel.org/r/1389276059-8829-2-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo