1. 09 8月, 2015 1 次提交
  2. 10 6月, 2015 1 次提交
    • M
      perf tools: Avoid possible race condition in copyfile() · d7c72606
      Milos Vyletel 提交于
      Use unique temporary files when copying to buildid dir to prevent races
      in case multiple instances are trying to copy same file. This is done by
      
      - creating template in form <path>/.<filename>.XXXXXX where the suffix is
        used by mkstemp() to create unique file
      - change file mode
      - copy content
      - if successful link temp file to target file
      - unlink temp file
      
      At this point the only file left at target path should be the desired
      one either created by us or other instance if we raced. This should also
      prevent not yet fully copied files to be visible to to other perf
      instances that could try to parse them.
      
      On top of that slow_copyfile no longer needs to deal with file mode when
      creating file since temporary file is already created and mode is set.
      
      Succesfully tested by myself by running perf record, archive and reading
      the data on other system and by running perf buildid-cache on perf
      binary itself. I also did revert fix from 0635b0f7 that to exposes
      previously fixed race with EEXIST and recreator test passed sucessfully.
      Signed-off-by: NMilos Vyletel <milos@redhat.com>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1433775018-19868-1-git-send-email-milos@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d7c72606
  3. 18 5月, 2015 2 次提交
  4. 25 2月, 2015 1 次提交
  5. 11 2月, 2015 1 次提交
  6. 12 12月, 2014 2 次提交
  7. 03 10月, 2014 1 次提交
    • J
      perf callchain: Move callchain_param to util object in to fix python test · 23aadb1f
      Jiri Olsa 提交于
      In following commit we changed the location of callchains data:
      
        72a128aa
        perf tools: Move callchain config from record_opts to callchain_param
      
      Now all callchains stuff stays in callchain_param struct, which adds its
      dependency for evsel.c object and breaks python perf.so usage
      (unresolved callchain_param).
      
      Moving callchain_param into callchain.c and adding it into
      python-ext-sources unleash just another dependency hell, so I ended up
      adding callchain_param into util.c for now.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Milian Wolff <mail@milianw.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1412179229-19466-2-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      23aadb1f
  8. 15 8月, 2014 1 次提交
  9. 13 8月, 2014 1 次提交
  10. 12 8月, 2014 1 次提交
    • J
      perf tools: Show better error message in case we fail to open counters due to EBUSY error · 63914aca
      Jiri Olsa 提交于
      Showing better error message in case we fail to open counters due to the
      EBUSY error. If we detect oprofile daemon process running, we now
      display following message for EBUSY error:
      
        $ perf record ls
        Error:
        The PMU counters are busy/taken by another profiler.
        We found oprofile daemon running, please stop it and try again.
      
      In case oprofiled was not detected the current error message stays:
      
        $ perf record ls
        Error:
        The sys_perf_event_open() syscall returned with 16 (Device or resource busy) for event (cycles).
        /bin/dmesg may provide additional information.
        No CONFIG_PERF_EVENTS=y kernel support configured?
      
      Also changing PERF_FLAG_FD_CLOEXEC detection code not to display error
      in case of EBUSY error, as it currently does:
      
        $ perf record ls
        Error:
        perf_event_open(..., PERF_FLAG_FD_CLOEXEC) failed with unexpected error 16 (Device or resource busy)
        perf_event_open(..., 0) failed unexpectedly with error 16 (Device or resource busy)
        The PMU counters are busy/taken by another profiler.
        We found oprofile daemon running, please stop it and try again.
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      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: William Cohen <wcohen@redhat.com>
      Cc: Yann Droneaud <ydroneaud@opteya.com>
      Link: http://lkml.kernel.org/r/1406908014-8312-1-git-send-email-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      63914aca
  11. 17 7月, 2014 1 次提交
  12. 08 7月, 2014 1 次提交
  13. 09 6月, 2014 1 次提交
  14. 29 4月, 2014 1 次提交
  15. 18 2月, 2014 1 次提交
    • B
      perf tools: Move fs.* to lib/api/fs/ · cd0cfad7
      Borislav Petkov 提交于
      Move to generic library and kill magic.h as it is needed only in fs.h.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      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: Pekka Enberg <penberg@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Robert Richter <rric@kernel.org>
      Cc: Stanislav Fomichev <stfomichev@yandex-team.ru>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386605664-24041-3-git-send-email-bp@alien8.deSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cd0cfad7
  16. 13 12月, 2013 2 次提交
  17. 10 12月, 2013 1 次提交
  18. 05 12月, 2013 1 次提交
  19. 02 12月, 2013 3 次提交
  20. 23 10月, 2013 1 次提交
  21. 18 10月, 2013 1 次提交
  22. 14 10月, 2013 1 次提交
  23. 09 10月, 2013 2 次提交
  24. 08 8月, 2013 1 次提交
  25. 13 7月, 2013 1 次提交
  26. 16 3月, 2013 1 次提交
  27. 25 1月, 2013 2 次提交
  28. 29 10月, 2012 1 次提交
  29. 07 10月, 2012 1 次提交
  30. 03 10月, 2012 1 次提交
  31. 08 9月, 2012 1 次提交
    • I
      perf tools: add NO_BACKTRACE for application self-debugging · c9f08bee
      Irina Tirdea 提交于
      perf has support for self-debugging by defining dump_stack function.
      This function uses backtrace and backtrace_symbols functions defined as
      GNU extensions.
      
      In Android, bionic does not offer support for these functions and
      compilation will fail with the following error:
      
      target  C: libperf <= tools/perf/util/util.c
      tools/perf/util/util.c:4:22: fatal error: execinfo.h: No such file or directory
      compilation terminated.
      
      Add a compile-time option (NO_BACKTRACE) to enable or disable
      self-debugging functionality in perf. This can also help in debugging
      since it offers the possibility to turn on/off printing the backtrace.
      Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.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/1347065004-15306-12-git-send-email-irina.tirdea@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c9f08bee
  32. 08 8月, 2012 1 次提交
  33. 20 4月, 2012 1 次提交