1. 23 10月, 2015 6 次提交
  2. 22 10月, 2015 2 次提交
  3. 21 10月, 2015 1 次提交
    • K
      perf cpu_map: Fix core dump caused by per-socket/core system-wide stat · bc1d0368
      Kan Liang 提交于
      Perf will core dump if --per-socket/core -a are applied for perf stat.
      
      The root cause is that cpu_map__build_map set refcnt of evlist's cpu_map
      to 1.  It should set refcnt for the newly created cpu_map, not evlist's
      cpu_map.
      
      Here is the example:
      
        # perf stat -e cycles --per-socket -a sleep 1
      
         Performance counter stats for 'system wide':
      
        S0       36         30,196,257      cycles
        S1       28         15,823,536      cycles
      
             1.001126828 seconds time elapsed
      
        *** Error in `./perf': corrupted double-linked list: 0x00000000021f9090 ***
        ======= Backtrace: =========
        /lib64/libc.so.6[0x3002e7bbe7]
        /lib64/libc.so.6[0x3002e7d2b5]
        ./perf(perf_evsel__delete+0x28)[0x485bdd]
        ./perf[0x4800e8]
        ./perf(perf_evlist__delete+0x5e)[0x482cd5]
        ./perf(cmd_stat+0xf25)[0x432328]
        ./perf[0x4768e0]
        ./perf[0x476ad6]
        ./perf[0x476b41]
        ./perf(main+0x1d0)[0x476db2]
        /lib64/libc.so.6(__libc_start_main+0xf5)[0x3002e21b45]
        ./perf[0x4202c5]
      Signed-off-by: NKan Liang <kan.liang@intel.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Andi Kleen <ak@linux.intel.com>
      Link: http://lkml.kernel.org/r/1444388363-35936-1-git-send-email-kan.liang@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bc1d0368
  4. 20 10月, 2015 24 次提交
  5. 13 10月, 2015 6 次提交
  6. 08 10月, 2015 1 次提交
    • A
      perf python: Support the PERF_RECORD_SWITCH event · ae938802
      Arnaldo Carvalho de Melo 提交于
      To test it check tools/perf/python/twatch.py, after following the
      instructions there to enable context_switch, output looks like:
      
        [root@zoo linux]# tools/perf/python/twatch.py
        cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 0 }
        cpu: 2, pid: 31463, tid: 31496 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31496, switch_out: 0 }
        cpu: 2, pid: 31463, tid: 31496 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31496, switch_out: 1 }
        cpu: 3, pid: 31463, tid: 31527 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31527, switch_out: 0 }
        cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 1 }
        cpu: 3, pid: 31463, tid: 31527 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31527, switch_out: 1 }
        cpu: 1, pid: 31463, tid: 31463 { type: context_switch, next_prev_pid: 31463, next_prev_tid: 31463, switch_out: 0 }
        ^CTraceback (most recent call last):
          File "tools/perf/python/twatch.py", line 67, in <module>
            main(context_switch = 1, thread = 31463)
          File "tools/perf/python/twatch.py", line 40, in main
            evlist.poll(timeout = -1)
        KeyboardInterrupt
        [root@zoo linux]#
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Guy Streeter <streeter@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-1ukistmpamc5z717k80ctcp2@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ae938802