24 Apr, 2017
1 commit
-
No need to have this polluting util.h, it was polluted enough already.
Link: http://lkml.kernel.org/n/tip-wfdidqlwbvi5y0s61kv6z2gn@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
21 Apr, 2017
4 commits
-
We already have a header for time utilities, so use it.
Link: http://lkml.kernel.org/n/tip-sijzpbvutlg0c3oxn49hy9ca@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Out of util.h, to disentangle it a bit more.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-vpksyj3w5fk9t8s6mxmkajyr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
And remove it from util.h, disentangling it a bit more.
Link: http://lkml.kernel.org/n/tip-2zg9s5nx90yde64j3g4z2uhk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
No need to drag the headers, helps in untangling them and reducing build
time.Link: http://lkml.kernel.org/n/tip-l8soqph92duyw5jdha0fij8b@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
20 Apr, 2017
30 commits
-
…nux/kernel/git/acme/linux into perf/core
Pull perf/core cleanups from Arnaldo Carvalho de Melo:
- Introduce new header files out of the hodge-podge that util/util.h
became, trying to disentangle the includes hell that all C projects
end up growing. This should help in build times, as changes to
seemingly unrelated files (util.h included tons of headers) won't
trigger a rebuild of most object files.- Use equivalent facilities found in the kernel source code base
originated tools/include/ header files, such as __stringify(),
ARRAY_SIZE, that has extra checks (__must_be_array()), etc.- For that get some more files from the kernel sources, like
include/linux/bug.h, some just with the bits needed at this time.- Use the headers where facilities declared in them are used, such
as PRIxu(32,64) macros (inttypes.h), errno defines (errno.h), etc.- Remove various leftovers from the initial code base we copied from
git.git: FLEX_ARRAY, etc.Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Remnants from the git codebase.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-kwaez3uxo1w9f8v5r7etl0w6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
The users of regex and fnmatch functions should include those headers
instead.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-ixzm5kuamsq1ixbkuv6kmwzj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
The files using the dirent.h routines should instead include it,
reducing the includes hell that lead to longer build times.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-42g2f4z6nfg7mdb2ae97n7tj@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Those args _are_ being used.
Link: http://lkml.kernel.org/n/tip-yi9s00ki1i1tcc704v042957@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Instead of getting it out of luck from util.h, where it isn't needed at
all.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-0bqugg5lc5ksla1v4m0dnmc1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
When we switched to the kernel's roundup_pow_of_two we forgot to remove
this include from util.h, do it now.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Fixes: 91529834d1de ("perf evlist: Use roundup_pow_of_two")
Link: http://lkml.kernel.org/n/tip-kfye5rxivib6155cltx0bw4h@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Disentangling util.h header mess a bit more.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-aj6je8ly377i4upedmjzdsq6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Continuing the disentanglement, mostly the TUI needs CTRL(c), that is
in sys/ttydefaults.h and term.c needs the termios headers.And term.h needs to be added to a few places too.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-il19zna7qj9ytavdbwlipc7t@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
There are places where we just need a forward declaration, and others
were we need to include strlist.h and/or strfilter.h, reducing the
impact of changes in headers on the build time, do it.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-zab42gbiki88y9k0csorxekb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Removing it from util.h, part of an effort to disentangle the includes
hell, that makes changes to util.h or something included by it to cause
a complete rebuild of the tools.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-ztrjy52q1rqcchuy3rubfgt2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Moving them from util.h, where they don't belong. Since libc already
have string.h, name it slightly differently, as string2.h.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-eh3vz5sqxsrdd8lodoro4jrw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Out of util.h into a new file, srcline.h
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-ludnlm4djqcdjziekzr4s3u9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Continuing the split of util.[ch] into more manageable bits.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-5eu367rwcwnvvn7fz09l7xpb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-7wj865zidu5ylf87i6i7v6z7@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
More stuff that came from git, out of the hodge-podge that is util.h
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-e3lana4gctz3ub4hn4y29hkw@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Should make sense for windows, where git is supported.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-lzxlhmqrizk72d0zcsreggy8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Both do the same thing, the later is the one we get from
linux/stringify.h, i.e. we now use the same function name/practice as
the kernel sources.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-w2sxa5o4bfx7fjrd5mu4zmke@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
We get them from inttypes.h.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-qla4e4mwbf1oewafp1ee2etd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Needed to use the PRI[xu](32,64) formatting macros.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-wkbho8kaw24q67dd11q0j39f@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
TYPEOF(), for instance, was only used by MSB() that wasn't used at all,
besides typeof() is used in many places, should be the preferred way.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-golox8oa2w1oq28snki14z6s@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
As tools/include/linux/kernel.h has it now, with the goodies present in
the kernel.h counterpart, i.e. checking that the parameter is an array
at build time.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Josh Poimboeuf
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-v0b41ivu6z6dyugbq9ffa9ez@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
And with the goodies present in the kernel.h counterpart, i.e. checking
that the parameter is an array at build time.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Josh Poimboeuf
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-roiwxwgwgld4kygn65if60wa@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
To pave the way for further cleanups where linux/kernel.h may stop being
included in some header.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-qqxan6tfsl6qx3l0v3nwgjvk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
To match the kernel, then look for places redefining it to make it use
this version, which checks that its parameter is an array at build time.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-txlcf1im83bcbj6kh0wxmyy8@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Will be used to adopt the more stringent version of ARRAY_SIZE(), the
one in the kernel sources.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-d85dpvay1hoqscpezlntyd8x@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
With just what we will need in the upcoming changesets, the
BUILD_BUG_ON_ZERO() definition.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-lw8zg7x6ttwcvqhp90mwe3vo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
We rely on symbol->name[0] since the beginning of tools/perf/, never
having received any complaint about it, also all the containers build
perf just fine, so remove this git codebase remnant.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-jsjpgojut8e22o2gtz83augk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Since it uses EINVAL unconditionally, it needs to also unconditionally
include errno.h.Detected when recent changes made errno.h not be included by chance when
tools/perf/arch/arm64/util/unwind-libunwind.c gets included by
tools/perf/util/libunwind/arm64.c.Putting this changeset just before that change so that we don't lose
bisectability on arm64.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jean Pihet
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Fixes: 8ab596afb97b ("perf tools ARM64: Wire up perf_regs and unwind support")
Link: http://lkml.kernel.org/n/tip-60zjev2o1locp5ivod38epa2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
17 Apr, 2017
1 commit
-
…nux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes Arnaldo Carvalho de Melo:
User visible changes:
- Fix 'perf stat' bug in handling events in error state (Stephane Eranian)
Documentation changes:
- Add usage of --no-syscalls in 'perf trace' man page (Ravi Bangoria)
Infrastructure changes:
- Pass PYTHON config to feature detection (David Carrillo-Cisneros)
- Disable JVMTI if no ELF support available (David Carrillo-Cisneros)
- Fix feature detection redefinion of build flags (David Carrillo-Cisneros)
- Hint missing file when tool tips fail to load (David Carrillo-Cisneros)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
14 Apr, 2017
3 commits
-
Spurious NMIs will be observed with the following command:
while :; do
perf record -bae "cpu/umask=0x01,event=0xcd,ldlat=0x80/pp"
-e "cpu/umask=0x03,event=0x0/"
-e "cpu/umask=0x02,event=0x0/"
-e cycles,branches,cache-misses
-e cache-references -- sleep 10
doneThe bug was introduced by commit:
8077eca079a2 ("perf/x86/pebs: Add workaround for broken OVFL status on HSW+")
That commit clears the status bits for the counters used for PEBS
events, by masking the whole 64 bits pebs_enabled. However, only the
low 32 bits of both status and pebs_enabled are reserved for PEBS-able
counters.For status bits 32-34 are fixed counter overflow bits. For
pebs_enabled bits 32-34 are for PEBS Load Latency.In the test case, the PEBS Load Latency event and fixed counter event
could overflow at the same time. The fixed counter overflow bit will
be cleared by mistake. Once it is cleared, the fixed counter overflow
never be processed, which finally trigger spurious NMI.Correct the PEBS enabled mask by ignoring the non-PEBS bits.
Signed-off-by: Kan Liang
Signed-off-by: Peter Zijlstra (Intel)
Cc: Alexander Shishkin
Cc: Arnaldo Carvalho de Melo
Cc: Jiri Olsa
Cc: Linus Torvalds
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Thomas Gleixner
Cc: Vince Weaver
Fixes: 8077eca079a2 ("perf/x86/pebs: Add workaround for broken OVFL status on HSW+")
Link: http://lkml.kernel.org/r/1491333246-3965-1-git-send-email-kan.liang@intel.com
Signed-off-by: Ingo Molnar -
Signed-off-by: Ingo Molnar
-
When the perf_branch_entry::{in_tx,abort,cycles} fields were added,
intel_pmu_lbr_read_32() wasn't updated to initialize them.Signed-off-by: Peter Zijlstra (Intel)
Cc: Linus Torvalds
Cc: Peter Zijlstra
Cc: Thomas Gleixner
Cc: linux-kernel@vger.kernel.org
Cc:
Fixes: 135c5612c460 ("perf/x86/intel: Support Haswell/v4 LBR format")
Signed-off-by: Ingo Molnar
13 Apr, 2017
1 commit
-
In https://lkml.org/lkml/2017/2/2/16 I reported a build error that I
believed was caused by wrong uapi includes. The synthom was fixed by
Arnaldo in:commit 2f7db5557994 ("perf tools: Fix include of linux/mman.h")
but I was wrong attributing the problem to the uapi include.
The root cause was that I was using ARCH=x86_64, hence using the wrong
uapi include path. This explains why no one else ran into this build
problem.Signed-off-by: David Carrillo-Cisneros
Acked-by: Jiri Olsa
Cc: Alexander Shishkin
Cc: Andi Kleen
Cc: He Kuang
Cc: Masami Hiramatsu
Cc: Paul Turner
Cc: Peter Zijlstra
Cc: Simon Que
Cc: Stephane Eranian
Cc: Wang Nan
Link: http://lkml.kernel.org/r/20170412064919.92449-8-davidcc@google.com
Signed-off-by: Arnaldo Carvalho de Melo