Arnaldo Carvalho de Melo
25cd480e44
tools: Remove bitops/hweight usage of bits in tools/perf
...
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 <[email protected] >
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2015-01-16 17:49:29 -03:00
Arnaldo Carvalho de Melo
bd1857948e
tools: Adopt roundup_pow_of_two
...
To replace equivalent code used in the mmap_pages command line
parameter handling in tools/perf.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:58:15 -03:00
Arnaldo Carvalho de Melo
fa37c025c5
tools: Adopt rounddown_pow_of_two and deps
...
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 <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:58:13 -03:00
Arnaldo Carvalho de Melo
afcd4f6235
tools: Adopt fls_long and deps
...
Will be used when adopting rounddown_pow_of_two.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:58:08 -03:00
Arnaldo Carvalho de Melo
3967278496
tools: Move bitops.h from tools/perf/util to tools/
...
So that we better mirror the kernel sources and make it available for
other tools.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:17:53 -03:00
Arnaldo Carvalho de Melo
88bcea43fd
tools: Introduce asm-generic/bitops.h
...
In preparation for moving linux/bitops.h from tools/perf/util/ to
tools/include/.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:16:25 -03:00
Arnaldo Carvalho de Melo
23e1a358e8
tools lib: Move asm-generic/bitops/find.h code to tools/include and tools/lib
...
To match the Linux kernel source code structure from where this code came from.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:14:48 -03:00
Arnaldo Carvalho de Melo
cae68d4f6a
tools: Move code originally from asm-generic/atomic.h into tools/include/asm-generic/
...
To match the Linux kernel source code structure from where this code came from.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:11:52 -03:00
Arnaldo Carvalho de Melo
0389cd1f5f
tools: Move code originally from linux/log2.h to tools/include/linux/
...
From tools/perf/util/include/linux, so that it becomes accessible to
other tools/.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:09:41 -03:00
Arnaldo Carvalho de Melo
2dc0b97219
tools: Move __ffs implementation to tools/include/asm-generic/bitops/__ffs.h
...
To match the Linux kernel source code structure from where this code came from.
Cc: Adrian Hunter <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Don Zickus <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Mike Galbraith <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Stephane Eranian <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-12-17 11:09:34 -03:00
Peter Foley and Jiri Kosina
ec84284b00
tools: add more endian.h macros
...
Add some more macros to tools/endian.h to allow mpssd to be compiled
against glibc < 2.9.
Signed-off-by: Peter Foley <[email protected] >
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Randy Dunlap <[email protected] >
Signed-off-by: Jiri Kosina <[email protected] >
2014-09-26 11:03:01 +02:00
Peter Foley and Jiri Kosina
8c2b0dc83d
Documentation: support glibc versions without htole macros
...
glibc 2.9 introduced the htole<16/32/64> macros, add them to
tools/include to support older versions of glibc.
Reported-by: Andrew Morton <[email protected] >
Signed-off-by: Peter Foley <[email protected] >
Signed-off-by: Randy Dunlap <[email protected] >
Signed-off-by: Jiri Kosina <[email protected] >
2014-09-26 11:02:58 +02:00
Jiri Olsa
73a31b7c6a
perf tools: Move ACCESS_ONCE from perf.h header
...
Into tools/include/linux/compiler.h header.
Acked-by: Arnaldo Carvalho de Melo <[email protected] >
Acked-by: Peter Zijlstra <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Corey Ashford <[email protected] >
Cc: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Jiri Olsa <[email protected] >
2014-05-05 17:49:07 +02:00
Borislav Petkov and Jiri Olsa
d944c4eebc
tools: Consolidate types.h
...
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 <[email protected] >
Acked-by: Rusty Russell <[email protected] >
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Jiri Olsa <[email protected] >
2014-05-01 21:22:39 +02:00
Borislav Petkov and Jiri Olsa
5ac3e4b6d1
tools: Unify export.h
...
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 <[email protected] >
Acked-by: Rusty Russell <[email protected] >
Cc: Arnaldo Carvalho de Melo <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Michael S. Tsirkin <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Sasha Levin <[email protected] >
Cc: [email protected]
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Jiri Olsa <[email protected] >
2014-05-01 21:18:17 +02:00
Borislav Petkov and Arnaldo Carvalho de Melo
0e55fa1131
perf tools: Move hash.h header
...
Put it into tools/include/ for general usage.
Signed-off-by: Borislav Petkov <[email protected] >
Cc: David Ahern <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Peter Zijlstra <[email protected] >
Cc: Robert Richter <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-02-18 09:34:49 -03:00
Namhyung Kim and Arnaldo Carvalho de Melo
741a0c5903
tools include: Include <linux/compiler.h> from asm/bug.h
...
Since it uses unlikely() macro inside WARN()
Signed-off-by: Namhyung Kim <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-01-13 10:14:13 -03:00
Namhyung Kim and Arnaldo Carvalho de Melo
02dfc8d775
tools include: Move perf's bug.h to a generic place
...
So that it can be shared with others like libtraceevent.
Signed-off-by: Namhyung Kim <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
[ Added the new header to tools/perf/MANIFEST ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-01-13 10:06:26 -03:00
Namhyung Kim and Arnaldo Carvalho de Melo
835d44b904
tools include: Define likely/unlikely in linux/compiler.h
...
Signed-off-by: Namhyung Kim <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
[ Added the new header to tools/perf/MANIFEST ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-01-13 10:06:26 -03:00
Namhyung Kim and Arnaldo Carvalho de Melo
8a625c1f61
tools include: Move perf's linux/compiler.h to a generic place
...
So that it can be shared with others like libtraceevent.
Signed-off-by: Namhyung Kim <[email protected] >
Acked-by: Borislav Petkov <[email protected] >
Cc: Frederic Weisbecker <[email protected] >
Cc: Ingo Molnar <[email protected] >
Cc: Jiri Olsa <[email protected] >
Cc: Namhyung Kim <[email protected] >
Cc: Steven Rostedt <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected] >
2014-01-13 10:06:25 -03:00
Yaakov Selkowitz and Michal Marek
b35310627f
tools/include: use stdint types for user-space byteshift headers
...
Commit a07f7672d7 added user-space copies
of the byteshift headers to be used by hostprogs, changing e.g. u8 to __u8.
However, in order to cross-compile the kernel from a non-Linux system,
stdint.h types need to be used instead of linux/types.h types.
Signed-off-by: Yaakov Selkowitz <[email protected] >
Signed-off-by: Michal Marek <[email protected] >
2013-07-03 16:02:28 +02:00
Matt Fleming and H. Peter Anvin
a07f7672d7
tools/include: Add byteshift headers for endian access
...
There are various hostprogs in the kernel that are rolling their own
implementations of {get,put}_unaligned_le*(). Copy the byteshift
headers from include/linux/unaligned so that they can all use a single
implementation.
This requires changing some of the data types to the userspace
exported ones (u32 -> __u32, etc).
Signed-off-by: Matt Fleming <[email protected] >
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: H. Peter Anvin <[email protected] >
2012-02-28 10:22:51 -08:00