1. 15 2月, 2018 19 次提交
  2. 06 2月, 2018 2 次提交
  3. 05 2月, 2018 2 次提交
    • J
      perf record: Fix period option handling · f290aa1f
      Jiri Olsa 提交于
      Stephan reported we don't unset PERIOD sample type when --no-period is
      specified. Adding the unset check and reset PERIOD if --no-period is
      specified.
      
      Committer notes:
      
      Check the sample_type, it shouldn't have PERF_SAMPLE_PERIOD there when
      --no-period is used.
      
      Before:
      
        # perf record --no-period sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.018 MB perf.data (7 samples) ]
        # perf evlist -v
        cycles:ppp: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|PERIOD, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
        #
      
      After:
      
      [root@jouet ~]# perf record --no-period sleep 1
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.019 MB perf.data (17 samples) ]
      [root@jouet ~]# perf evlist -v
      cycles:ppp: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, enable_on_exec: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
      [root@jouet ~]#
      Reported-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Tested-by: NStephane Eranian <eranian@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20180201083812.11359-3-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f290aa1f
    • J
      perf evsel: Fix period/freq terms setup · 49c0ae80
      Jiri Olsa 提交于
      Stephane reported that we don't set properly PERIOD sample type for
      events with period term defined.
      
      Before:
        $ perf record -e cpu/cpu-cycles,period=1000/u ls
        $ perf evlist -v
        cpu/cpu-cycles,period=1000/u: ... sample_type: IP|TID|TIME|PERIOD, ...
      
      After:
        $ perf record -e cpu/cpu-cycles,period=1000/u ls
        $ perf evlist -v
        cpu/cpu-cycles,period=1000/u: ... sample_type: IP|TID|TIME, ...
      
      Setting PERIOD sample type based on period term setup.
      
      Committer note:
      
      When we use -c or a period=N term in the event definition, then we don't
      need to ask the kernel, for this event, via perf_event_attr.sample_type
      |= PERF_SAMPLE_PERIOD, to put the event period in each sample for this
      event, as we know it already, it is in perf_event_attr.sample_period.
      Reported-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NStephane Eranian <eranian@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/20180201083812.11359-2-jolsa@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      49c0ae80
  4. 25 1月, 2018 17 次提交