Skip to content
  1. Oct 05, 2012
    • Peter Zijlstra's avatar
      perf: Fix perf_cgroup_switch for sw-events · 95cf59ea
      Peter Zijlstra authored
      
      
      Jiri reported that he could trigger the WARN_ON_ONCE() in
      perf_cgroup_switch() using sw-events. This is because sw-events share
      a cpuctx with multiple PMUs.
      
      Use the ->unique_pmu pointer to limit the pmu iteration to unique
      cpuctx instances.
      
      Reported-and-Tested-by: default avatarJiri Olsa <jolsa@redhat.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/n/tip-so7wi2zf3jjzrwcutm2mkz0j@git.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      95cf59ea
    • Peter Zijlstra's avatar
      perf: Clarify perf_cpu_context::active_pmu usage by renaming it to ::unique_pmu · 3f1f3320
      Peter Zijlstra authored
      
      
      Stephane thought the perf_cpu_context::active_pmu name confusing and
      suggested using 'unique_pmu' instead.
      
      This pointer is a pointer to a 'random' pmu sharing the cpuctx
      instance, therefore limiting a for_each_pmu loop to those where
      cpuctx->unique_pmu matches the pmu we get a loop over unique cpuctx
      instances.
      
      Suggested-by: default avatarStephane Eranian <eranian@google.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/n/tip-kxyjqpfj2fn9gt7kwu5ag9ks@git.kernel.org
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      3f1f3320
    • Robert Richter's avatar
      perf/AMD/IBS: Add sysfs support · 2e132b12
      Robert Richter authored
      
      
      Add sysfs format entries for AMD IBS PMUs:
      
       # find /sys/bus/event_source/devices/ibs_*/format
       /sys/bus/event_source/devices/ibs_fetch/format
       /sys/bus/event_source/devices/ibs_fetch/format/rand_en
       /sys/bus/event_source/devices/ibs_op/format
       /sys/bus/event_source/devices/ibs_op/format/cnt_ctl
      
      This allows to specify following IBS options:
      
       $ perf record -e ibs_fetch/rand_en=1/GH ...
       $ perf record -e ibs_op/cnt_ctl=1/GH ...
      
      Option cnt_ctl is only enabled if the IBS_CAPS_OPCNT bit is set in IBS
      cpuid feature flags (AMD family 10h RevC and above).
      
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1347447584-28405-1-git-send-email-robert.richter@amd.com
      [ Added small readability improvements. ]
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      2e132b12
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · c942ee2e
      Ingo Molnar authored
      
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
       * Remove several cases of needless global variables, on most builtins.
      
       * Look up thread using tid instead of pid in 'perf sched'.
      
       * Move global variables into a perf_kvm struct, from David Ahern.
      
       * Hists refactorings, preparatory for improved 'diff' command, from Jiri Olsa.
      
       * Hists refactorings, preparatory for event group viewieng work, from Namhyung Kim.
      
       * Remove double negation on optional feature macro definitions, from Namhyung Kim.
      
       * Bash auto completion improvements, now we can auto complete the tools long
         options, tracepoint event names, etc, from Namhyung Kim.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      c942ee2e
    • Namhyung Kim's avatar
      perf hists: Add more helpers for hist entry stat · 139c0815
      Namhyung Kim authored
      
      
      Add and use he_stat__add_{period,stat} for calculating hist entry's
      stat.  It will be used for accumulated stats later as well.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1349354994-17853-10-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      139c0815
    • Namhyung Kim's avatar
      perf hists: Move he->stat.nr_events initialization to a template · c4b35351
      Namhyung Kim authored
      
      
      Since it is set to 1 for a new hist entry, no need to set to separately.
      Move it to a template entry.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1349354994-17853-9-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c4b35351
    • Namhyung Kim's avatar
      perf hists: Introduce struct he_stat · b24c28f7
      Namhyung Kim authored
      
      
      The struct he_stat is for separating out statistics data of a hist
      entry.  It is required for later changes.
      
      It's just a mechanical change and should have no functional differences.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1349354994-17853-8-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b24c28f7
    • Jiri Olsa's avatar
      perf diff: Removing the total_period argument from output code · b5ff71c3
      Jiri Olsa authored
      
      
      The total_period is available in struct hists data via the 'struct
      hist_entry::hists' pointer. There's no need to carry it through the
      output code path.
      
      Removing 'struct perf_hpp::total_period' pointer, because it's no longer
      needed.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      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/r/1349354994-17853-7-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b5ff71c3
    • Jiri Olsa's avatar
      perf tool: Add hpp interface to enable/disable hpp column · 1d77822e
      Jiri Olsa authored
      
      
      Adding perf_hpp__column_enable function to enable/disable hists column
      and removing diff command specific stuff 'need_pair and
      show_displacement' from hpp code.
      
      The diff command now enables/disables columns separately according to
      the user arguments. This will be helpful in future patches where more
      columns are added into diff output.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1349354994-17853-6-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1d77822e
    • Jiri Olsa's avatar
      perf tools: Removing hists pair argument from output path · 41724e4c
      Jiri Olsa authored
      
      
      The hists pointer is now part of the 'struct hist_entry'.
      
      And since the overhead and baseline columns are split now, there's no
      reason to pass it through the output path.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      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/r/1349354994-17853-5-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      41724e4c
    • Jiri Olsa's avatar
      perf hists: Separate overhead and baseline columns · 5395a048
      Jiri Olsa authored
      
      
      Currently the overhead and baseline columns are handled within single
      function and the distinction is made by 'baseline hists' pointer passed
      by 'struct perf_hpp::ptr'.
      
      Since hists pointer is now part of each hist_entry, it's possible to
      locate paired hists pointer directly from the passed struct hist_entry
      pointer.
      
      Also separating those 2 columns makes the code more obvious.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1349354994-17853-4-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5395a048
    • Jiri Olsa's avatar
      perf diff: Refactor diff displacement possition info · dd464345
      Jiri Olsa authored
      
      
      Moving the position calculation into the diff command, so the position
      as prepared inside struct hist_entry data and there's no need to compute
      in the output display path.
      
      Removing 'displacement' from struct perf_hpp as it is no longer needed.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      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/r/1349354994-17853-3-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dd464345
    • Jiri Olsa's avatar
      perf hists: Add struct hists pointer to struct hist_entry · ae359f19
      Jiri Olsa authored
      
      
      Adding pointer back to the parent struct hists for struct hists_entry.
      
      This will be useful in future for any hist_entry's data computation,
      that depends on total data of its parent hists.
      
      Signed-off-by: default avatarJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      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/r/1349354994-17853-2-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae359f19
  2. Oct 04, 2012
    • Namhyung Kim's avatar
      perf tools: Complete tracepoint event names · ae0c1f99
      Namhyung Kim authored
      
      
      Currently tracepoint events cannot be completed because they contain a
      colon (:) character.  The colon is considered as a word separator when
      bash completion is done - variable COMP_WORDBREAKS contains colon - so
      if a word being completed contains a colon it can be a problem.
      
      Recent versions of bash completion provide -n switch to
      _get_comp_words_by_ref and __ltrim_colon_completions functions in order
      to resolve this issue.  Copy the latter in case not exists.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1349328234-16995-1-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ae0c1f99
    • Vince Weaver's avatar
      perf/x86: Add support for Intel Xeon-Phi Knights Corner PMU · e717bf4e
      Vince Weaver authored
      
      
      The following patch adds perf_event support for the Xeon-Phi
      PMU, as documented in the "Intel Xeon Phi Coprocessor (codename:
      Knights Corner) Performance Monitoring Units" manual.
      
      Even though it is a co-processor, a Phi runs a full Linux
      environment and can support performance counters.
      
      This is just barebones support, it does not add support for
      interesting new features such as the SPFLT intruction that
      allows starting/stopping events without entering the kernel.
      
      The PMU internally is just like that of an original Pentium, but
      a "P6-like" MSR interface is provided.  The interface is
      different enough from a real P6 that it's not easy (or
      practical) to re-use the code in  perf_event_p6.c
      
      Acked-by: default avatarLawrence F Meadows <lawrence.f.meadows@intel.com>
      Acked-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Signed-off-by: default avatarVince Weaver <vincent.weaver@maine.edu>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Cc: eranian@gmail.com
      Cc: Lawrence F <lawrence.f.meadows@intel.com>
      Link: http://lkml.kernel.org/r/alpine.DEB.2.02.1209261405320.8398@vincent-weaver-1.um.maine.edu
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      e717bf4e
  3. Oct 03, 2012
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Remove some unused methods · e60fc847
      Arnaldo Carvalho de Melo authored
      
      
      Those were introduced in a previous attempt at implementing 'trace', but
      are not being used anywhere, ditch them.
      
      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@gmail.com>
      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-ruhm5gocoh32pb7gnr0ai6gh@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e60fc847
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Introduce add_newtp method · 39876e7d
      Arnaldo Carvalho de Melo authored
      
      
      To reduce the boilerplate of creating and adding a new tracepoint to an
      evlist.
      
      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@gmail.com>
      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-4z90i79gnmsza2czv2dhdrb7@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      39876e7d
    • David Ahern's avatar
      perf kvm: Move global variables into a perf_kvm struct · de332ac4
      David Ahern authored
      
      
      Cleans up the builtin-kvm code in preparation for the live mode.  No
      functional changes; only code movement.
      
      Signed-off-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Dong Hao <haodong@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Runzhen Wang <runzhen@linux.vnet.ibm.com>
      Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1349237393-86006-1-git-send-email-dsahern@gmail.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      de332ac4
    • Namhyung Kim's avatar
      perf tools: Convert to BACKTRACE_SUPPORT · 4e34d958
      Namhyung Kim authored
      
      
      For building perf without stack backtrace debug, we can set
      NO_BACKTRACE=1 as a argument of make.  It then defines NO_BACKTRACE
      macro for C code to do the proper handling.  However it usually used in
      a negative semantics - e.g. #ifndef - so we saw double negations which
      can be misleading.  Convert it to a positive form to make it more
      readable and add _SUPPORT suffix for consistency.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Irina Tirdea <irina.tirdea@gmail.com>
      Cc: Irina Tirdea <irina.tirdea@intel.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1349109171-1942-1-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4e34d958
    • Namhyung Kim's avatar
      perf tools: Long option completion support for each subcommands · 4d8061fa
      Namhyung Kim authored
      
      
      Add internal --list-opts option to print all of long option names to
      stdout so that it can be used for bash completion engine.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1349191294-6926-4-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4d8061fa
    • Namhyung Kim's avatar
      perf tools: Complete long option names of perf command · 35c2fde1
      Namhyung Kim authored
      
      
      The main perf binary can receive a number of options that configure
      working environment.  Add them to the completion script.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1349191294-6926-3-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      35c2fde1
    • Namhyung Kim's avatar
      perf tools: Check existence of _get_comp_words_by_ref when bash completing · a1d668c3
      Namhyung Kim authored
      
      
      The '_get_comp_words_by_ref' function is available from the bash
      completion v1.2 so that earlier version emits following warning:
      
        $ perf re<TAB>_get_comp_words_by_ref: command not found
      
      Use older '_get_cword' method when the above function doesn't exist.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1349191294-6926-2-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a1d668c3
    • Arnaldo Carvalho de Melo's avatar
      perf inject: Don't use globals where not needed to · 002439e8
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      Leftover from patch at the beggining of this series.
      
      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@gmail.com>
      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-9cer20zhw64wbxyb0zias82i@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      002439e8
    • Arnaldo Carvalho de Melo's avatar
      perf record: Don't use globals where not needed to · 61eaa3be
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-2ce3v9qheiobs3sz6pxf4tud@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      61eaa3be
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Don't use globals where not needed to · 94d668d0
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-p80wec3z0vafe8dd0kz6ynyz@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      94d668d0
    • Arnaldo Carvalho de Melo's avatar
      perf top: Don't use globals where not needed to · be772842
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-3gddcwclncio29a7jiey0qtq@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      be772842
    • Arnaldo Carvalho de Melo's avatar
      perf probe: Don't use globals where not needed to · 11c4e4a3
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-adql1rjwxlmahx9unvfi3wqo@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      11c4e4a3
    • Arnaldo Carvalho de Melo's avatar
      perf buildid-list: Don't use globals where not needed to · 6ee41497
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-ixb32cbcka9w1fk07xrksusf@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      6ee41497
    • Arnaldo Carvalho de Melo's avatar
      perf buildid-cache: Don't use globals where not needed to · 472cc83c
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-6i7lqzm4hmkg35o1370lb7w4@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      472cc83c
    • Arnaldo Carvalho de Melo's avatar
      perf timechart: Don't use globals where not needed to · 73bdc715
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-fapdrw3h3hz713w8h5eww596@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      73bdc715
    • Arnaldo Carvalho de Melo's avatar
      perf lock: Don't use globals where not needed to · c75d98af
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-fx8sqc6r9u0i1u97ruy5ytjv@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c75d98af
    • Arnaldo Carvalho de Melo's avatar
      perf kmem: Don't use globals where not needed to · 0433ffbe
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-wu8lz0g2qg26aqgi51xgzkpp@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0433ffbe
    • Arnaldo Carvalho de Melo's avatar
      perf help: Don't use globals where not needed to · 2bae1d1b
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-plurd9htha6ea2mo9e9sd1p5@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2bae1d1b
    • Arnaldo Carvalho de Melo's avatar
      perf script: Don't use globals where not needed to · 69b6470e
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-eukt8bzp4t2n2z3s8ue5ofwb@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      69b6470e
    • Arnaldo Carvalho de Melo's avatar
      perf stat: Don't use globals where not needed to · b070a547
      Arnaldo Carvalho de Melo authored
      
      
      Some variables were global but used in just one function, so move it to
      where it belongs.
      
      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@gmail.com>
      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-spa8e7nnohtn1z32q2l2ae2c@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b070a547
    • Arnaldo Carvalho de Melo's avatar
      perf sched: Look up thread using tid instead of pid · 73ee3b27
      Arnaldo Carvalho de Melo authored
      
      
      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@gmail.com>
      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-zdu8up6vahogckg2uft7wh3n@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      73ee3b27
    • Arnaldo Carvalho de Melo's avatar
      perf inject: Remove static variables · 5ded57ac
      Arnaldo Carvalho de Melo authored
      
      
      We want to reduce the impact that each of the builtins has on perf as a
      whole, so use the superclassing of perf_tool mechanizm to move its
      config knobs to the stack, so that only if we use that tool, its impact
      will be felt.
      
      In this case is more about consistency, as the impact of this tool is
      minimal.
      
      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@gmail.com>
      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-z2b3matvawihtenmez9hkcja@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5ded57ac
    • Arnaldo Carvalho de Melo's avatar
      perf inject: Remove unused 'input_name' static var · 5852a445
      Arnaldo Carvalho de Melo authored
      
      
      If we ever want to allow inject to work with something other than stdin,
      we can put it back, but so far it is completely unused, so ditch it.
      
      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@gmail.com>
      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-qmwpnktckhd43eynnkxgqfpm@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5852a445
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Use evsel->handler.func · ba3d7dee
      Arnaldo Carvalho de Melo authored
      
      
      I.e. we don't need to resolve the evsel via the id and then check if it
      is this or that event, just stash the right handler at evsel creation
      time, then use evsel->handler.func() straight away.
      
      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@gmail.com>
      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-bpz3axzr4f2cjppf4egm28wf@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ba3d7dee
    • Namhyung Kim's avatar
      perf tools: Convert to HAVE_STRLCPY · d6e66832
      Namhyung Kim authored
      
      
      For similar reason of previous patches, convert NO_STRLCPY to positive
      HAVE_STRLCPY.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1348824728-14025-13-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d6e66832