1. 17 7月, 2014 1 次提交
  2. 12 6月, 2014 1 次提交
    • N
      perf record: Fix to honor user freq/interval properly · 17314e23
      Namhyung Kim 提交于
      When configuring event perf checked a wrong condition that user
      specified both of freq (-F) and period (-c) or the event has no
      default value.  This worked because most of events don't have default
      value and only tracepoint events have default of 1 (and it's not
      desirable to change it for those events).
      
      However, Andi's downloadable event patch changes the situation so it
      cannot change the value for those events.  Fix it by allowing override
      the default value if user gives one of the options.
      
        $ perf record -a -e uops_retired.all -F 4000 sleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.325 MB perf.data (~14185 samples) ]
      
        $ perf evlist -F
        cpu/uops_retired.all/: sample_freq=4000
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Link: http://lkml.kernel.org/r/1402292617-26278-1-git-send-email-namhyung@kernel.orgSigned-off-by: NJiri Olsa <jolsa@kernel.org>
      17314e23
  3. 09 6月, 2014 1 次提交
  4. 19 3月, 2014 1 次提交
  5. 11 3月, 2014 1 次提交
  6. 18 2月, 2014 3 次提交
  7. 21 1月, 2014 1 次提交
  8. 15 1月, 2014 1 次提交
  9. 13 1月, 2014 1 次提交
  10. 28 12月, 2013 2 次提交
  11. 20 12月, 2013 1 次提交
  12. 17 12月, 2013 1 次提交
    • B
      tools/: Convert to new topic libraries · 553873e1
      Borislav Petkov 提交于
      Move debugfs.* to api/fs/. We have a common tools/lib/api/ place where
      the Makefile lives and then we place the headers in subdirs.
      
      For example, all the fs-related stuff goes to tools/lib/api/fs/ from
      which we get libapikfs.a (acme got almost the naming he wanted :-)) and
      we link it into the tools which need it - in this case perf and
      tools/vm/page-types.
      
      acme:
      
      "Looking at the implementation, I think some tools can even link
      directly to the .o files, avoiding the .a file altogether.
      
      But that is just an optimization/finer granularity tools/lib/
      cherrypicking that toolers can make use of."
      
      Fixup documentation cleaning target while at it.
      Signed-off-by: NBorislav Petkov <bp@suse.de>
      Acked-by: NIngo Molnar <mingo@kernel.org>
      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: Ingo Molnar <mingo@kernel.org>
      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-2-git-send-email-bp@alien8.deSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      553873e1
  13. 05 12月, 2013 2 次提交
  14. 28 11月, 2013 1 次提交
  15. 27 11月, 2013 1 次提交
    • S
      tools/perf/stat: Add event unit and scale support · 410136f5
      Stephane Eranian 提交于
      This patch adds perf stat support for handling event units and
      scales as exported by the kernel.
      
      The kernel can export PMU events actual unit and scaling factor
      via sysfs:
      
        $ ls -1 /sys/devices/power/events/energy-*
        /sys/devices/power/events/energy-cores
        /sys/devices/power/events/energy-cores.scale
        /sys/devices/power/events/energy-cores.unit
        /sys/devices/power/events/energy-pkg
        /sys/devices/power/events/energy-pkg.scale
        /sys/devices/power/events/energy-pkg.unit
        $ cat /sys/devices/power/events/energy-cores.scale
        2.3283064365386962890625e-10
        $ cat cat /sys/devices/power/events/energy-cores.unit
        Joules
      
      This patch modifies the pmu event alias code to check
      for the presence of the .unit and .scale files to load
      the corresponding values. They are then used by perf stat
      transparently:
      
         # perf stat -a -e power/energy-pkg/,power/energy-cores/,cycles -I 1000 sleep 1000
         #          time             counts   unit events
             1.000214717               3.07 Joules power/energy-pkg/         [100.00%]
             1.000214717               0.53 Joules power/energy-cores/
             1.000214717           12965028        cycles                    [100.00%]
             2.000749289               3.01 Joules power/energy-pkg/
             2.000749289               0.52 Joules power/energy-cores/
             2.000749289           15817043        cycles
      
      When the event does not have an explicit unit exported by
      the kernel, nothing is printed. In csv output mode, there
      will be an empty field.
      
      Special thanks to Jiri for providing the supporting code
      in the parser to trigger reading of the scale and unit files.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Reviewed-by: NJiri Olsa <jolsa@redhat.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: zheng.z.yan@intel.com
      Cc: bp@alien8.de
      Cc: maria.n.dimakopoulou@gmail.com
      Cc: acme@redhat.com
      Link: http://lkml.kernel.org/r/1384275531-10892-3-git-send-email-eranian@google.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      410136f5
  16. 15 11月, 2013 1 次提交
  17. 13 11月, 2013 1 次提交
  18. 12 11月, 2013 1 次提交
    • A
      perf evsel: Remove idx parm from constructor · ef503831
      Arnaldo Carvalho de Melo 提交于
      Most uses of the evsel constructor are followed by a call to
      perf_evlist__add with an idex of evlist->nr_entries, so make rename
      the current constructor to perf_evsel__new_idx and remove the need
      for passing the constructor for the common case.
      
      We still need the new_idx variant because the way groups are handled,
      with evsel->nr_members holding the number of entries in an evlist,
      partitioning the evlist into sublists inside a single linked list.
      
      This asks for a clarifying refactoring, but for now simplify the non
      parser cases, so that tool writers don't have to bother with evsel idx
      setting.
      
      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: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-zy9tskx6jqm2rmw7468zze2a@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ef503831
  19. 04 11月, 2013 4 次提交
  20. 21 10月, 2013 1 次提交
  21. 18 10月, 2013 2 次提交
  22. 11 10月, 2013 1 次提交
    • J
      perf evlist: Fix perf_evlist__mmap_read event overflow · a65cb4b9
      Jiri Olsa 提交于
      The perf_evlist__mmap_read used 'union perf_event' as a placeholder for
      event crossing the mmap boundary.
      
      This is ok for sample shorter than ~PATH_MAX. However we could grow up
      to the maximum sample size which is 16 bits max.
      
      I hit this overflow issue when using 'perf top -G dwarf' which produces
      sample with the size around 8192 bytes.  We could configure any valid
      sample size here using: '-G dwarf,size'.
      
      Using array with sample max size instead for the event placeholder. Also
      adding another safe check for the dynamic size of the user stack.
      
      TODO: The 'struct perf_mmap' is quite big now, maybe we could use some
      lazy allocation for event_copy size.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NDavid Ahern <dsahern@gmail.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/1380721599-24285-1-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a65cb4b9
  23. 04 10月, 2013 1 次提交
  24. 11 9月, 2013 1 次提交
    • S
      perf tools: Add attr->mmap2 support · 5c5e854b
      Stephane Eranian 提交于
      This patch adds support for the new PERF_RECORD_MMAP2 record type
      exposed by the kernel. This is an extended PERF_RECORD_MMAP record.
      
      It adds for each file-backed mapping the device major, minor number and
      the inode number and generation.
      
      This triplet uniquely identifies the source of a file-backed mapping. It
      can be used to detect identical virtual mappings between processes, for
      instance.
      
      The patch will prefer MMAP2 over MMAP.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1377079825-19057-3-git-send-email-eranian@google.com
      [ Cope with 314add6b "Change machine__findnew_thread() to set thread pid",
        fix 'perf test' regression test entry affected,
        use perf_missing_features.mmap2 to fallback to not using .mmap2 in older kernels,
        so that new tools can work with kernels where this feature is not present ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5c5e854b
  25. 03 9月, 2013 1 次提交
  26. 30 8月, 2013 6 次提交
  27. 17 8月, 2013 1 次提交