1. 06 10月, 2012 3 次提交
    • J
      perf diff: Add weighted diff computation way to compare hist entries · 81d5f958
      Jiri Olsa 提交于
      Adding 'wdiff' as new computation way to compare hist entries.
      
      If specified the 'Weighted diff' column is displayed with value 'd'
      computed as:
      
         d = B->period * WEIGHT-A - A->period * WEIGHT-B
      
        - A/B being matching hist entry from first/second file specified
          (or perf.data/perf.data.old) respectively.
        - period being the hist entry period value
        - WEIGHT-A/WEIGHT-B being user suplied weights in the the '-c' option
          behind ':' separator like '-c wdiff:1,2'.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.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/1349448287-18919-5-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      81d5f958
    • J
      perf diff: Add option to sort entries based on diff computation · 96c47f19
      Jiri Olsa 提交于
      Adding support to sort hist entries based on the outcome of selected
      computation. It's now possible to specify '+' as a first character of
      '-c' option value to make such sort.
      
      Example:
      
        $ perf diff -c ratio -b
        # Event 'cache-misses'
        #
        #   Baseline           Ratio      Shared Object                            Symbol
        #   ........  ..............  .................  ................................
        #
              19.64%            0.69  [kernel.kallsyms]  [k] clear_page
               0.30%            0.17  [kernel.kallsyms]  [k] mm_alloc
               0.04%            0.20  [kernel.kallsyms]  [k] kmem_cache_alloc
      
        $ perf diff -c +ratio -b
        # Event 'cache-misses'
        #
        #   Baseline           Ratio      Shared Object                            Symbol
        #   ........  ..............  .................  ................................
        #
              19.64%            0.69  [kernel.kallsyms]  [k] clear_page
               0.04%            0.20  [kernel.kallsyms]  [k] kmem_cache_alloc
               0.30%            0.17  [kernel.kallsyms]  [k] mm_alloc
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.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/1349448287-18919-4-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      96c47f19
    • J
      perf diff: Add ratio computation way to compare hist entries · 7aaf6b35
      Jiri Olsa 提交于
      Adding -c option to select computation method with the current 'Delta'
      computation as default. Current possible values are of this option are:
      'delta' and 'ratio'.
      
      Adding 'ratio' as new computation way to compare hist entries.  If
      specified the 'Ratio' column is displayed with value 'r' computed as:
      
        r = A->period / B->period
      
      with:
        - A/B being matching hist entry from first/second file specified
          (or perf.data/perf.data.old) respectively.
        - period being the hist entry period value
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.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/1349448287-18919-3-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7aaf6b35
  2. 05 10月, 2012 6 次提交
  3. 15 9月, 2012 1 次提交
  4. 11 9月, 2012 1 次提交
    • I
      perf tools: Use __maybe_used for unused variables · 1d037ca1
      Irina Tirdea 提交于
      perf defines both __used and __unused variables to use for marking
      unused variables. The variable __used is defined to
      __attribute__((__unused__)), which contradicts the kernel definition to
      __attribute__((__used__)) for new gcc versions. On Android, __used is
      also defined in system headers and this leads to warnings like: warning:
      '__used__' attribute ignored
      
      __unused is not defined in the kernel and is not a standard definition.
      If __unused is included everywhere instead of __used, this leads to
      conflicts with glibc headers, since glibc has a variables with this name
      in its headers.
      
      The best approach is to use __maybe_unused, the definition used in the
      kernel for __attribute__((unused)). In this way there is only one
      definition in perf sources (instead of 2 definitions that point to the
      same thing: __used and __unused) and it works on both Linux and Android.
      This patch simply replaces all instances of __used and __unused with
      __maybe_unused.
      Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com>
      Acked-by: NPekka Enberg <penberg@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
      [ committer note: fixed up conflict with a116e05d in builtin-sched.c ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1d037ca1
  5. 09 9月, 2012 3 次提交