26 Apr, 2017
1 commit
-
More needs to be done to have the actual functions and variables in a
smaller .c file that can then be included in the python binding,
avoiding dragging more stuff into it.Link: http://lkml.kernel.org/n/tip-uecxz7cqkssouj7tlxrkqpl4@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
21 Apr, 2017
1 commit
-
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
20 Apr, 2017
2 commits
-
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 -
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
27 Mar, 2017
1 commit
-
We got it from the git sources but never used it for anything, with the
place where this would be somehow used remaining:static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
{
prefix = NULL;
if (p->option & RUN_SETUP)
prefix = NULL; /* setup_perf_directory(); */Ditch it.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-uw5swz05vol0qpr32c5lpvus@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
20 Feb, 2017
1 commit
-
It now can have negative value to suppress the message entirely. So it
needs to check it being positive.Signed-off-by: Namhyung Kim
Cc: Jiri Olsa
Cc: Peter Zijlstra
Cc: kernel-team@lge.com
Link: http://lkml.kernel.org/r/20170217081742.17417-3-namhyung@kernel.org
[ Adjust fuzz on tools/perf/util/pmu.c, add > 0 checks in many other places ]
Signed-off-by: Arnaldo Carvalho de Melo
14 Feb, 2017
1 commit
-
When a tool can't open counters due to the kernel.perf_event_paranoit
sysctl setting, we inform how to tweak it to allow the operation to
succeed, in addition to that, suggest setting /etc/sysctl.conf to
make the setting permanent.Suggested-by: Ingo Molnar
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-4gwe99k4a6p12d4u8bbyttj2@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
09 Feb, 2017
1 commit
-
The implicit fall through case label here is intended, so let us inform
that to gcc >= 7:CC /tmp/build/perf/builtin-top.o
builtin-top.c: In function 'display_thread':
builtin-top.c:644:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
if (errno == EINTR)
^
builtin-top.c:647:3: note: here
default:
^~~~~~~Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-lmcfnnyx9ic0m6j0aud98p4e@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
27 Jan, 2017
1 commit
-
Previously these were being ignored, sometimes silently.
Stop doing that, emitting debug messages and handling the errors.
Testing it:
$ cat ~/.perfconfig
cat: /home/acme/.perfconfig: No such file or directory
$ perf stat -e cycles usleep 1Performance counter stats for 'usleep 1':
938,996 cycles:u
0.003813731 seconds time elapsed
$ perf top --stdio
Error:
You may not have permission to collect system-wide stats.Consider tweaking /proc/sys/kernel/perf_event_paranoid,
[ perf record: Captured and wrote 0.019 MB perf.data (7 samples) ]
[acme@jouet linux]$ perf report --stdio
# To display the perf.data header info, please use --header/--header-only options.
# Overhead Command Shared Object Symbol
# ........ ....... ................. .........................
71.77% usleep libc-2.24.so [.] _dl_addr
27.07% usleep ld-2.24.so [.] _dl_next_ld_env_entry
1.13% usleep [kernel.kallsyms] [k] page_fault
$
$ touch ~/.perfconfig
$ ls -la ~/.perfconfig
-rw-rw-r--. 1 acme acme 0 Jan 27 12:14 /home/acme/.perfconfig
$
$ perf stat -e instructions usleep 1Performance counter stats for 'usleep 1':
244,610 instructions:u
0.000805383 seconds time elapsed
$
[root@jouet ~]# chown acme.acme ~/.perfconfig
[root@jouet ~]# perf stat -e cycles usleep 1
Warning: File /root/.perfconfig not owned by current user or root, ignoring it.Performance counter stats for 'usleep 1':
937,615 cycles
0.000836931 seconds time elapsed
#Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-j2rq96so6xdqlr8p8rd6a3jx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
18 Nov, 2016
1 commit
-
Introduce a 'struct arch', where arch specific stuff will live, starting
with objdump's choice of comment delimitation character, that is '#' in
x86 while a ';' in arm.This has some bits and pieces from a patch submitted by Ravi.
Cc: Adrian Hunter
Cc: Alexander Shishkin
Cc: Chris Riyder
Cc: David Ahern
Cc: Jiri Olsa
Cc: Kim Phillips
Cc: Markus Trippelsdorf
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Naveen N. Rao
Cc: Pawel Moll
Cc: Peter Zijlstra
Cc: Ravi Bangoria
Cc: Taeung Song
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-f337tzjjcl8vtapgvjxmhrbx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
23 Sep, 2016
1 commit
-
Now that the required mechanic is there to deal with PMU specific
configuration, add the functionality to the tools where events can be
selected.Signed-off-by: Mathieu Poirier
Acked-by: Jiri Olsa
Cc: Alexander Shishkin
Cc: Peter Zijlstra
Cc: linux-arm-kernel@lists.infradead.org
Link: http://lkml.kernel.org/r/1474041004-13956-7-git-send-email-mathieu.poirier@linaro.org
[ Fix the build on XSI-compliant systems, using str_error_r() to make sure we return a string, not an integer ]
Signed-off-by: Arnaldo Carvalho de Melo
05 Sep, 2016
2 commits
-
Not needed, we already have code to prune aliases.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-1ysyce7qjgui93gi1efbjwhf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
This was being done just in 'perf top', but grouping idle symbols should
be useful in other places as well, so remove one more symbol_filter_t
user by moving this to the symbol library.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-5r7xitjkzjr9jak1zy3d8u5l@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
30 Aug, 2016
2 commits
-
Since this is the only use thus far, and this mechanism is in place for
a long time. To clarify why symbols should be skipped or treated
differently, name it for the only use it has.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-oqpf82x2svir611ry15paufd@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
We need to initializa some fields (right now just a mutex) when we
allocate the per symbol annotation struct, so do it at the symbol
constructor instead of (ab)using the filter mechanism for that.This way we remove one of the few cases we have for that symbol filter,
which will eventually led to removing it.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-cvz34avlz1lez888lob95390@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
24 Aug, 2016
1 commit
-
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Steven Rostedt
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-iof4j6mutyogdeie1sj98dhv@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
02 Aug, 2016
2 commits
-
We were just using pr_error() which makes it difficult for non stdio UIs
to provide errors using its widgets, as they need to somehow catch what
was passed to pr_error().Fix it by introducing a __strerror() interface like the ones used
elsewhere, for instance target__strerror().This is just the initial step, more work will be done, but first some
error handling bugs noticed while working on this need to be dealt with.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-dgd22zl2xg7x4vcnoa83jxfb@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
This function will not annotate anything, it will just disassembly the
given map->dso and symbol.It currently does this by parsing the output of 'objdump --disassemble',
but this could conceivably be done using a library or an offshot of
the kernel's instruction decoder (arch/x86/lib/inat.c), etc.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-2xpfl4bfnrd6x584b390qok7@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
13 Jul, 2016
1 commit
-
The tools so far have been using the strerror_r() GNU variant, that
returns a string, be it the buffer passed or something else.But that, besides being tricky in cases where we expect that the
function using strerror_r() returns the error formatted in a provided
buffer (we have to check if it returned something else and copy that
instead), breaks the build on systems not using glibc, like Alpine
Linux, where musl libc is used.So, introduce yet another wrapper, str_error_r(), that has the GNU
interface, but uses the portable XSI variant of strerror_r(), so that
users rest asured that the provided buffer is used and it is what is
returned.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-d4t42fnf48ytlk8rjxs822tf@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
23 Jun, 2016
2 commits
-
To match the semantics for list.h in the kernel, that are used to
implement those macros.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Milian Wolff
Cc: Namhyung Kim
Cc: Taeung Song
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-qbcjlgj0ffxquxscahbpddi3@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Lately util/config.h has been added but util/cache.h has declarations of
functions and a global variable for config features.To manage codes about configuration at one spot, move them to
util/config.h and let source files that need config features include
config.h And if the source files that included previous cache.h need
only config.h, remove including cache.h.Signed-off-by: Taeung Song
Cc: Alexander Shishkin
Cc: Jiri Olsa
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: Peter Zijlstra
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1466672119-4852-2-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo
15 Jun, 2016
1 commit
-
It will be convenient in following patches to display hists entries
without callchains even if they are defined.Signed-off-by: Jiri Olsa
Cc: David Ahern
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1465928361-2442-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
20 May, 2016
1 commit
-
Its now there, no need to have it too.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Milian Wolff
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-y18oeou494uy11im7u9to0dx@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
06 May, 2016
3 commits
-
Now we have sort dimensions private for struct hists, we need to make
dimension booleans hists specific as well.Moving sort__has_socket into struct perf_hpp_list.
Signed-off-by: Jiri Olsa
Cc: David Ahern
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1462276488-26683-6-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Now we have sort dimensions private for struct hists, we need to make
dimension booleans hists specific as well.Moving sort__has_sym into struct perf_hpp_list.
Signed-off-by: Jiri Olsa
Cc: David Ahern
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1462276488-26683-4-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Now we have sort dimensions private for struct hists, we need to make
dimension booleans hists specific as well.Moving sort__need_collapse into struct perf_hpp_list.
Adding hists__has macro to easily access this info perf struct hists
object.Signed-off-by: Jiri Olsa
Cc: David Ahern
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1462276488-26683-2-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
27 Apr, 2016
1 commit
-
There is an upper limit to what tooling considers a valid callchain,
and it was tied to the hardcoded value in the kernel,
PERF_MAX_STACK_DEPTH (127), now that this can be tuned via a sysctl,
make it read it and use that as the upper limit, falling back to
PERF_MAX_STACK_DEPTH for kernels where this sysctl isn't present.Cc: Adrian Hunter
Cc: Brendan Gregg
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Milian Wolff
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-yjqsd30nnkogvj5oyx9ghir9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
18 Apr, 2016
2 commits
-
One more step in the direction of using just callchain_param for
callchain parameters.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Milian Wolff
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-3b1o9kb2dc94zldz0klckti6@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
We have callchain_param.enabled for that.
Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Milian Wolff
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-silwqjc2t25ls42dsvg28pp5@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
12 Apr, 2016
1 commit
-
Instead receive a callchain_param pointer to configure callchain
aspects, not doing so if NULL is passed.This will allow fine grained control over which evsels in an evlist
gets callchains enabled.Cc: Adrian Hunter
Cc: David Ahern
Cc: Jiri Olsa
Cc: Milian Wolff
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-2mupip6khc92mh5x4nw9to82@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
24 Mar, 2016
1 commit
-
Use instead the copy just made to tools/include/linux/.
Cc: Adrian Hunter
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-q736w12nwy98x5ox2hamp5ow@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
23 Mar, 2016
2 commits
-
Since we only deal with fields in the passed struct perf_sample move
this method to struct machine, that is where the perf_sample fields
will be resolved to a struct addr_location, i.e. thread, map, symbol,
etc.Cc: Adrian Hunter
Cc: Hemant Kumar
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Naveen N. Rao
Cc: Ravi Bangoria
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-a1ww2lbm2vbuqsv4p7ilubu9@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
To avoid parsing event->header.misc in many locations.
This will also allow setting perf.sample.{ip,cpumode} in a single place,
from tracepoint fields, as needed by 'perf kvm' with PPC guests, where
the guest hardware counters is not available at the host.Cc: Adrian Hunter
Cc: Hemant Kumar
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Naveen N. Rao
Cc: Ravi Bangoria
Cc: Wang Nan
Link: http://lkml.kernel.org/n/tip-qp3yradhyt6q3wl895b1aat0@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
27 Feb, 2016
1 commit
-
Before this patch each subcommand calls perf_config() by themself,
reading the default configuration together with subcommand specific
options. If a subcommand doesn't have it own options, it needs to call
'perf_config(perf_default_config, NULL)' to ensure .perfconfig is
loaded.This patch brings perf_config(perf_default_config, NULL) to the very
start of main(), so subcommands don't need to do it.After this patch, 'llvm.clang-path' works for 'perf trace'.
Signed-off-by: Wang Nan
Suggested-and-Tested-by: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov
Cc: Jiri Olsa
Cc: Li Zefan
Cc: Masami Hiramatsu
Cc: Namhyung Kim
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1456479154-136027-4-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo
25 Feb, 2016
1 commit
-
Support hierarchy output for perf-top using --hierarchy option.
Signed-off-by: Namhyung Kim
Acked-by: Pekka Enberg
Cc: Andi Kleen
Cc: David Ahern
Cc: Jiri Olsa
Cc: Peter Zijlstra
Cc: Stephane Eranian
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1456326830-30456-19-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
03 Feb, 2016
2 commits
-
The ui initialization changes hpp format callbacks, based on the used
browser. Thus we need this init being processed before setup_sorting.Replica of a patch by Jiri for 'perf report'.
Cc: David Ahern
Cc: Jiri Olsa
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1453109064-1026-9-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
Adding evsel specific function to sort hists_evsel based hists. The
hists__output_resort can be now used to sort common hists object.Signed-off-by: Jiri Olsa
Cc: David Ahern
Cc: Namhyung Kim
Cc: Peter Zijlstra
Link: http://lkml.kernel.org/r/1453109064-1026-3-git-send-email-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo
07 Jan, 2016
3 commits
-
The --raw-trace option allows disabling pretty printing by the event's
print_fmt or plugin. Besides that, each dynamic sort key now can
receive a 'raw' suffix separated by '/' to ask for the raw trace of a
specific field.$ perf report -s comm,kmem:kmalloc.gfp_flags
...
# Overhead Command gfp_flags
# ........ ....... ...................
#
99.89% perf GFP_NOFS|GFP_ZERO
0.06% sleep GFP_KERNEL
0.03% perf GFP_KERNEL|GFP_ZERO
0.01% perf GFP_KERNELNow
$ perf report -s comm,kmem:kmalloc.gfp_flags --raw-trace
or
$ perf report -s comm,kmem:kmalloc.gfp_flags/raw
...
# Overhead Command gfp_flags
# ........ ....... ..........
#
99.89% perf 32848
0.06% sleep 208
0.03% perf 32976
0.01% perf 208Suggested-and-Acked-by: Jiri Olsa
Signed-off-by: Namhyung Kim
Tested-by: Arnaldo Carvalho de Melo
Cc: Andi Kleen
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Jiri Olsa
Cc: Peter Zijlstra
Cc: Steven Rostedt
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1450804030-29193-9-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo -
This is a preparation to support dynamic sort keys for tracepoint
events. Dynamic sort keys can be created for specific fields in trace
events so it needs the event information.Signed-off-by: Namhyung Kim
Acked-by: Jiri Olsa
Cc: Andi Kleen
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Steven Rostedt
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1450804030-29193-5-git-send-email-namhyung@kernel.org
[ Moving the evlist creation earlier in top was split to a previous patch ]
Signed-off-by: Arnaldo Carvalho de Melo -
This is a preparation to support dynamic sort keys for tracepoint
events. Dynamic sort keys can be created for specific fields in trace
events so it needs the event information, so we need to pass the evlist
to the sort routines, create it sooner so that the next patch can do
that.Signed-off-by: Namhyung Kim
Acked-by: Jiri Olsa
Cc: Andi Kleen
Cc: David Ahern
Cc: Frederic Weisbecker
Cc: Peter Zijlstra
Cc: Steven Rostedt
Cc: Wang Nan
Link: http://lkml.kernel.org/r/1450804030-29193-5-git-send-email-namhyung@kernel.org
[ Split from the patch passing the evlist to the sort routines ]
Signed-off-by: Arnaldo Carvalho de Melo