1. 10 4月, 2010 1 次提交
  2. 08 4月, 2010 6 次提交
    • A
      perf trace: Ignore "overwrite" field if present in /events/header_page · e9e94e3b
      Arnaldo Carvalho de Melo 提交于
      That is not used in perf where we have the LOST events.
      
      Without this patch we get:
      
      [root@doppio ~]# perf lock report | head -3
        Warning: Error: expected 'data' but read 'overwrite'
      
      So, to make the same perf command work with kernels with and without
      this field, introduce variants for the parsing routines to not warn the
      user in such case.
      
      Discussed-with: Steven Rostedt <rostedt@goodmis.org>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e9e94e3b
    • R
      perf: cleanup some Documentation · 854c5548
      Randy Dunlap 提交于
      Correct typos in perf bench & perf sched help text.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <20100331113100.cc898487.randy.dunlap@oracle.com>
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      854c5548
    • R
      perf bench: fix spello · f0e9c4fc
      Randy Dunlap 提交于
      Fix spello in user message.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
      Cc: Paul Mackerra <paulus@samba.org>s
      LKML-Reference: <20100331113056.2c7df509.randy.dunlap@oracle.com>
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      f0e9c4fc
    • A
      perf tools: Reorganize some structs to save space · eed05fe7
      Arnaldo Carvalho de Melo 提交于
      Using 'pahole --packable' I found some structs that could be reorganized
      to eliminate alignment holes, in some cases getting them to be cacheline
      multiples.
      
      [acme@doppio linux-2.6-tip]$ codiff perf.old ~/bin/perf
      builtin-annotate.c:
        struct perf_session    |   -8
        struct perf_header     |   -8
       2 structs changed
      
      builtin-diff.c:
        struct sample_data         |   -8
       1 struct changed
        diff__process_sample_event |   -8
       1 function changed, 8 bytes removed, diff: -8
      
      builtin-sched.c:
        struct sched_atom      |   -8
       1 struct changed
      
      builtin-timechart.c:
        struct per_pid         |   -8
       1 struct changed
        cmd_timechart          |  -16
       1 function changed, 16 bytes removed, diff: -16
      
      builtin-probe.c:
        struct perf_probe_point |   -8
        struct perf_probe_event |   -8
       2 structs changed
        opt_add_probe_event     |   -3
       1 function changed, 3 bytes removed, diff: -3
      
      util/probe-finder.c:
        struct probe_finder      |   -8
       1 struct changed
        find_kprobe_trace_events |  -16
       1 function changed, 16 bytes removed, diff: -16
      
      /home/acme/bin/perf:
       4 functions changed, 43 bytes removed, diff: -43
      [acme@doppio linux-2.6-tip]$
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      eed05fe7
    • A
      perf TUI: Move "Yes" button to before "No" · c0ed55d2
      Arnaldo Carvalho de Melo 提交于
      Esc + Enter should be enough warning to avoid accidentaly exiting from
      the browser.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c0ed55d2
    • A
      perf TUI: Show filters on the title and add help line about how to zoom out · 6e7ab4c6
      Arnaldo Carvalho de Melo 提交于
      Suggested-by: NIngo Molnar <molnar@elte.hu>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6e7ab4c6
  3. 06 4月, 2010 1 次提交
    • A
      perf kmem: Fix breakage introduced by 5a0e3ad6 slab.h script · 8c40041f
      Arnaldo Carvalho de Melo 提交于
      Commit 5a0e3ad6 ("include cleanup: Update gfp.h and slab.h
      includes to prepare for breaking implicit slab.h inclusion
      from percpu.h") added a '#include <linux/slab.h>' to
      tools/perf/builtin-kmem.h because: that tool has lines like
      this:
      
              if (!strcmp(event->name, "kmalloc") ||
                  !strcmp(event->name, "kmem_cache_alloc")) {
                      process_alloc_event(data, event, cpu, timestamp, thread, 0);
                      return;
              }
      
      So, using the script regex:
      
      >>> import re
      >>> s = re.compile(r'^(|.*[^a-zA-Z0-9_])_*(slab_is_available|kmem_cache_|k[mzc]alloc|krealloc|kz?free|ksize|__getname|putname)')
      >>> l = '   !strcmp(event->name, "kmem_cache_alloc")) {'
      >>> s.search(l)
      <_sre.SRE_Match object at 0xb77b1ad0>
      >>>
      
      Remove that file that is not available in the tools/perf include
      path and thus builtin-kmem.c couldn't be compiled.
      Reported-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      LKML-Reference: <1270561053-14308-1-git-send-email-acme@infradead.org>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8c40041f
  4. 04 4月, 2010 3 次提交
    • H
      perf: Swap inclusion order of util.h and string.h in util/string.c · 8141d005
      Hitoshi Mitake 提交于
      Currently util/string.c includes headers in this order: string.h, util.h
      But this causes a build error because __USE_GNU definition
      is needed for strndup() definition:
      
      	% make -j
      	touch .perf.dev.null
      	    CC util/string.o
      	cc1: warnings being treated as errors
      	util/string.c: In function ‘argv_split’:
      	util/string.c:171: error: implicit declaration of function ‘strndup’
      	util/string.c:171: error: incompatible implicit declaration of built-in function ‘strndup’
      
      So this patch swaps the headers inclusion order.
      util.h defines _GNU_SOURCE, and /usr/include/features.h defines
      __USE_GNU as 1 if _GNU_SOURCE is defined.
      Signed-off-by: NHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <1270368798-27232-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: NFrederic Weisbecker <fweisbec@gmail.com>
      8141d005
    • A
      perf TUI: Add a "Zoom into COMM(PID) thread" and reverse operations · a5e29aca
      Arnaldo Carvalho de Melo 提交于
      Now one can press the right arrow key and in addition to being able to
      filter by DSO, filter out by thread too, or a combination of both
      filters.
      
      With this one can start collecting events for the whole system, then
      focus on a subset of the collected data quickly.
      
      Cc: Avi Kivity <avi@redhat.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a5e29aca
    • A
      perf newt: Add a "Zoom into foo.so DSO" and reverse operations · 83753190
      Arnaldo Carvalho de Melo 提交于
      Clicking on -> will bring as one of the popup menu options a "Zoom into
      CURRENT DSO", i.e. CURRENT will be replaced by the name of the DSO in
      the current line.
      
      Choosing this option will filter out all samples that didn't took place
      in a symbol in this DSO.
      
      After that the option reverts to "Zoom out of CURRENT DSO", to allow
      going back to the more compreensive view, not filtered by DSO.
      
      Future similar operations will include zooming into a particular thread,
      COMM, CPU, "last minute", "last N usecs", etc.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      83753190
  5. 03 4月, 2010 23 次提交
  6. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  7. 26 3月, 2010 5 次提交