1. 10 Nov, 2010 8 commits
    • Tom Zanussi's avatar
      perf trace: update Documentation with new perf trace variants · d3c4f798
      Tom Zanussi authored
      Add documentation describing new 'perf trace' command changes
      e.g. <command> handling and live-mode/top variants.
      Signed-off-by: default avatarTom Zanussi <tom.zanussi@linux.intel.com>
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      d3c4f798
    • Tom Zanussi's avatar
      perf trace: live-mode command-line cleanup · b5b87312
      Tom Zanussi authored
      This patch attempts to make the perf trace command-line for live-mode
      commands more user-friendly and consistent with other perf commands.
      
      The main change it makes is to allow <commands> to be run as part of
      perf trace live-mode commands, as other perf commands do, instead of
      the system-wide traces they're currently hard-coded to by the shell
      scripts.
      
      With this patch, the following live-mode trace now works as expected:
      
       $ perf trace rw-by-pid ls -al
      
      The previous system-wide behavior for this command would still be
      available by explicitly specifying -a:
      
       $ perf trace rw-by-pid -a ls -al
      
      and if no <command> is specified, the output is also system-wide:
      
       $ perf trace rw-by-pid
      
      Because live-mode requires both record and report steps to be invoked,
      it isn't always possible to know which args to send to the report and
      which to send to the record steps - mainly this is the case for report
      scripts with optional args - in those cases it would be necessary to
      use separate 'perf trace record' and 'perf trace report' steps.
      
      For example:
      
       $ perf trace syscall-counts ls
      
      Here we can't decide whether ls should be passed as a param to the
      syscall-counts script or whether we should invoke ls as a <command>.
      In these cases, we just say that we'll ignore optional script params
      and always interpret the extra arguments as a <command>.
      
      If the user instead wants the other interpretation, that can be
      accomplished by using separate record and report commands explicitly:
      
       $ perf trace record syscall-counts
       $ perf trace report syscall-counts ls
      
      So the rules that this patch implements, which seem to make the most
      intuitive sense for live-mode commands:
      
      - for commands with optional args and commands with no args, no args
        are sent to the report script, all are sent to the record step
      
      - for 'top' commands i.e. that end with 'top', <commands> can't be
        used - all extra args are send to the report script as params
      
      - for commands with required args, the n required args are taken to be
        the first n args after the script name and sent to the report
        script, and the rest are sent to the record step
      Signed-off-by: default avatarTom Zanussi <tom.zanussi@linux.intel.com>
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      b5b87312
    • Tom Zanussi's avatar
      perf trace record: handle commands correctly · 34c86ea9
      Tom Zanussi authored
      Because the perf-trace shell scripts hard-coded the use of the
      perf-record system-wide param, a perf trace record session was always
      system wide, even if it was given a command.
      
      If given a command, perf trace record now only records the events for
      the command, as users expect.
      
      If no command is given, or if the '-a' option is used, the recorded
      events are system-wide, as before.
      
      root@tropicana:~# perf trace record syscall-counts ls -al
      root@tropicana:~# perf trace
                    ls-23152 [000] 39984.890387: sys_enter: NR 12 (0, 0, 0, 0, 0, 0)
                    ls-23152 [000] 39984.890404: sys_enter: NR 9 (0, 0, 0, 0, 0, 0)
      
      root@tropicana:~# perf trace record syscall-counts -a ls -al
      root@tropicana:~# perf trace
          npviewer.bin-22297 [000] 39831.102709: sys_enter: NR 168 (0, 0, 0, 0, 0, 0)
                    ls-23111 [000] 39831.107679: sys_enter: NR 59 (0, 0, 0, 0, 0, 0)
      Signed-off-by: default avatarTom Zanussi <tom.zanussi@linux.intel.com>
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      34c86ea9
    • Tom Zanussi's avatar
      perf record: make the record options available outside perf record · bca647aa
      Tom Zanussi authored
      Other perf commands that invoke perf record, such as perf trace, may
      want to reuse the options used by perf record.
      
      This makes them non-static and renames them to avoid clashes with
      other 'options' variables.
      Signed-off-by: default avatarTom Zanussi <tom.zanussi@linux.intel.com>
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      bca647aa
    • Tom Zanussi's avatar
      perf trace scripting: remove system-wide param from shell scripts · b0b6d914
      Tom Zanussi authored
      Including -a unconditionally when recording doesn't allow for the
      option of running scripts without it.  Future patches will add add it
      back if needed at run-time.
      Signed-off-by: default avatarTom Zanussi <tom.zanussi@linux.intel.com>
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      b0b6d914
    • Tom Zanussi's avatar
      perf trace scripting: fix some small memory leaks and missing error checks · e8719adf
      Tom Zanussi authored
      Free the other two fields of script_desc which somehow got overlooked,
      free malloc'ed args in case exec fails, and add missing checks for
      failed mallocs.
      Signed-off-by: default avatarTom Zanussi <tom.zanussi@linux.intel.com>
      Acked-by: default avatarArnaldo Carvalho de Melo <acme@ghostprotocols.net>
      e8719adf
    • Corey Ashford's avatar
      perf: Fix usages of profile_cpu in builtin-top.c to use cpu_list · 01797c59
      Corey Ashford authored
      profile_cpu was left over from an earlier implementation that
      supported running perf top on a single CPU.  profile_cpu was no
      longer set by any switch and usages of it resulted in dead code.
      
      Instead, convert the code to use cpu_list, which is set by the
      -C <cpu_list> option.
      
      Also improved the printing of nr_cpus and cpu_list by correcting
      the plurals.
      Signed-off-by: default avatarCorey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: a.p.zijlstra@chello.nl
      Cc: acme@redhat.com
      LKML-Reference: <1289269245-9388-1-git-send-email-cjashfor@linux.vnet.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      01797c59
    • Cyrill Gorcunov's avatar
      perf, ui: Eliminate stack-smashing protection compiler complaint · a3da8e45
      Cyrill Gorcunov authored
      The gcc complains about small auto-var strings being allocated from stack space.
      Make them const to avoid this:
      
       | CC util/ui/util.o
       | cc1: warnings being treated as errors
       | util/ui/util.c: In function ‘ui__dialog_yesno’:
       | util/ui/util.c:108: error: not protecting function: no buffer at least 8 bytes long
       | make: *** [util/ui/util.o] Error 1
      
      The real bug is in the newtWinChoice() ABI - but that's an
      externality we cannot fix here, so we use this workaround.
      Signed-off-by: default avatarCyrill Gorcunov <gorcunov@openvz.org>
      Acked-by: default avatarFrédéric Weisbecker <fweisbec@gmail.com>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      LKML-Reference: <20101106084724.GA5956@lenovo>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      a3da8e45
  2. 09 Nov, 2010 5 commits
  3. 08 Nov, 2010 17 commits
  4. 06 Nov, 2010 7 commits
  5. 05 Nov, 2010 3 commits
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 · 4b4a2700
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (41 commits)
        inet_diag: Make sure we actually run the same bytecode we audited.
        netlink: Make nlmsg_find_attr take a const nlmsghdr*.
        fib: fib_result_assign() should not change fib refcounts
        netfilter: ip6_tables: fix information leak to userspace
        cls_cgroup: Fix crash on module unload
        memory corruption in X.25 facilities parsing
        net dst: fix percpu_counter list corruption and poison overwritten
        rds: Remove kfreed tcp conn from list
        rds: Lost locking in loop connection freeing
        de2104x: fix panic on load
        atl1 : fix panic on load
        netxen: remove unused firmware exports
        caif: Remove noisy printout when disconnecting caif socket
        caif: SPI-driver bugfix - incorrect padding.
        caif: Bugfix for socket priority, bindtodev and dbg channel.
        smsc911x: Set Ethernet EEPROM size to supported device's size
        ipv4: netfilter: ip_tables: fix information leak to userland
        ipv4: netfilter: arp_tables: fix information leak to userland
        cxgb4vf: remove call to stop TX queues at load time.
        cxgb4: remove call to stop TX queues at load time.
        ...
      4b4a2700
    • Linus Torvalds's avatar
      Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6 · f69fa764
      Linus Torvalds authored
      * 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
        firewire: ohci: fix race when reading count in AR descriptor
        firewire: ohci: avoid reallocation of AR buffers
        firewire: ohci: fix race in AR split packet handling
        firewire: ohci: fix buffer overflow in AR split packet handling
      f69fa764
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · 2e5c3672
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
        cifs: make cifs_set_oplock_level() take a cifsInodeInfo pointer
        cifs: dereferencing first then checking
        cifs: trivial comment fix: tlink_tree is now a rbtree
        [CIFS] Cleanup unused variable build warning
        cifs: convert tlink_tree to a rbtree
        cifs: store pointer to master tlink in superblock (try #2)
        cifs: trivial doc fix: note setlease implemented
        CIFS: Add cifs_set_oplock_level
        FS: cifs, remove unneeded NULL tests
      2e5c3672