1. 02 12月, 2013 5 次提交
  2. 30 11月, 2013 1 次提交
    • I
      Merge tag 'perf-core-for-mingo' of... · 0ed1e0be
      Ingo Molnar 提交于
      Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
        * Make per-cpu mmaps the default in 'perf record', from Adrian Hunter.
      
        * Default -t/--thread 'perf record' option to no inheritance,
          from Adrian Hunter.
      
        * Make 'perf top -g' refer to callchains, for consistency with other tools,
          from David Ahern.
      
        * Skip ignored symbols while printing callchain, from David Ahern.
      
        * Print callchains and symbols if they exist in 'perf script',
          from David Ahern.
      
        * Remove thread summary coloring in 'perf trace', from Pekka Enberg.
      
        * zsh completion support, from Ramkumar Ramachandra.
      
        * 'perf timechart' improvements, including backtrace support,
          from Stanislav Fomichev.
      
        * Fix using kcore files stored in the buildid cache when doing report/annotate
          in non-live sessions, from Adrian Hunter
      
        * Minor 'timechart' cleanups.
      
        * Fix tags/TAGS targets rebuilding, from Jiri Olsa.
      
        * Add options to show comm, fork, exit and mmap PERF_RECORD_ events in
          'perf script', from Namhyung Kim.
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      0ed1e0be
  3. 28 11月, 2013 32 次提交
  4. 27 11月, 2013 2 次提交
    • S
      perf/x86: Add RAPL hrtimer support · 65661f96
      Stephane Eranian 提交于
      The RAPL PMU counters do not interrupt on overflow.
      Therefore, the kernel needs to poll the counters
      to avoid missing an overflow. This patch adds
      the hrtimer code to do this.
      
      The timer interval is calculated at boot time
      based on the power unit used by the HW.
      
      There is one hrtimer per-cpu to handle the case
      of multiple simultaneous use across cores on
      the same package + hotplug CPU.
      
      Thanks to Maria Dimakopoulou for her contributions
      to this patch especially on the math aspects.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Reviewed-by: NMaria Dimakopoulou <maria.n.dimakopoulou@gmail.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      [ Applied 32-bit build fix. ]
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: acme@redhat.com
      Cc: jolsa@redhat.com
      Cc: zheng.z.yan@intel.com
      Cc: bp@alien8.de
      Cc: maria.n.dimakopoulou@gmail.com
      Link: http://lkml.kernel.org/r/1384275531-10892-5-git-send-email-eranian@google.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      65661f96
    • S
      perf/x86: Add Intel RAPL PMU support · 4788e5b4
      Stephane Eranian 提交于
      This patch adds a new uncore PMU to expose the Intel
      RAPL energy consumption counters. Up to 3 counters,
      each counting a particular RAPL event are exposed.
      
      The RAPL counters are available on Intel SandyBridge,
      IvyBridge, Haswell. The server skus add a 3rd counter.
      
      The following events are available and exposed in sysfs:
      
        - power/energy-cores: power consumption of all cores on socket
        - power/energy-pkg: power consumption of all cores + LLc cache
        - power/energy-dram: power consumption of DRAM (servers only)
      
      For each event both the unit (Joules) and scale (2^-32 J)
      is exposed in sysfs for use by perf stat and other tools.
      The files are:
      
      	/sys/devices/power/events/energy-*.unit
      	/sys/devices/power/events/energy-*.scale
      
      The RAPL PMU is uncore by nature and is implemented such
      that it only works in system-wide mode. Measuring only
      one CPU per socket is sufficient. The /sys/devices/power/cpumask
      file can be used by tools to figure out which CPUs to monitor
      by default. For instance, on a 2-socket system, 2 CPUs
      (one on each socket) will be shown.
      
      All the counters measure in the same unit (exposed via sysfs).
      The perf_events API exposes all RAPL counters as 64-bit integers
      counting in unit of 1/2^32 Joules (about 0.23 nJ). User level tools
      must convert the counts by multiplying them by 2^-32 to obtain
      Joules. The reason for this is that the kernel avoids
      doing floating point math whenever possible because it is
      expensive (user floating-point state must be saved). The method
      used avoids kernel floating-point usage. There is no loss of
      precision. Thanks to PeterZ for suggesting this approach.
      
      To convert the raw count in Watt:
         W = C * 2.3 / (1e10 * time)
      or ldexp(C, -32).
      
      RAPL PMU is a new standalone PMU which registers with the
      perf_event core subsystem. The PMU type (attr->type) is
      dynamically allocated and is available from /sys/device/power/type.
      
      Sampling is not supported by the RAPL PMU. There is no
      privilege level filtering either.
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Reviewed-by: NMaria Dimakopoulou <maria.n.dimakopoulou@gmail.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NPeter Zijlstra <peterz@infradead.org>
      Cc: acme@redhat.com
      Cc: jolsa@redhat.com
      Cc: zheng.z.yan@intel.com
      Cc: bp@alien8.de
      Link: http://lkml.kernel.org/r/1384275531-10892-4-git-send-email-eranian@google.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      4788e5b4