1. 08 4月, 2015 2 次提交
  2. 03 4月, 2015 7 次提交
  3. 01 4月, 2015 5 次提交
  4. 26 3月, 2015 2 次提交
    • A
      perf evlist: Return the first evsel with an invalid filter in apply_filters() · 23d4aad4
      Arnaldo Carvalho de Melo 提交于
      Use of a bad filter currently generates the message:
       Error: failed to set filter with 22 (Invalid argument)
      
      Add the event name to make it clear to which event the filter
      failed to apply:
        Error: Failed to set filter "foo" on event sched:sg_lb_stats: 22: Invalid argument
      
      To test it use something like:
      
       # perf record -e sched:sched_switch -e sched:*fork --filter parent_pid==1 -e sched:*wait* --filter bla usleep 1
        Error: failed to set filter "bla" on event sched:sched_stat_iowait with 22 (Invalid argument)
       #
      Based-on-a-patch-by: NDavid Ahern <dsahern@gmail.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-d7gq2fjvaecozp9o2i0siifu@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      23d4aad4
    • D
      perf timechart: Fix SIBGUS error on sparc64 · e94eedab
      David Ahern 提交于
      perf timechart -T on sparc64 is terminating due to SIGBUS. Backtrace:
      
      Program received signal SIGBUS, Bus error.
      0x0000000000173d7c in perf_evsel__intval (evsel=<value optimized out>, sample=0x7feffffda28, name=0x289b28 "prev_state")
          at util/evsel.c:1918
      1918	util/evsel.c: No such file or directory.
      	in util/evsel.c
      Missing separate debuginfos, use: debuginfo-install audit-libs-2.3.7-1.0.1.el6.sparc64 bzip2-libs-1.0.5-7.el6_0.sparc64 elfutils-libelf-0.155-2.0.3.el6.sparc64 elfutils-libs-0.155-2.0.3.el6.sparc64 glibc-2.12-1.132.0.8.el6_5.sparc64 numactl-2.0.7-8.el6.sparc64 python-libs-2.6.6-52.0.2.el6.sparc64 slang-2.2.1-1.el6.sparc64 xz-libs-4.999.9-0.3.beta.20091007git.el6.sparc64 zlib-1.2.3-29.el6.sparc64
      (gdb) bt
      0  0x0000000000173d7c in perf_evsel__intval (evsel=<value optimized out>, sample=0x7feffffda28,
          name=0x289b28 "prev_state") at util/evsel.c:1918
      1  0x0000000000123b94 in process_sample_sched_switch (tchart=0x7feffffe040, evsel=0x4ca850, sample=0x7feffffda28,
          backtrace=0xc39010 "") at builtin-timechart.c:627
      2  0x0000000000122828 in process_sample_event (tool=0x7feffffe040, event=<value optimized out>, sample=0x7feffffda28,
          evsel=0x4ca850, machine=0x4c9c88) at builtin-timechart.c:569
      
      Another extended load on unaligned pointer. As before fix by copying to
      a temporary variable using memcpy.
      Signed-off-by: NDavid Ahern <david.ahern@oracle.com>
      Link: http://lkml.kernel.org/r/1427228049-51893-1-git-send-email-david.ahern@oracle.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e94eedab
  5. 25 3月, 2015 1 次提交
  6. 24 3月, 2015 6 次提交
  7. 23 3月, 2015 7 次提交
  8. 22 3月, 2015 6 次提交
  9. 21 3月, 2015 1 次提交
    • M
      perf tools: Fix race in build_id_cache__add_s() · 0635b0f7
      Milos Vyletel 提交于
      int build_id_cache__add_s(const char *sbuild_id, const char *debugdir,
                                const char *name, bool is_kallsyms, bool is_vdso)
      {
      ...
              if (access(filename, F_OK)) {
                     ^--------------------------------------------------------- [1]
                      if (is_kallsyms) {
                               if (copyfile("/proc/kallsyms", filename))
                                      goto out_free;
                      } else if (link(realname, filename) && copyfile(name, filename))
                                   ^-----------------------------^------------- [2]
                                                                  \------------ [3]
                              goto out_free;
              }
      ...
      
      When multiple instances of perf record get to [1] at more or less same time and
      run access() one or more may get failure because the file does not exist yet
      (since the first instance did not have chance to link it yet).
      
      At this point the race moves to link() at [2] where first thread to get
      there links file and goes on but second one gets -EEXIST so it runs
      copyfile [3] which truncates the file.
      
      reproducer:
      
      rm -rf /root/.debug
      for cpu in $(awk '/processor/ {print $3}' /proc/cpuinfo); do
      	perf record -a -v -T -F 1000 -C $cpu \
      		-o perf-${cpu}.data sleep 5 2> /dev/null &
      done
      wait
      
      and simply search for empty files by:
      
      find /lib/modules/`uname -r`/kernel/* -size 0
      Signed-off-by: NMilos Vyletel <milos@redhat.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@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/1426847846-11112-1-git-send-email-milos@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0635b0f7
  10. 20 3月, 2015 2 次提交
  11. 18 3月, 2015 1 次提交