Skip to content
  1. Sep 24, 2012
    • Arnaldo Carvalho de Melo's avatar
      tools lib traceevent: Remove some die() calls · a6d2a61a
      Arnaldo Carvalho de Melo authored
      
      
      Cleaned event-parse.c this time, just propagate the errors and in handle
      them the call sites.
      
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/n/tip-9ebpr2vgfk2qs2841i99sa8y@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a6d2a61a
    • Arnaldo Carvalho de Melo's avatar
      tools lib traceevent: Fix afterlife gotos · b8511920
      Arnaldo Carvalho de Melo authored
      
      
      Instead of dying, just use do_warning and let the goto that is there to
      take place.
      
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/n/tip-aoaus46ngnt9oc2pt7ckot5d@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b8511920
    • Arnaldo Carvalho de Melo's avatar
      tools lib traceevent: Use calloc were applicable · 87162d81
      Arnaldo Carvalho de Melo authored
      
      
      Replacing the equivalent open coded malloc + memset bits.
      
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/n/tip-598fjtjbzal4wxh7fp0yv0q1@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      87162d81
    • Arnaldo Carvalho de Melo's avatar
      tools lib traceevent: Use asprintf were applicable · 0dbca1e3
      Arnaldo Carvalho de Melo authored
      
      
      Replacing the equivalent open coded malloc + sprintf bits.
      
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/n/tip-ghokwtdw2hgmmmn7oa9s03r4@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0dbca1e3
    • Markus Trippelsdorf's avatar
      perf tools: bfd.h/libbfd detection fails with recent binutils · 3ce711a6
      Markus Trippelsdorf authored
      
      
      With recent binutils I get:
      
       perf % make
      Makefile:668: No bfd.h/libbfd found, install binutils-dev[el]/zlib-static to gain symbol demanglin
      
      That happens because bfd.h now contains:
      
      I've reopened a bug in the hope that this check will be deleted:
      http://sourceware.org/bugzilla/show_bug.cgi?id=14243
      
      But in the meantime, the following patch fixes the problem
      
      Signed-off-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Link: http://lkml.kernel.org/r/20120919072902.GA262@x4
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3ce711a6
    • Namhyung Kim's avatar
      tools lib traceevent: Free field if an error occurs on process_flags/symbols · 70d93044
      Namhyung Kim authored
      
      
      The field should be freed on error paths.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1348037924-17568-5-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      70d93044
    • Namhyung Kim's avatar
      tools lib traceevent: Free field if an error occurs on process_fields · f8c49d26
      Namhyung Kim authored
      
      
      The field should be freed on error paths.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1348037924-17568-4-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f8c49d26
    • Namhyung Kim's avatar
      tools lib traceevent: Make sure that arg->op.right is set properly · 41e51a28
      Namhyung Kim authored
      
      
      When process_op failed, @arg will be freed on a caller with type of
      PRINT_OP.  Thus free_arg() will try to free ->op.right field which can
      have stale value if something bad happens in the middle.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1348037924-17568-3-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      41e51a28
    • Namhyung Kim's avatar
      tools lib traceevent: Fix error path on process_array() · 1bce6e0f
      Namhyung Kim authored
      
      
      free_token() under out_free should be called with 'token' and no need
      to set *tok to NULL since it's set already.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1348037924-17568-2-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1bce6e0f
    • Irina Tirdea's avatar
      perf tools: remove sscanf extension %as · bcbd0040
      Irina Tirdea authored
      
      
      perf uses sscanf extension %as to read and allocate a string in the same
      step.  This is a non-standard extension only present in new versions of
      glibc.
      
      Replacing the use of sscanf and %as with strtok_r calls in order to
      parse a given string into its components.  This is needed in Android
      since bionic does not support
      %as extension for sscanf.
      
      Reviewed-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Tested-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Signed-off-by: default avatarIrina Tirdea <irina.tirdea@intel.com>
      Acked-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      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/1348173470-4936-1-git-send-email-irina.tirdea@gmail.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bcbd0040
    • Namhyung Kim's avatar
      perf header: Remove perf_header__read_feature · 37e9d750
      Namhyung Kim authored
      
      
      Because its only user builtin-kvm::get_cpu_isa() has gone, It can be
      removed safely.  In general, we have the feature information in
      perf_session_env already, no need to read it again.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Dong Hao <haodong@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1348474503-15070-7-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      37e9d750
    • Namhyung Kim's avatar
      perf kvm: Use perf_session_env for reading cpuid · 2f9e97aa
      Namhyung Kim authored
      
      
      We have processed and saved cpuid information to perf_session_env so
      reuse it for get_cpu_isa().
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Dong Hao <haodong@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1348474503-15070-6-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2f9e97aa
    • Namhyung Kim's avatar
      perf header: Remove unused @feat arg from ->process callback · 3d7eb86b
      Namhyung Kim authored
      
      
      As the @feat arg is not used anywhere, get rid of it from the signature.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1348474503-15070-5-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3d7eb86b
    • Namhyung Kim's avatar
      perf header: Use pre-processed session env when printing · 7e94cfcc
      Namhyung Kim authored
      
      
      From now on each feature information is processed and saved in perf
      header so that it can be used for printing.  The event desc and branch
      stack features are not touched since they're not saved.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1348474503-15070-4-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7e94cfcc
    • Namhyung Kim's avatar
      perf header: Add ->process callbacks to most of features · a1ae5655
      Namhyung Kim authored
      
      
      From now on each feature information is processed and saved in perf
      header so that it can be used wherever needed.  The BRANCH_STACK feature
      is an exception since it needs nothing to be done.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1348474503-15070-3-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a1ae5655
    • Namhyung Kim's avatar
      perf header: Add struct perf_session_env · e93699b3
      Namhyung Kim authored
      
      
      The struct perf_session_env will preserve environment information at the
      time of perf record.  It can be accessed anytime after parsing a
      perf.data file if needed.
      
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@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/1348474503-15070-2-git-send-email-namhyung@kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e93699b3
    • Arnaldo Carvalho de Melo's avatar
      perf timechart: Use zalloc and fix a couple leaks · e0dcd6fb
      Arnaldo Carvalho de Melo authored
      
      
      Use zalloc for the malloc+memset open coded sequence.
      
      Fix leak on the #ifdef'ed C state handling and when detecting invalid
      data in p_state_change().
      
      Cc: Arjan van de Ven <arjan@linux.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@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-v9x3q9rv4caxtox7wtjpchq5@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e0dcd6fb
    • Arnaldo Carvalho de Melo's avatar
      perf lock: Use perf_evsel__intval and perf_session__set_tracepoints_handlers · 746f16ec
      Arnaldo Carvalho de Melo authored
      
      
      Following the model of 'perf sched':
      
      . raw_field_value searches first on the common fields, that are unused
        in this tool
      
      . Leave using perf_evsel__intval to the actual handlers, some may not
        need to incur some of the cost because they may not need all the
        fields values.
      
      . Using perf_session__set_tracepoints_handlers will save all those
        strcmp to find the right handler at sample processing time, do it just
        once and get the handler from evsel->handler.func.
      
      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-v9x3q9rv4caxtox7wtjpchq5@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      746f16ec
    • Arnaldo Carvalho de Melo's avatar
      perf kmem: Use perf_evsel__intval and perf_session__set_tracepoints_handlers · 0f7d2f1b
      Arnaldo Carvalho de Melo authored
      
      
      Following the model of 'perf sched':
      
      . raw_field_value searches first on the common fields, that are unused
        in this tool
      
      . Using perf_session__set_tracepoints_handlers will save all those
        strcmp to find the right handler at sample processing time, do it just
        once and get the handler from evsel->handler.func.
      
      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-v9x3q9rv4caxtox7wtjpchq5@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0f7d2f1b
    • Arnaldo Carvalho de Melo's avatar
      perf kvm: Use perf_evsel__intval · 14907e73
      Arnaldo Carvalho de Melo authored
      
      
      Using plain raw_field_value(evsel->tp_format) will look at the common
      fields as well, and since this tool doesn't need those, speed it up a
      bit by looking at just the event specific fields.
      
      Also in general use just evsel and sample, just like was done in 'perf
      sched'.
      
      v2: Fixed up test against evsel->name, that contains the subsys name
      too, by David Ahern.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Dong Hao <haodong@linux.vnet.ibm.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>
      Cc: Xiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Cc: Runzhen Wang <runzhen@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/n/tip-v9x3q9rv4caxtox7wtjpchq5@git.kernel.org
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      14907e73
  2. Sep 21, 2012
    • Xiao Guangrong's avatar
      perf kvm: Events analysis tool · bcf6edcd
      Xiao Guangrong authored
      
      
      Add 'perf kvm stat' support to analyze kvm vmexit/mmio/ioport smartly
      
      Usage:
      - kvm stat
        run a command and gather performance counter statistics, it is the alias of
        perf stat
      
      - trace kvm events:
        perf kvm stat record, or, if other tracepoints are interesting as well, we
        can append the events like this:
        perf kvm stat record -e timer:* -a
      
        If many guests are running, we can track the specified guest by using -p or
        --pid, -a is used to track events generated by all guests.
      
      - show the result:
        perf kvm stat report
      
      The output example is following:
      13005
      13059
      
      total 2 guests are running on the host
      
      Then, track the guest whose pid is 13059:
      ^C[ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.253 MB perf.data.guest (~11065 samples) ]
      
      See the vmexit events:
      
      Analyze events for all VCPUs:
      
                   VM-EXIT    Samples  Samples%     Time%         Avg time
      
               APIC_ACCESS        460    70.55%     0.01%     22.44us ( +-   1.75% )
                       HLT         93    14.26%    99.98% 832077.26us ( +-  10.42% )
        EXTERNAL_INTERRUPT         64     9.82%     0.00%     35.35us ( +-  14.21% )
         PENDING_INTERRUPT         24     3.68%     0.00%      9.29us ( +-  31.39% )
                 CR_ACCESS          7     1.07%     0.00%      8.12us ( +-   5.76% )
            IO_INSTRUCTION          3     0.46%     0.00%     18.00us ( +-  11.79% )
             EXCEPTION_NMI          1     0.15%     0.00%      5.83us ( +-   -nan% )
      
      Total Samples:652, Total events handled time:77396109.80us.
      
      See the mmio events:
      
      Analyze events for all VCPUs:
      
               MMIO Access    Samples  Samples%     Time%         Avg time
      
              0xfee00380:W        387    84.31%    79.28%      8.29us ( +-   3.32% )
              0xfee00300:W         24     5.23%     9.96%     16.79us ( +-   1.97% )
              0xfee00300:R         24     5.23%     7.83%     13.20us ( +-   3.00% )
              0xfee00310:W         24     5.23%     2.93%      4.94us ( +-   3.84% )
      
      Total Samples:459, Total events handled time:4044.59us.
      
      See the ioport event:
      
      Analyze events for all VCPUs:
      
            IO Port Access    Samples  Samples%     Time%         Avg time
      
               0xc050:POUT          3   100.00%   100.00%     13.75us ( +-  10.83% )
      
      Total Samples:3, Total events handled time:41.26us.
      
      And, --vcpu is used to track the specified vcpu and --key is used to sort the
      result:
      
      Analyze events for VCPU 0:
      
                   VM-EXIT    Samples  Samples%     Time%         Avg time
      
                       HLT         27    13.85%    99.97% 405790.24us ( +-  12.70% )
        EXTERNAL_INTERRUPT         13     6.67%     0.00%     27.94us ( +-  22.26% )
               APIC_ACCESS        146    74.87%     0.03%     21.69us ( +-   2.91% )
            IO_INSTRUCTION          2     1.03%     0.00%     17.77us ( +-  20.56% )
                 CR_ACCESS          2     1.03%     0.00%      8.55us ( +-   6.47% )
         PENDING_INTERRUPT          5     2.56%     0.00%      6.27us ( +-   3.94% )
      
      Total Samples:195, Total events handled time:10959950.90us.
      
      Signed-off-by: default avatarDong Hao <haodong@linux.vnet.ibm.com>
      Signed-off-by: default avatarRunzhen Wang <runzhen@linux.vnet.ibm.com>
      [ Dong Hao <haodong@linux.vnet.ibm.com>
        Runzhen Wang <runzhen@linux.vnet.ibm.com>:
           - rebase it on current acme's tree
           - fix the compiling-error on i386 ]
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: kvm@vger.kernel.org
      Cc: Runzhen Wang <runzhen@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1347870675-31495-4-git-send-email-haodong@linux.vnet.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bcf6edcd
    • Xiao Guangrong's avatar
      KVM: x86: Export svm/vmx exit code and vector code to userspace · 26bf264e
      Xiao Guangrong authored
      
      
      Exporting KVM exit information to userspace to be consumed by perf.
      
      Signed-off-by: default avatarDong Hao <haodong@linux.vnet.ibm.com>
      [ Dong Hao <haodong@linux.vnet.ibm.com>: rebase it on acme's git tree ]
      Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Acked-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
      Cc: Avi Kivity <avi@redhat.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: kvm@vger.kernel.org
      Cc: Runzhen Wang <runzhen@linux.vnet.ibm.com>
      Link: http://lkml.kernel.org/r/1347870675-31495-2-git-send-email-haodong@linux.vnet.ibm.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      26bf264e
    • Eric Sandeen's avatar
      perf tools: Fix parallel build · e6048fb8
      Eric Sandeen authored
      
      
      Parallel builds of perf were failing for me on a 32p box, with:
      
          * new build flags or prefix
      util/pmu.l:7:23: error: pmu-bison.h: No such file or directory
      
      ...
      
      make: *** [util/pmu-flex.o] Error 1
      make: *** Waiting for unfinished jobs....
      
      This can pretty quickly be seen by adding a sleep in front of the bison
      calls in tools/perf/Makefile and running make -j4 on a smaller box i.e.:
      
      	sleep 10; $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
      
      Adding the following dependencies fixes it for me.
      
      Signed-off-by: default avatarEric Sandeen <sandeen@redhat.com>
      Reviewed-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/505BD190.40707@redhat.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e6048fb8
    • Stephane Eranian's avatar
      perf record: Print event causing perf_event_open() to fail · 1863fbbb
      Stephane Eranian authored
      
      
      Got tired of not getting the event that caused the perf_event_open()
      syscall to fail. So I fixed the error message. This is very useful when
      monitoring lots of events in a single run.
      
      Signed-off-by: default avatarStephane Eranian <eranian@google.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20120920161945.GA7064@quad
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1863fbbb
  3. Sep 20, 2012
    • Feng Tang's avatar
      perf tools: Fix a compiling error in util/map.c · 8f28f19a
      Feng Tang authored
      
      
      This patch fix a compile warning taken as error:
      
      	CC util/map.o
      	cc1: warnings being treated as errors
      	util/map.c: In function ‘map__fprintf_dsoname’:
      	util/map.c:240: error: ‘dsoname’ may be used uninitialized in this function
      	make: *** [util/map.o] Error 1
      
      Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1346053107-11946-3-git-send-email-feng.tang@intel.com
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8f28f19a
    • Feng Tang's avatar
      perf tools: Fix a compiling error in trace-event-perl.c for 32 bits machine · b1ab1bd1
      Feng Tang authored
      
      
      On my x86_32 mahcine, there is a compile error:
      
              CC util/scripting-engines/trace-event-perl.o
              cc1: warnings being treated as errors
              util/scripting-engines/trace-event-perl.c: In function
      	perl_process_tracepoint:
              util/scripting-engines/trace-event-perl.c:285: error: format
      	expects type 'int', but argument 2 has type '__u64'
              make: *** [util/scripting-engines/trace-event-perl.o] Error 1
      
      Fix it by using the "%PRIu64" for __u64.
      
      v2: use PRIu64 as suggested by Arnaldo.
      
      Signed-off-by: default avatarFeng Tang <feng.tang@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20120828101730.6b2fd97e@feng-i7
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      b1ab1bd1
  4. Sep 19, 2012
    • Dan Carpenter's avatar
      perf: Fix off by one test in perf_reg_value() · 1e6dd8ad
      Dan Carpenter authored
      
      
      The test should be >= ARRAY_SIZE() instead of > ARRAY_SIZE().
      
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Acked-by: default avatarJiri Olsa <jolsa@redhat.com>
      Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Link: http://lkml.kernel.org/r/20120905123126.GC6128@elgon.mountain
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      1e6dd8ad
    • Ingo Molnar's avatar
      Merge branch 'uprobes/core' of... · d0616c17
      Ingo Molnar authored
      
      Merge branch 'uprobes/core' of git://git.kernel.org/pub/scm/linux/kernel/git/oleg/misc into perf/core
      
      Pull uprobes fixes + cleanups from Oleg Nesterov.
      
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      d0616c17
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo' of... · bea8f354
      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:
      
       * Fix handling of unresolved samples when --symbols is used in 'report',
         from Feng Tang.
      
       * Add --symbols to 'script', similar to the one in 'report', from Feng Tang.
      
       * Add union member access support to 'probe', from Hyeoncheol Lee.
      
       * Make 'archive' work on Android, tweaking some of the utility parameters
         used (tar, rm), from Irina Tirdea.
      
       * Fixups to die() removal, from Namhyung Kim.
      
       * Render fixes for the TUI, from Namhyung Kim.
      
       * Don't enable annotation in non symbolic view, from Namhyung Kim.
      
       * Fix pipe mode in 'report', from Namhyung Kim.
      
       * Move related stats code from stat to util/, will be used by the 'stat'
         kvm tool, from Xiao Guangrong.
      
       * Add cpumask for uncore pmu, use it in 'stat', from Yan, Zheng.
      
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      bea8f354
  5. Sep 18, 2012