1. 04 6月, 2014 1 次提交
    • J
      perf record: Fix poll return value propagation · a515114f
      Jiri Olsa 提交于
      If the perf record command is interrupted in record__mmap_read_all
      function, the 'done' is set and err has the latest poll return
      value, which is most likely positive number (= number of pollfds
      ready to read).
      
      This 'positive err' is then propagated to the exit code, resulting
      in not finishing the perf.data header properly, causing following
      error in report:
      
        # perf record -F 50000 -a
      
        ---
        make the system real busy, so there's more chance
        to interrupt perf in event writing code
        ---
      
        ^C[ perf record: Woken up 16 times to write data ]
        [ perf record: Captured and wrote 30.292 MB perf.data (~1323468 samples) ]
      
        # perf report --stdio > /dev/null
        WARNING: The perf.data file's data size field is 0 which is unexpected.
        Was the 'perf record' command properly terminated?
      
      Fixing this by checking for positive poll return value
      and setting err to 0.
      Acked-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      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: 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/1401732126-19465-1-git-send-email-jolsa@kernel.orgSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      a515114f
  2. 12 5月, 2014 2 次提交
  3. 20 4月, 2014 1 次提交
    • A
      perf tools: Improve error reporting · ffa91880
      Adrien BAK 提交于
      In the current version, when using perf record, if something goes
      wrong in tools/perf/builtin-record.c:375
        session = perf_session__new(file, false, NULL);
      
      The error message:
      "Not enough memory for reading per file header"
      
      is issued. This error message seems to be outdated and is not very
      helpful. This patch proposes to replace this error message by
      "Perf session creation failed"
      
      I believe this issue has been brought to lkml:
      https://lkml.org/lkml/2014/2/24/458
      although this patch only tackles a (small) part of the issue.
      
      Additionnaly, this patch improves error reporting in
      tools/perf/util/data.c open_file_write.
      
      Currently, if the call to open fails, the user is unaware of it.
      This patch logs the error, before returning the error code to
      the caller.
      Reported-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NAdrien BAK <adrien.bak@metascale.org>
      Link: http://lkml.kernel.org/r/1397786443.3093.4.camel@beast
      [ Reorganize the changelog into paragraphs ]
      [ Added empty line after fd declaration in open_file_write ]
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      ffa91880
  4. 18 2月, 2014 3 次提交
  5. 01 2月, 2014 1 次提交
  6. 15 1月, 2014 2 次提交
  7. 13 1月, 2014 8 次提交
  8. 20 12月, 2013 4 次提交
    • A
      perf tools: Rename 'perf_record_opts' to 'record_opts · b4006796
      Arnaldo Carvalho de Melo 提交于
      Reduce typing, functions use class__method convention, so unlikely to
      clash with other libraries.
      
      This actually was discussed in the "Link:" referenced message below.
      
      Cc: Adrian Hunter <adrian.hunter@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@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/20131112113427.GA4053@ghostprotocols.netSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b4006796
    • A
      perf record: Rename 'perf_record' to plain 'record' · 8c6f45a7
      Arnaldo Carvalho de Melo 提交于
      Its a local struct and the functions use the __ separator from the class
      name to the method name, so its unlikely that this will clash with other
      namespaces.
      
      Save some typing then.
      
      Cc: Adrian Hunter <adrian.hunter@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@kernel.org>
      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-r011tdv7ianars9jr9ur2n4q@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8c6f45a7
    • A
      perf record: Simplify perf_record__write · cf8b2e69
      Arnaldo Carvalho de Melo 提交于
      1. Since all callers either test if it is less than zero or assign its
         result to an int variable, convert it from ssize_t to int;
      
      2. There is just one use for the 'session' variable, so use rec->session
         directly instead;
      
      3. No need to store the result of perf_data_file__write, since that
         result is either 'size' or -1, the later making the error result to
         be stored in 'errno' and accessed thru printf's %m in the pr_err
         call.
      
      Cc: Adrian Hunter <adrian.hunter@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@kernel.org>
      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-xwsk964dp681fica3xlqhjin@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cf8b2e69
    • J
      perf record: Use perf_data_file__write for output file · 50a9b868
      Jiri Olsa 提交于
      Changing the file output code to use the newly
      added perf_data_file__write interface.
      
      No functional change intended.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      50a9b868
  9. 10 12月, 2013 1 次提交
  10. 02 12月, 2013 1 次提交
  11. 28 11月, 2013 2 次提交
  12. 15 11月, 2013 1 次提交
  13. 13 11月, 2013 1 次提交
  14. 12 11月, 2013 5 次提交
  15. 07 11月, 2013 3 次提交
  16. 06 11月, 2013 1 次提交
    • J
      perf tools: Check maximum frequency rate for record/top · 714647bd
      Jiri Olsa 提交于
      Adding the check for maximum allowed frequency rate defined in following
      file:
      
        /proc/sys/kernel/perf_event_max_sample_rate
      
      When we cross the maximum value we fail and display detailed error
      message with advise.
      
        $ perf record -F 3000 ls
        Maximum frequency rate (2000) reached.
        Please use -F freq option with lower value or consider
        tweaking /proc/sys/kernel/perf_event_max_sample_rate.
      
      In case user does not specify the frequency and the default value cross
      the maximum, we display warning and set the frequency value to the
      current maximum.
      
        $ perf record ls
        Lowering default frequency rate to 2000.
        Please consider tweaking /proc/sys/kernel/perf_event_max_sample_rate.
      
      Same messages are used for 'perf top'.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      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@elte.hu>
      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/1383660887-1734-4-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      714647bd
  17. 29 10月, 2013 1 次提交
  18. 22 10月, 2013 2 次提交