1. 26 9月, 2012 3 次提交
  2. 25 9月, 2012 3 次提交
    • N
      tools lib traceevent: Fix error path on pevent_parse_event · f1b2256d
      Namhyung Kim 提交于
      If __pevent_parse_format() succeeded but add_event() failed, 'ret' didn't
      have a proper error code.  Set it to PEVENT_ERRNO__MEM_ALLOC_FAILED.
      
      In addition, at that point 'event' also has fields and format
      information and they all need to be freed.  Call pevent_free_format() to
      handle it.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1348575919-4954-1-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f1b2256d
    • N
      perf test: Fix build failure · af9da88f
      Namhyung Kim 提交于
      The commit 6a6cd11d ("perf test: Add test for the sched tracepoint
      format fields") added following build error:
      
          CC builtin-test.o
        builtin-test.c: In function ‘perf_evsel__test_field’:
        builtin-test.c:1216:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
        builtin-test.c: In function ‘perf_evsel__tp_sched_test’:
        builtin-test.c:1242:6: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable]
        cc1: all warnings being treated as errors
        make: *** [builtin-test.o] Error 1
      Signed-off-by: NNamhyung 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/1348539628-3821-1-git-send-email-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      af9da88f
    • I
      Merge tag 'perf-core-for-mingo' of... · f74eb728
      Ingo Molnar 提交于
      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:
      
       * Convert the trace builtins to use the growing evsel/evlist
         tracepoint infrastructure, removing several open coded constructs
         like switch like series of strcmp to dispatch events, etc.
         Basically what had already been showcased in 'perf sched'.
      
       * Add evsel constructor for tracepoints, that uses libtraceevent
         just to parse the /format events file, use it in a new 'perf test'
         to make sure the libtraceevent format parsing regressions can
         be more readily caught.
      
       * Some strange errors were happening in some builds, but not on the
         next, reported by several people, problem was some parser related
         files, generated during the build, didn't had proper make deps,
         fix from Eric Sandeen.
      
       * Fix some compiling errors on 32-bit, from Feng Tang.
      
       * Don't use sscanf extension %as, not available on bionic, reimplementation
         by Irina Tirdea.
      
       * Fix bfd.h/libbfd detection with recent binutils, from Markus Trippelsdorf.
      
       * Introduce struct and cache information about the environment where a
         perf.data file was captured, from Namhyung Kim.
      
       * Fix several error paths in libtraceevent, from Namhyung Kim.
      
         Print event causing perf_event_open() to fail in 'perf record',
         from Stephane Eranian.
      
       * New 'kvm' analysis tool, from Xiao Guangrong.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f74eb728
  3. 24 9月, 2012 24 次提交
  4. 21 9月, 2012 4 次提交
    • X
      perf kvm: Events analysis tool · bcf6edcd
      Xiao Guangrong 提交于
      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: NDong Hao <haodong@linux.vnet.ibm.com>
      Signed-off-by: NRunzhen 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: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Acked-by: NDavid 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bcf6edcd
    • X
      KVM: x86: Export svm/vmx exit code and vector code to userspace · 26bf264e
      Xiao Guangrong 提交于
      Exporting KVM exit information to userspace to be consumed by perf.
      Signed-off-by: NDong Hao <haodong@linux.vnet.ibm.com>
      [ Dong Hao <haodong@linux.vnet.ibm.com>: rebase it on acme's git tree ]
      Signed-off-by: NXiao Guangrong <xiaoguangrong@linux.vnet.ibm.com>
      Acked-by: NMarcelo 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.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      26bf264e
    • E
      perf tools: Fix parallel build · e6048fb8
      Eric Sandeen 提交于
      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: NEric Sandeen <sandeen@redhat.com>
      Reviewed-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/505BD190.40707@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e6048fb8
    • S
      perf record: Print event causing perf_event_open() to fail · 1863fbbb
      Stephane Eranian 提交于
      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: NStephane 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@quadSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1863fbbb
  5. 20 9月, 2012 3 次提交
  6. 19 9月, 2012 3 次提交