• T
    perf trace record: handle commands correctly · 34c86ea9
    Tom Zanussi 提交于
    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: NTom Zanussi <tom.zanussi@linux.intel.com>
    Acked-by: NArnaldo Carvalho de Melo <acme@ghostprotocols.net>
    34c86ea9
builtin-trace.c 16.2 KB