- 13 Dec, 2013 10 commits
-
-
Namhyung Kim authored
The realloc() should check return value and not to overwrite previous pointer in case of error. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386833777-3790-3-git-send-email-namhyung@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Namhyung Kim authored
Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386833777-3790-2-git-send-email-namhyung@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Ramkumar Ramachandra authored
Currently, there is no way to enumerate the subcommands under 'perf kvm', so hardcode them. Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com> Link: http://lkml.kernel.org/r/1386758056-24618-2-git-send-email-artagnon@gmail.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
Add a function to move a selected event to the front of the list. This is needed because it is not possible to use the PERF_EVENT_IOC_SET_OUTPUT IOCTL from an Instruction Tracing event to a non-Instruction Tracing event. Thus the Instruction Tracing event must come first. Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386765443-26966-24-git-send-email-alexander.shishkin@linux.intel.comSigned-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
David Ahern authored
Commit 1902efe7 for the new comm infra added the wrong check for return code on thread__set_comm. err == 0 is normal, so don't return at that point unless err != 0. Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/1386736538-23525-1-git-send-email-dsahern@gmail.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
Move functions mem_bswap_32() and mem_bswap_64() so they can be reused. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386765443-26966-21-git-send-email-alexander.shishkin@linux.intel.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
Add a function to determine whether an event can be selected. This function is needed to allow a tool to automatically select additional events, but only if they are available. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386765443-26966-18-git-send-email-alexander.shishkin@linux.intel.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
It will be necessary to predetermine header->data_offset to allow space for attributes that are added later. Consequently, do not change header->data_offset if it is non-zero. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386765443-26966-17-git-send-email-alexander.shishkin@linux.intel.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
Add a function to return the value of /proc/sys/kernel/perf_event_paranoid. This will be used to determine default values for mmap size because perf is not subject to mmap limits when perf_event_paranoid is less than zero. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386765443-26966-12-git-send-email-alexander.shishkin@linux.intel.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
Eventually this should be useful to other tools/ living utilities. For now don't try to build any .a, just trying the minimal approach of separating existing code into multiple .c files that can then be included wherever they are needed, using whatever build machinery already in place. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@alien8.de> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-pfa8i5zpf4bf9rcccryi0lt3@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
- 11 Dec, 2013 2 commits
-
-
Peter Zijlstra authored
Remove a full barrier from the ring-buffer write path by relying on a control dependency to order a LOAD -> STORE scenario. Cc: "Paul E. McKenney" <paulmck@us.ibm.com> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/n/tip-8alv40z6ikk57jzbaobnxrjl@git.kernel.orgSigned-off-by: Ingo Molnar <mingo@kernel.org>
-
Ingo Molnar authored
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: * Add an option in 'perf script' to print the source line number, from Adrian Hunter * Add --header/--header-only options to 'script' and 'report', the default is not tho show the header info, but as this has been the default for some time, leave a single line explaining how to obtain that information, from Jiri Olsa. * Fix symoff printing in callchains in 'perf script', from Adrian Hunter. * Assorted mmap_pages handling fixes, from Adrian Hunter. * Fix summary percentage when processing files in 'perf trace', from David Ahern. * Handle old kernels where the "raw_syscalls" tracepoints were called plan "syscalls", in 'perf trace', from David Ahern. * Several man pages typo fixes from Dongsheng Yang. * Add '-v' option to 'perf kvm', from Dongsheng Yang. * Make perf kvm diff support --guestmount, from Dongsheng Yang. * Get rid of several die() calls in libtraceevent, from Namhyung Kim. * Use basename() in a more robust way, to avoid problems related to different system library implementations for that function, from Stephane Eranian. * Remove open coded management of short_name_allocated member, from Adrian Hunter * Several cleanups in the "dso" methods, constifying some parameters and renaming some fields to clarify its purpose. (Arnaldo Carvalho de Melo.) * Add per-feature check flags, fixing libunwind related build problems on some architectures, from Jean Pihet. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
-
- 10 Dec, 2013 14 commits
-
-
Jean Pihet authored
Use the per-feature check flags for the unwinding feature in order to correctly compile the test-all, libunwind and libunwind-debug-frame feature checks. Tested on x86_64, ARMv7 and ARMv8 with and without LIBUNWIND_DIR set in 'make -C tools/perf' Signed-off-by: Jean Pihet <jean.pihet@linaro.org> Acked-by: Ingo Molnar <mingo@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linaro-kernel@lists.linaro.org Cc: patches@linaro.org Link: http://lkml.kernel.org/r/1386678244-13535-3-git-send-email-jean.pihet@linaro.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Jean Pihet authored
Add CFLAGS and LDFLAGS for each feature to be checked. This allows to pass flags and parameters to the feature checks compilation. Also simplifies the feature check makefile, to come in a subsequent patch. Signed-off-by: Jean Pihet <jean.pihet@linaro.org> Acked-by: Ingo Molnar <mingo@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Will Deacon <will.deacon@arm.com> Cc: linaro-kernel@lists.linaro.org Cc: patches@linaro.org Link: http://lkml.kernel.org/r/1386678244-13535-2-git-send-email-jean.pihet@linaro.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Stephane Eranian authored
The basename() implementation varies a lot between systems. The Linux man page says: "basename may modify the content of the path, so it may be desirable to pass a copy when calling the function". On some other systems, the returned address may come from an internal buffer which can be reused in subsequent calls, thus the results should also be copied. The dso__set_basename() function was not doing this causing problems on some systems with wrong library names being shown by perf report, such as on Android systems. This patch fixes the problem. The patch is relative to tip.git. In v2, we clean up the comments based on Ingo's feedback. Reported-by: Ben Cheng <bccheng@google.com> Signed-off-by: Stephane Eranian <eranian@google.com> Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Ben Cheng <bccheng@google.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/20131205182642.GA14614@quad [ v3: Fixed up wrt allocated flag now being set in dso__set_short_name ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
The 'file' is more commonly associated with a file descriptor of some sort, rename it to 'filename' as this is the more common idiom for a file name argument. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-0ehaawv5xc83w6ag03c5hi10@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
Those methods are not supposed to change the data structures they manipulate, so make that clearer by using the const qualifier in the function signature and in some variables. Suggested-by: Ingo Molnar <mingo@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-j7oyakex7zy3r82h33rdw25x@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
To help in debugging use after free bugs. Reported-by: Ingo Molnar <mingo@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-3ckwsob2g1q23s77nuhexrq7@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
Same reason as for dso->short_name, it may point to a const string, and in most places it is treated as const, i.e. it is just accessed for using its contents as a key or to show it on reports. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-nf7mxf33zt5qw207pbxxryot@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
Instead of expecting callers to set this member accodingly so that later at dso destruction it can, if needed, be correctly free()d, make it a requirement by passing it as a parameter to dso__set_long_name. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-na7t1tqim22vuqkt4zq5n4ri@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
This is a preparatory patch to do with dso__set_long_name what was done with the short name variant. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-mb7eqhkyejq1qcf3p22wz2x7@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
Instead of expecting callers to set this member accodingly so that later at dso destruction it can, if needed, be correctly free()d, make it a requirement by passing it as a parameter to dso__set_short_name. Cc: Andi Kleen <ak@linux.intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> CC: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Link: http://lkml.kernel.org/r/52A707A2.5020802@intel.com [ Renamed the 'allocated' parameter to clearly indicate to which variable it refers to. ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
Use dso__set_short_name instead, as it will release any previously, possibly allocated, short name. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-1v39elw7v6nxczpntpp7ljwr@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Arnaldo Carvalho de Melo authored
So we now have: dso->short_name dso->short_name_len dso->short_name_allocated Ditto for the 'long variants. To more quickly grasp what they refer to. Suggested-by: Ingo Molnar <mingo@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-nu228f8vlp9w0lr7c0q77dqi@git.kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Jiri Olsa authored
Currently the perf.data header is always displayed for stdio output, which is no always useful. Disabling header information by default and adding following options to control header output: --header - display header information --header-only - display header information only w/o further processing Signed-off-by: Jiri Olsa <jolsa@redhat.com> Link: http://lkml.kernel.org/n/tip-0ehaawv5xc83w6ag03c5hi10@git.kernel.org Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386583370-1699-3-git-send-email-jolsa@redhat.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Jiri Olsa authored
Currently the perf.data header is always displayed for stdio output, which is no always useful. Disabling header information by default and adding following options to control header output: --header - display header information (old default) --header-only - display header information only w/o further processing, forces stdio output Signed-off-by: Jiri Olsa <jolsa@redhat.com> Acked-by: David Ahern <dsahern@gmail.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386583370-1699-2-git-send-email-jolsa@redhat.com [ Added single line explaining talking about the new --header* options, to address David Ahern comment; better man page entry for the new options, from Namhyung Kim ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
- 09 Dec, 2013 14 commits
-
-
Namhyung Kim authored
Change the function signature to return error code and not call die() anymore. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386567251-22751-13-git-send-email-namhyung@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Namhyung Kim authored
Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386567251-22751-12-git-send-email-namhyung@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Namhyung Kim authored
Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386567251-22751-9-git-send-email-namhyung@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Namhyung Kim authored
Make it return error value since its only caller find_event() now can handle allocation error properly. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386567251-22751-8-git-send-email-namhyung@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Namhyung Kim authored
It returns NULL when allocation fails so the users should check the return value from now on. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386567251-22751-4-git-send-email-namhyung@kernel.orgSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Dongsheng Yang authored
In manpage of perf-kvm, --guestmount is supported by diff command, but it does not work well. This patch change the extend the checking in buildid-diff from guestkallsyms or guestmodules to perf_guest. Then this checking can cover the all cases perf kvm is used for. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Link: http://lkml.kernel.org/r/72857ed89642e0633f5e88f7e7abbc9645359e8e.1386368672.git.yangds.fnst@cn.fujitsu.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Dongsheng Yang authored
The code in builtin-kvm.c to generate filename for perf-kvm is useful to other command such as builtin-diff. This patch move the related code form builtin-kvm.c to util/util.c and wrap them in a function named get_filename_for_perf_kvm. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Link: http://lkml.kernel.org/r/5e09a5c47e8a495e888cbdc65a6fafb2c950f529.1386368672.git.yangds.fnst@cn.fujitsu.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Dongsheng Yang authored
A typo in comment of builtin-annotate.c about 'that'. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Link: http://lkml.kernel.org/r/46cb069a4ce21141057a07c0b50baa9968e3228c.1386629050.git.yangds.fnst@cn.fujitsu.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Dongsheng Yang authored
Two 'runs' here breaks the sentence in Description of 'perf archive' command. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Link: http://lkml.kernel.org/r/78a15a9f4f500b6074a1e25917d6e8251f894628.1386629050.git.yangds.fnst@cn.fujitsu.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Dongsheng Yang authored
When we use perf kvm record-report, there is a bug in report subcommand. Example: # perf kvm stat record -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.678 MB perf.data.guest (~29641 samples) ] # perf kvm stat report failed to open perf.data: No such file or directory (try 'perf record' first) Initializing perf session failed This bug was introduced by f5fc1412. + struct perf_data_file file = { + .path = input_name, + .mode = PERF_DATA_MODE_READ, + }; kvm->tool = eops; - kvm->session = perf_session__new(kvm->file_name, O_RDONLY, 0, false, - &kvm->tool); + kvm->session = perf_session__new(&file, false, &kvm->tool); It changed the path from kvm->file_name to input_name, this patch change the path back to 'kvm->file_name', then it works well. Verification: # perf kvm stat record -a sleep 1 [ perf record: Woken up 1 times to write data ] [ perf record: Captured and wrote 0.807 MB perf.data.guest (~35264 samples) ] # perf kvm stat report Analyze events for all VCPUs: VM-EXIT Samples Samples% Time% Min Time Max Time Avg time EPT_VIOLATION 200 32.79% 1.25% 0us 12064us 62.35us ( +- 96.74% ) EPT_MISCONFIG 134 21.97% 0.21% 0us 35us 15.25us ( +- 4.14% ) EXCEPTION_NMI 96 15.74% 0.02% 0us 11us 1.95us ( +- 9.81% ) APIC_ACCESS 79 12.95% 0.02% 0us 13us 2.94us ( +- 11.20% ) HLT 65 10.66% 98.47% 0us 16706us 15084.86us ( +- 1.89% ) IO_INSTRUCTION 27 4.43% 0.02% 0us 29us 6.42us ( +- 15.53% ) EXTERNAL_INTERRUPT 5 0.82% 0.01% 0us 77us 23.65us ( +- 57.90% ) TPR_BELOW_THRESHOLD 4 0.66% 0.00% 0us 1us 1.22us ( +- 4.36% ) Total Samples:610, Total events handled time:995745.54us. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Link: http://lkml.kernel.org/r/1386632823-17539-1-git-send-email-yangds.fnst@cn.fujitsu.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Dongsheng Yang authored
As there is no -v option for perf kvm, the all debug message for perf kvm will nerver be printed out to user. Example: # perf kvm --guestmount /tmp/guestmount/ record -a Not enough memory for reading perf file header It is confusing message for newbies such as me. With this patch applied, we can use -v option to get the detail. Example: # perf kvm --guestmount /tmp/guestmount/ record -a -v Can't access file /tmp/guestmount//15069/proc/kallsyms Not enough memory for reading perf file header Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Cc: David Ahern <dsahern@gmail.com> Link: http://lkml.kernel.org/r/1386609311-23889-1-git-send-email-yangds.fnst@cn.fujitsu.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
'next_pow2()' only works for 'unsigned int' but the argument is 'unsigned long'. Checking for values less than (1 << 31) ensures that 'next_pow2()' is not passed a value out of range but lets anything else go through unvalidated. As a result mmap_pages of zero is used e.g. perf record -v -m2147483649 uname mmap size 0B failed to mmap with 22 (Invalid argument) Fixed: perf record -m2147483649 uname rounding mmap pages size to 17592186044416 bytes (4294967296 pages) Invalid argument for --mmap_pages/-m Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386595120-22978-4-git-send-email-adrian.hunter@intel.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
'SIZE_MAX / page_size' is an upper limit for the maximum number of mmap pages, not a lower limit. Change the condition accordingly. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386595120-22978-3-git-send-email-adrian.hunter@intel.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-
Adrian Hunter authored
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1386595120-22978-2-git-send-email-adrian.hunter@intel.comSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-