1. 02 6月, 2009 3 次提交
    • P
      perf_counter: tools: Expand the COMM,MMAP event synthesizer · f70e87d7
      Peter Zijlstra 提交于
      Include code to pre-construct mappings based on /proc,
      on system wide recording.
      
      Fix the existing code to properly fill out ->pid and ->tid.
      
      The PID should be the Thread Group ID (PIDTYPE_PID of task->group_leader)
      The TID should be the Thread ID (PIDTYPE_PID of task)
      
      Furthermore, change the default sorting of report to comm,dso for a
      better quick overview.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f70e87d7
    • A
      perf_counter tools: Use hex2u64 in more places · a0055ae2
      Arnaldo Carvalho de Melo 提交于
      This has also a nice side effect, tools built on newer systems such as
      fedora 10 again work on systems with older versions of glibc:
      
      My workstation:
      
      [acme@doppio ~]$ rpm -q glibc.x86_64
      glibc-2.9-3.x86_64
      
      Test machine:
      
      [acme@emilia ~]$ rpm -q glibc.x86_64
      glibc-2.5-24
      
      Before:
      
      [acme@emilia ~]$ perf
      perf: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by perf)
      [acme@emilia ~]$ nm `which perf` | grep GLIBC_2\.7
                       U __isoc99_sscanf@@GLIBC_2.7
      [acme@emilia ~]$
      
      After:
      [acme@emilia ~]$ perf
      usage: perf [--version] [--help] COMMAND [ARGS]
      
      The most commonly used perf commands are:
         record   Run a command and record its profile into perf.data
         report   Read perf.data (created by perf record) and display the
      profile
         stat     Run a command and gather performance counter statistics
         top      Run a command and profile it
      
      See 'perf help COMMAND' for more information on a specific command.
      [acme@emilia ~]$ nm `which perf` | grep GLIBC_2\.7
      [acme@emilia ~]$
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20090601205019.GA7805@ghostprotocols.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      a0055ae2
    • M
      perf_counter tools: Guard against record damaging existing files · 229c4eed
      Mike Galbraith 提交于
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      229c4eed
  2. 29 5月, 2009 1 次提交
  3. 27 5月, 2009 3 次提交
    • M
      perf record: Fix the profiling of existing pid or whole box · ef65b2a0
      Mike Galbraith 提交于
      Perf record bails if no command argument is provided, so you can't use
      naked -a or -p to profile a running task or the whole box.
      
      Allow foreground profiling of an existing pid or the entire system.
      
      [ Impact: fix command option handling bug ]
      Signed-off-by: NMike Galbraith <efault@gmx.de>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      ef65b2a0
    • I
      perf_counter tools: Rename output.perf to perf.data · 23ac9cbe
      Ingo Molnar 提交于
      output.perf is only output to perf-record - it's input to
      perf-report. So change it to a more direction-neutral name.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      23ac9cbe
    • I
      perf_counter tools: Introduce stricter C code checking · 16f762a2
      Ingo Molnar 提交于
      Tighten up our C code requirements:
      
       - disallow warnings
       - disallow declarations-mixed-with-statements
       - require proper prototypes
       - require C99 (with gcc extensions)
      
      Fix up a ton of problems these measures unearth:
      
       - unused functions
       - needlessly global functions
       - missing prototypes
       - code mixed with declarations
      
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <20090526222155.GJ4424@ghostprotocols.net>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      16f762a2
  4. 26 5月, 2009 4 次提交
    • I
      perf stat: Convert to Git option parsing · 5242519b
      Ingo Molnar 提交于
      Remove getopt usage and use Git's much more advanced and more compact
      command option library.
      
      Extend the event parser library with the extensions that were in
      perf-stat before.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      5242519b
    • I
      perf_counter tools: Librarize event string parsing · 8ad8db37
      Ingo Molnar 提交于
      Extract the event string parser from builtin-record.c, and
      librarize it - to be reused in other commands.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      8ad8db37
    • I
      perf record: Convert to Git option parsing · 0e9b20b8
      Ingo Molnar 提交于
      Remove getopt usage and use Git's much more advanced and more compact
      command option library.
      
      Git's library (util/parse-options.[ch]) constructs help texts and
      error messages automatically, and has a number of other convenience
      features as well.
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      0e9b20b8
    • I
      perf record: Straighten out argv types · 69aa48ab
      Ingo Molnar 提交于
      [ Impact: cleanup ]
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      69aa48ab
  5. 24 5月, 2009 1 次提交
    • P
      perf_counter: Fix userspace build · 1a482f38
      Peter Zijlstra 提交于
      recent userspace (F11) seems to already include the
      linux/unistd.h bits which means we cannot include the version
      in the kernel sources due to the header guards being the same.
      
      Ensure we include the kernel version first.
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: John Kacur <jkacur@redhat.com>
      LKML-Reference: <20090523163012.739756497@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1a482f38
  6. 15 5月, 2009 1 次提交
  7. 06 5月, 2009 1 次提交
  8. 03 5月, 2009 1 次提交
  9. 02 5月, 2009 2 次提交
  10. 01 5月, 2009 1 次提交
  11. 20 4月, 2009 1 次提交
  12. 09 4月, 2009 1 次提交
    • P
      perf_counter: some simple userspace profiling · de9ac07b
      Peter Zijlstra 提交于
      # perf-record make -j4 kernel/
       # perf-report | tail -15
      
        0.39              cc1 [kernel] lock_acquired
        0.42              cc1 [kernel] lock_acquire
        0.51              cc1 [ user ] /lib64/libc-2.8.90.so: _int_free
        0.51               as [kernel] clear_page_c
        0.53              cc1 [ user ] /lib64/libc-2.8.90.so: memcpy
        0.56              cc1 [ user ] /lib64/libc-2.8.90.so: _IO_vfprintf
        0.63              cc1 [kernel] lock_release
        0.67              cc1 [ user ] /lib64/libc-2.8.90.so: strlen
        0.68              cc1 [kernel] debug_smp_processor_id
        1.38              cc1 [ user ] /lib64/libc-2.8.90.so: _int_malloc
        1.55              cc1 [ user ] /lib64/libc-2.8.90.so: memset
        1.77              cc1 [kernel] __lock_acquire
        1.88              cc1 [kernel] clear_page_c
        3.61               as [ user ] /usr/bin/as: <unknown>
       59.16              cc1 [ user ] /usr/libexec/gcc/x86_64-redhat-linux/4.3.2/cc1: <unknown>
      Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      LKML-Reference: <20090408130409.220518450@chello.nl>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      de9ac07b