summaryrefslogtreecommitdiffstats
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* tools lib traceevent: Change pevent_parse_format to include pevent handleJiri Olsa2013-12-043-23/+39
| | | | | | | | | | | | | | | | | | | | | | Changing the pevent_parse_format interface to include the pevent handle. The goal is to always use pevent object when dealing with traceevent library. The reason is that we might need additional processing (like plugins), which is not possible otherwise. Patches follow to make this happen completely. Signed-off-by: Jiri Olsa <jolsa@redhat.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: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386076182-14484-6-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* tools lib traceevent: Add traceevent_host_bigendian functionJiri Olsa2013-12-041-0/+10
| | | | | | | | | | | | | | | | | | Adding traceevent_host_bigendian function to get host endianity. It's used in following patches. Signed-off-by: Jiri Olsa <jolsa@redhat.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: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386076182-14484-5-git-send-email-jolsa@redhat.com Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* tools lib traceevent: Add plugin build supportJiri Olsa2013-12-041-5/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backporting missing pieces of plugin building infrastructure: - Adding Makefile 'plugins' target to build all defined plugins - Adding Makefile 'install_plugins' target as 'install_lib' target dependency - Link plugin objects with shared object building Backported from Steven Rostedt's trace-cmd repo (HEAD 0f2c2fb): git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git Plugins are by default installed into following locations: '$(HOME)/.traceevent/plugins' - If we are installing under $(HOME) '$(prefix)/lib/traceevent/plugins' - Otherwise This path is propagated to the plugin object as a plugins search path. Signed-off-by: Jiri Olsa <jolsa@redhat.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: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386076182-14484-4-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* tools lib traceevent: Add plugin supportJiri Olsa2013-12-043-1/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backporting plugin support for traceevent lib. Backported from Steven Rostedt's trace-cmd repo (HEAD 0f2c2fb): git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git It's now possible to use following interface to load plugins (shared objects) to enhance pevent object functionality. The plugin interface/hooks are as follows: (taken from event-parse.h comments) - 'pevent_plugin_loader' (required) The function name to initialized the plugin. int pevent_plugin_loader(struct pevent *pevent) - 'pevent_plugin_unloader' (optional) The function called just before unloading int pevent_plugin_unloader(void) - 'pevent_plugin_options' (optional) Plugin options that can be set before loading struct plugin_option pevent_plugin_options[] = { { .name = "option-name", .plugin_alias = "overide-file-name", (optional) .description = "description of option to show users", }, { .name = NULL, }, }; Array must end with .name = NULL; The plugin_alias (below) can be used to give a shorter name to access the variable. Useful if a plugin handles more than one event. NOTE options support is not backported yet. - 'pevent_plugin_alias' (optional) The name to use for finding options (uses filename if not defined) New traceevent functions are added to search and load available plugins: struct plugin_list* traceevent_load_plugins(struct pevent *pevent) - loads plusing for 'struct pevent' object and returns loaded plugins list void traceevent_unload_plugins(struct plugin_list *plugin_list); - unload plugin list Signed-off-by: Jiri Olsa <jolsa@redhat.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: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386076182-14484-3-git-send-email-jolsa@redhat.com Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf script: Do not call perf_event__preprocess_sample() twice)Adrian Hunter2013-12-043-24/+22
| | | | | | | | | | | | | | | | | | | | The perf_event__preprocess_sample() function is called in process_sample_event(). Instead of calling it again in perf_evsel__print_ip(), pass through the resultant addr_location. 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/529F3944.9050007@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf symbols: Fix random fd closing with no libelfAdrian Hunter2013-12-041-0/+1
| | | | | | | | | | | | | | | | | | | When built without libelf, perf tools was failing to initialize a file descriptor, but nevertheless closing it. That sometimes resulted in the output being truncated because the stdout file descriptor got closed. Signed-off-by: Adrian Hunter <adrian.hunter@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/1386166981-30197-1-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf kvm: Update the 'record' man page entry for new --guest/--host behaviorDongsheng Yang2013-12-041-4/+11
| | | | | | | | | | | | | | | | | | As we have changed the default behavior of 'perf kvm' to --guest enabled, the parts of the man page that covers the 'record' subcommand are outdated. This patch updates it to show the correct output with --host/--guest/neither/both of them. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/3a3a9c1e05acb5a274d1d8369db5a4c6467d6276.1386197481.git.yangds.fnst@cn.fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf kvm: Fix spurious '=' use in man pageDongsheng Yang2013-12-041-4/+4
| | | | | | | | | | | | | | | | | | | | As option --host and --guest request no input for it, there should not be a '=' after them in the man page sources. And --output expects a filename as the input, so there should be a '=' after it. This patch removes the needless '=' after --guest and --host, and adds a '=' after --output in perf-kvm.txt. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/6124d9eb10a3f1f6b399d1db660110bc7a60fd6b.1386197481.git.yangds.fnst@cn.fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf kvm: Add more detail about buildid-list in man pageDongsheng Yang2013-12-041-1/+3
| | | | | | | | | | | | | | | | | | As the buildid is read from /sys/kernel/notes, then if we use perf kvm buildid-list with a perf data file captured by perf kvm record with --guestkallsyms and --guestmodules, there is no result in output. This patch add a explanation about it and add a limit of using perf kvm buildid-list. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/d605a805486340b53bc261aa64d7632ad0a8cf53.1386197481.git.yangds.fnst@cn.fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf target: Move the checking of which map function to call into function.Dongsheng Yang2013-12-042-7/+14
| | | | | | | | | | | | | | | | | Check for cpu_map__dummy_new() or cpu_map__new() to be called in perf_evlist__create_maps() is more complicated. This patch moves the checking work into target.h, combining two conditions and making perf_evlist__create_maps() more readable. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/b8c41f1fd2c4f0df71eb7b19aea74fb64d46cdda.1386197481.git.yangds.fnst@cn.fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Remove condition in machine__get_kernel_start_addr.Dongsheng Yang2013-12-041-9/+5
| | | | | | | | | | | | | | | | | | | In machine__get_kernel_start_addr, the code, which is using machine->root_dir to build filename, works for both host and guests initialized from guestmount, as root_dir is set to "" for the host machine in the machine__init() function. So this patch remove the branch for machine__is_host. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Cc: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/0a81645dd0b384a12cb4f962cf193ef8c3ce2010.1386197481.git.yangds.fnst@cn.fujitsu.com [ Clarified changeset mentioning root_dir setup in machine__init() ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Remove stackprotector feature checkJiri Olsa2013-12-043-16/+1
| | | | | | | | | | | | | | | | | | | | | We use -fstack-protector-all option to enable stack protecting for all available functions. There's no reason for enabling -Wstack-protector to get warning for unprotected functions. Removing stackprotector feature check which was used to enable the -Wstack-protector option. Signed-off-by: Jiri Olsa <jolsa@redhat.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: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1386076182-14484-2-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Do not disable source line lookup just because of 1 failureAdrian Hunter2013-12-043-4/+18
| | | | | | | | | | | | | | | | | | | | | | Looking up an ip's source file name and line number does not succeed always. Current logic disables the lookup for a dso entirely on any failure. Change it so that disabling never happens if there has ever been a successful lookup for that dso but disable if the first 123 lookups fail. 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/1386055390-13757-8-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf symbols: Retain symbol source file name to lookup source line numbersAdrian Hunter2013-12-044-1/+10
| | | | | | | | | | | | | | | | | | | | | | Currently, lookup of an ip's source file name and line number is done using the dso file name. Instead retain the file name used to lookup the dso's symbols and use that. 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/1386055390-13757-6-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf symbols: Retain bfd reference to lookup source line numbersAdrian Hunter2013-12-043-6/+34
| | | | | | | | | | | | | | | | | | | | Closng and re-opening for every lookup when using libbfd to lookup source file name and line number is very very slow. Instead keep the reference on struct dso. 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/1386055390-13757-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Use asprintf instead of malloc plus snprintfAdrian Hunter2013-12-041-8/+1
| | | | | | | | | | | | | | | | | | | The asprintf library function is equivalent to malloc plus snprintf so use it because it is simpler. 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/1386055390-13757-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf trace: Honour -m optionJiri Olsa2013-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | Currently trace command supports '-m' option, but does not honours its value and keeps the default. Changing the perf_evlist__mmap function call to use the '-m' configured value. 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> Link: http://lkml.kernel.org/r/1385657842-8914-1-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Include test-stackprotector-all.c in test-allJiri Olsa2013-12-021-0/+5
| | | | | | | | | | | | | | | | We're missing test-stackprotector-all.c in test-all check, adding it. Signed-off-by: Jiri Olsa <jolsa@redhat.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: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1385638408-23519-3-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Correct the message in feature-libnuma checking.Dongsheng Yang2013-12-021-1/+1
| | | | | | | | | | | | | | The package required for numa is named numactl-devel in Fedora or RHEL, and libnuma-devel in OpenSuSE, and libnuma-dev in Ubuntu. This patch corrects the package name in warning message in feature-libnuma checking. Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Acked-by: Peter Hurley <peter@hurleysoftware.com> Cc: Peter Hurley <peter@hurleysoftware.com> Link: http://lkml.kernel.org/r/1385998008-6851-1-git-send-email-yangds.fnst@cn.fujitsu.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Move wake_events list to 'struct timechart'Arnaldo Carvalho de Melo2013-12-021-5/+5
| | | | | | | | | | | | | | | | | Removing another global variable. 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: Stanislav Fomichev <stfomichev@yandex-team.ru> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-14rpuci11l2s0o01yta87kxe@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Move power_events list to 'struct timechart'Arnaldo Carvalho de Melo2013-12-021-15/+16
| | | | | | | | | | | | | | | | | Removing another global variable. 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: Stanislav Fomichev <stfomichev@yandex-team.ru> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-2akef3p9caau56itf5mugd2b@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Move all_data per_pid list to 'struct timechart'Arnaldo Carvalho de Melo2013-12-021-54/+59
| | | | | | | | | | | | | | | | | | | | | | | Removing another global variable. This one tho would be better done by using the machine infrastructure, searching for the 'struct thread' with a pid, then using thread->priv, etc. TODO list material for now. 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: Stanislav Fomichev <stfomichev@yandex-team.ru> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-yyfpudgjvr6mev4bue9u72a2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Introduce tool structArnaldo Carvalho de Melo2013-12-021-102/+114
| | | | | | | | | | | | | | | | | | | | | | To avoid having all those global variables and to use the interface to event processing that is based on passing a 'perf_tool' struct that should be embedded in a per tool specific struct passed to all the sample processing callbacks. There are some more globals to move, next patches will do it. 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: Stanislav Fomichev <stfomichev@yandex-team.ru> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-0iah65pq796ezbk5u1lzwy1k@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Add perf_data_file__write interfaceJiri Olsa2013-12-022-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | Adding perf_data_file__write interface to centralize output to files. The function prototype is: ssize_t perf_data_file__write(struct perf_data_file *file, void *buf, size_t size); Returns number of bytes written or -1 in case of error. NOTE: Also indenting 'struct perf_data_file' members, no functional change done. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1385634619-8129-6-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Add writen functionJiri Olsa2013-12-022-5/+20
| | | | | | | | | | | | | | | | | | | | | Adding 'writen' function as a synchronous wrapper for write syscall with following prototype: ssize_t writen(int fd, void *buf, size_t n) Returns the number of bytes written on success or -1 in case of err. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Requested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1385634619-8129-5-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Fine tune readn functionJiri Olsa2013-12-021-5/+11
| | | | | | | | | | | | | | | | | | | Added a 'left' variable to make the flow clearer, and added a debug check for the return value - returning 'n' is more obvious. Added small comment for readn. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Original-patch-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: Ingo Molnar <mingo@kernel.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1385634619-8129-4-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Use correct return type for readn functionJiri Olsa2013-12-024-13/+13
| | | | | | | | | | | | | | | | | | Changing readn function return type to ssize_t because read returns ssize_t not int. Changing callers holding variable types as well. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1385634619-8129-3-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf record: Unify data output code into perf_record__write functionJiri Olsa2013-12-021-14/+6
| | | | | | | | | | | | | | | | Unifying current 2 data output functions do_write_output and write_output into single one perf_record__write. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/1385634619-8129-2-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Fix tags/TAGS targets rebuildingJiri Olsa2013-11-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | Once the tags/TAGS file is generated it's never rebuilt until it's removed by hand. The reason is that the Makefile does not treat tags/TAGS as targets but as files and thus won't rebuilt them once they are in place. Adding PHONY tags/TAGS targets into Makefile. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Acked-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: Ingo Molnar <mingo@kernel.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/20131126125412.GJ1267@krava.brq.redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Remove misplaced __maybe_unusedArnaldo Carvalho de Melo2013-11-271-1/+1
| | | | | | | | | | | | | | | | | The 'event' parameter _is_ used. 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: Stanislav Fomichev <stfomichev@yandex-team.ru> Cc: Stephane Eranian <eranian@google.com> echo Link: http://lkml.kernel.org/n/tip-`ranpwd -l 24`@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Remove some needless struct forward declarationsArnaldo Carvalho de Melo2013-11-271-7/+0
| | | | | | | | | | | | | | | 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: Stanislav Fomichev <stfomichev@yandex-team.ru> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-jomi6mjv5zi9vsn4vmih5xps@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: dynamically determine event fields offsetStanislav Fomichev2013-11-271-77/+42
| | | | | | | | | | | | | | | | | | | | | Since b000c8065a92 "tracing: Remove the extra 4 bytes of padding in events" removed padding bytes, perf timechart got out of sync with the kernel's trace_entry structure. Convert perf timechart to use dynamic fields offsets (via perf_evsel__intval) not relying on a hardcoded copy of fields layout from the kernel. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Chia-I Wu <olvaffe@gmail.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/20131127104459.GB3309@stfomichev-desktop Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf symbols: Fix not finding kcore in buildid cacheAdrian Hunter2013-11-271-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The logic was not looking in the buildid cache for kcore if the host kernel buildid did not match the recorded kernel buildid. This affects the non-live case i.e. the kernel has changed and we are looking at a special copy of kcore that we placed in the buildid cache (using "perf buildid-cache -v -k /proc/kcore") when the data was recorded. After this fix kernel symbols get resolved/annotated correctly. Signed-off-by: Adrian Hunter <adrian.hunter@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/1385471964-4037-1-git-send-email-adrian.hunter@intel.com [ Added further explanation extracted from conversation between Ingo & Adrian on lkml ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf script: Print mmap[2] events alsoNamhyung Kim2013-11-272-0/+72
| | | | | | | | | | | | | | | | | | | | | | If --show-mmap-events option is given, also print internal MMAP and MMAP2 events. It would be helpful for debugging. $ perf script --show-mmap-events ... sleep 9486 [009] 3350640.335531: PERF_RECORD_MMAP 9486/9486: [0x400000(0x6000) @ 0]: x /usr/bin/sleep sleep 9486 [009] 3350640.335542: PERF_RECORD_MMAP 9486/9486: [0x3153a00000(0x223000) @ 0]: x /usr/lib64/ld-2.17.so sleep 9486 [009] 3350640.335553: PERF_RECORD_MMAP 9486/9486: [0x7fff8b5fe000(0x2000) @ 0x7fff8b5fe000]: x [vdso] sleep 9486 [009] 3350640.335643: PERF_RECORD_MMAP 9486/9486: [0x3153e00000(0x3c0000) @ 0]: x /usr/lib64/libc-2.17.so Signed-off-by: Namhyung Kim <namhyung@kernel.org> Suggested-by: Frederic Weisbecker <fweisbec@gmail.com> Reviewed-by: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1385456066-26592-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf script: Print comm, fork and exit events alsoNamhyung Kim2013-11-272-0/+108
| | | | | | | | | | | | | | | | | | | | | | | | If --show-task-events option is given, also print internal COMM, FORK and EXIT events. It would be helpful for debugging. $ perf script --show-task-events ... swapper 0 [009] 3350640.335261: sched:sched_switch: prev_comm=swapper/9 sleep 9486 [009] 3350640.335509: PERF_RECORD_COMM: sleep:9486 sleep 9486 [009] 3350640.335806: sched:sched_stat_runtime: comm=sleep pid=9486 firefox 2635 [003] 3350641.275896: PERF_RECORD_FORK(2635:9487):(2635:2635) firefox 2635 [003] 3350641.275896: sched:sched_process_fork: comm=firefox pid=2635 sleep 9486 [009] 3350641.336009: PERF_RECORD_EXIT(9486:9486):(9486:9486) Signed-off-by: Namhyung Kim <namhyung@kernel.org> Suggested-by: Frederic Weisbecker <fweisbec@gmail.com> Reviewed-by: David Ahern <dsahern@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Namhyung Kim <namhyung.kim@lge.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1385455873-25865-1-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf script: Print callchains and symbols if they existDavid Ahern2013-11-271-0/+24
| | | | | | | | | | | | | The intent of perf-script is to dump the events and information in the file. H/W, S/W and raw events all dump callchains if they are present; might as well make that the default for tracepoints too. v2: Only add options for sym, dso and ip if callchains are present Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Link: http://lkml.kernel.org/r/1384920457-5986-1-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Export setup_listDavid Ahern2013-11-272-1/+4
| | | | | | | | | | | | | | Used in upcoming patches (perf sched timehist command). Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1384806771-2945-6-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf thread: Move comm_list check into functionDavid Ahern2013-11-272-2/+13
| | | | | | | | | | | | Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1384806771-2945-5-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf symbols: Move idle syms check from top to generic functionDavid Ahern2013-11-273-23/+33
| | | | | | | | | | | | | | | Allows list of idle symbols to be leveraged by other commands, such as the upcoming timehist command. Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1384806771-2945-3-git-send-email-dsahern@gmail.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf evsel: Skip ignored symbols while printing callchainDavid Ahern2013-11-271-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Allows a command to have a symbol_filter controlled by the user to skip certain functions in a backtrace. One example is to allow the user to reduce repeating patterns like: do_select core_sys_select sys_select to just sys_select when dumping callchains, consuming less real estate on the screen while still conveying the essential message - the process is in a select call. This option is leveraged by the upcoming timehist command. Signed-off-by: David Ahern <dsahern@gmail.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/1384806771-2945-2-git-send-email-dsahern@gmail.com [ Checked if al.sym is NULL before touching al.sym->ignored, as noted by Adrian Hunter ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Add backtrace supportStanislav Fomichev2013-11-274-36/+175
| | | | | | | | | | | | | | | | | | Add -g flag to `perf timechart record` which saves callchain info in the perf.data. When generating SVG, add backtrace information to the figure details, so now it's possible to see which code path woke up the task and why some task went to sleep. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1383323151-19810-8-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Add support for -P and -T in timechart recordingStanislav Fomichev2013-11-272-30/+87
| | | | | | | | | | | | | | | If we don't want either power or task events we may use -T or -P with the `perf timechart record` command to filter out events while recording to keep perf.data small. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1383323151-19810-7-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Group figures and add title with detailsStanislav Fomichev2013-11-273-7/+60
| | | | | | | | | | | | | | | | | | | Add titles to figures so we can run SVG interactively in Firefox and check event details in the tooltips. This also aids exploring SVG with Inkscape because when user clicks on one part of logical figure, all parts are selected. It's also possible to read titles with Inkscape in the object details. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1383323151-19810-6-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Add support for displaying only tasks related dataStanislav Fomichev2013-11-272-1/+13
| | | | | | | | | | | | | | In order to make SVG smaller and faster to browse add possibility to switch off power related information with -T switch. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1383323151-19810-5-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Use proc_num to implement --power-onlyStanislav Fomichev2013-11-271-4/+8
| | | | | | | | | | | | | | Don't use special flag to indicate power-only mode, just set proc_num to 0. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1383323151-19810-4-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Add option to limit number of tasksStanislav Fomichev2013-11-272-1/+8
| | | | | | | | | | | | | Add -n option to specify min. number of tasks to print. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1383323151-19810-3-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf timechart: Always try to print at least 15 tasksStanislav Fomichev2013-11-271-5/+7
| | | | | | | | | | | | | Always try to print at least 15 tasks no matter how long they run. Signed-off-by: Stanislav Fomichev <stfomichev@yandex-team.ru> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1383323151-19810-2-git-send-email-stfomichev@yandex-team.ru Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf record: Default -t option to no inheritanceAdrian Hunter2013-11-273-2/+9
| | | | | | | | | | | | | | | | | | | | The change to per-cpu mmaps causes the -p, -t and -u options now to have inheritance enabled by default. Change that back to no inheritance but for the -t option only. Requested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Adrian Hunter <adrian.hunter@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/1384768557-23331-5-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Add option macro OPT_BOOLEAN_SETAdrian Hunter2013-11-272-0/+10
| | | | | | | | | | | | | | | | | | | | OPT_BOOLEAN_SET records whether a boolean option was set by the user. That information can be used to change the default value for the option after the options have been parsed. Signed-off-by: Adrian Hunter <adrian.hunter@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/1384768557-23331-4-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
* perf tools: Allow '--inherit' as the negation of '--no-inherit'Adrian Hunter2013-11-271-0/+19
| | | | | | | | | | | | | | | | | | | | | | | Long options can be negated by prefixing them with 'no-'. However options that already start with 'no-', such as '--no-inherit' result in ugly double 'no's. Avoid that by accepting that the removal of 'no-' also negates the long option. Suggested-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Adrian Hunter <adrian.hunter@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/1384768557-23331-3-git-send-email-adrian.hunter@intel.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
OpenPOWER on IntegriCloud