1. 27 8月, 2019 2 次提交
  2. 23 8月, 2019 6 次提交
  3. 20 8月, 2019 1 次提交
  4. 14 8月, 2019 2 次提交
  5. 30 7月, 2019 25 次提交
  6. 17 5月, 2019 1 次提交
    • J
      perf tools: Add a 'percore' event qualifier · 064b4e82
      Jin Yao 提交于
      Add a 'percore' event qualifier, like cpu/event=0,umask=0x3,percore=1/,
      that sums up the event counts for both hardware threads in a core.
      
      We can already do this with --per-core, but it's often useful to do
      this together with other metrics that are collected per hardware thread.
      So we need to support this per-core counting on a event level.
      
      This can be implemented in only the user tool, no kernel support needed.
      
       v4:
       ---
       1. Add Arnaldo's patch which updates the documentation for
          this new qualifier.
       2. Rebase to latest perf/core branch
      
       v3:
       ---
       Simplify the code according to Jiri's comments.
       Before:
         "return term->val.percore ? true : false;"
       Now:
         "return term->val.percore;"
      
       v2:
       ---
       Change the qualifier name from 'coresum' to 'percore' according to
       comments from Jiri and Andi.
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Tested-by: NRavi Bangoria <ravi.bangoria@linux.ibm.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jin Yao <yao.jin@intel.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1555077590-27664-2-git-send-email-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      064b4e82
  7. 02 4月, 2019 1 次提交
    • A
      perf stat: Implement duration_time as a proper event · f0fbb114
      Andi Kleen 提交于
      The perf metric expression use 'duration_time' internally to normalize
      events.  Normal 'perf stat' without -x also prints the duration time.
      But when using -x, the interval is not output anywhere, which is
      inconvenient for any post processing which often wants to normalize
      values to time.
      
      So implement 'duration_time' as a proper perf event that can be
      specified explicitely with -e.
      
      The previous implementation of 'duration_time' only worked for metric
      processing. This adds the concept of a tool event that is handled by the
      tool. On the kernel level it is still mapped to the dummy software
      event, but the values are not read anymore, but instead computed by the
      tool.
      
      Add proper plumbing to handle this in the event parser, and display it
      in 'perf stat'. We don't want 'duration_time' to be added up, so it's
      only printed for the first CPU.
      
      % perf stat -e duration_time,cycles true
      
       Performance counter stats for 'true':
      
                 555,476 ns   duration_time
                 771,958      cycles
      
             0.000555476 seconds time elapsed
      
             0.000644000 seconds user
             0.000000000 seconds sys
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Link: http://lkml.kernel.org/r/20190326221823.11518-3-andi@firstfloor.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f0fbb114
  8. 21 3月, 2019 1 次提交
    • S
      perf evlist: Introduce side band thread · 657ee553
      Song Liu 提交于
      This patch introduces side band thread that captures extended
      information for events like PERF_RECORD_BPF_EVENT.
      
      This new thread uses its own evlist that uses ring buffer with very low
      watermark for lower latency.
      
      To use side band thread, we need to:
      
      1. add side band event(s) by calling perf_evlist__add_sb_event();
      2. calls perf_evlist__start_sb_thread();
      3. at the end of perf run, perf_evlist__stop_sb_thread().
      
      In the next patch, we use this thread to handle PERF_RECORD_BPF_EVENT.
      
      Committer notes:
      
      Add fix by Jiri Olsa for when te sb_tread can't get started and then at
      the end the stop_sb_thread() segfaults when joining the (non-existing)
      thread.
      
      That can happen when running 'perf top' or 'perf record' as a normal
      user, for instance.
      
      Further checks need to be done on top of this to more graciously handle
      these possible failure scenarios.
      Signed-off-by: NSong Liu <songliubraving@fb.com>
      Reviewed-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stanislav Fomichev <sdf@google.com>
      Link: http://lkml.kernel.org/r/20190312053051.2690567-15-songliubraving@fb.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      657ee553
  9. 06 2月, 2019 1 次提交