1. 11 12月, 2013 11 次提交
  2. 10 12月, 2013 16 次提交
  3. 09 12月, 2013 1 次提交
  4. 06 12月, 2013 1 次提交
    • S
      tools lib traceevent: Report better error message on bad function args · 3a3ffa2e
      Steven Rostedt 提交于
      When Jiri Olsa was writing a function callback for
      scsi_trace_parse_cdb(), he thought that the traceevent library had a
      bug in it because he was getting this error:
      
        Error: expected ')' but read ','
        Error: expected ')' but read ','
        Error: expected ')' but read ','
        Error: expected ')' but read ','
      
      But in truth, he didn't have the write number of arguments for the
      function callback, and the error was the library detecting the
      discrepancy. A better error message would have prevented the confusion:
      
        Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_timeout has more
        Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_start has more
        Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_error has more
        Error: function 'scsi_trace_parse_cdb()' only expects 2 arguments but event scsi_dispatch_cmd_done has more
      
      Or
      
        Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_timeout only uses 3
        Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_start only uses 3
        Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_error only uses 3
        Error: function 'scsi_trace_parse_cdb()' expects 4 arguments but event scsi_dispatch_cmd_done only uses 3
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/n/tip-a4c34w62vl0diitvxb7bt3er@git.kernel.orgSigned-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3a3ffa2e
  5. 05 12月, 2013 11 次提交
    • D
      perf trace: Fix summary percentage when processing files · 3160565f
      David Ahern 提交于
      Getting a divide by 0 when events are processed from a file:
      
         perf trace -i perf.data -s
         ...
         dnsmasq (1684), 10 events, inf%, 0.000 msec
      
      The problem is that the event count is not incremented as events are
      processed. With this patch:
      
         perf trace -i perf.data -s
         ...
         dnsmasq (1684), 10 events, 8.9%, 0.000 msec
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/1386211302-31303-4-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3160565f
    • D
      perf trace: Add support for syscalls vs raw_syscalls · 9aca7f17
      David Ahern 提交于
      Older kernels (e.g., RHEL6) do system call tracing via
      syscalls:sys_{enter,exit} rather than raw_syscalls. Update perf-trace to
      detect lack of raw_syscalls support and try syscalls.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/1386211302-31303-2-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9aca7f17
    • J
      tools lib traceevent: Update kvm plugin with is_writable_pte helper · 6d65894b
      Jiri Olsa 提交于
      Adding is_writable_pte print helper function, so the
      kvmmmu:fast_page_fault print format gets resolved properly.
      
      The diff of 'perf script' output generated by old and new code:
      (data was generated by 'perf record -e 'kvm:*,kvmmmu:*' -a')
      
        --- script.kvm.old
        +++ script.kvm.new
        - qemu-system-x86  3290 [002] 10708.755312: kvmmmu:fast_page_fault: [FAILED TO PARSE] vcpu_id=0 gva=4094486080 error_code=3 sptep=0xffff88019f1e3670 old_spte=336391285 new_spte=336391287 retry=1
        + qemu-system-x86  3290 [002] 10708.755312: kvmmmu:fast_page_fault: vcpu 0 gva f40ce640 error_code P|W sptep 0xffff88019f1e3670 old 0x140cec75 new 140cec77 spurious 0 fixed 1
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-28-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6d65894b
    • J
      tools lib traceevent: Remove malloc_or_die from plugin_function.c · d8e56c98
      Jiri Olsa 提交于
      Removing malloc_or_die calls from plugin_function.c, replacing them and
      factoring the code with standard realloc and error path.
      Suggested-by: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-27-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d8e56c98
    • J
      tools lib traceevent: Several cleanups for function plugin · 39956e78
      Jiri Olsa 提交于
      Several cleanups suggested by Namhyung:
      
        * Remove index field from struct func_stack as it's not needed.
      
        * Rename get_index into add_and_get_index.
      
        * Use '%*X' format string capability instead of the loop
      Suggested-by: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-26-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      39956e78
    • J
      tools lib traceevent: Use pevent_print_func_field in hrtimer_start handler · b32cea65
      Jiri Olsa 提交于
      The pevent_print_func_field function encompasses all the functionality
      used in the hrtimer_start handler. Change the handler to use this
      function.
      
      This also unifies the function field output with the
      hrtimer_expire_entry handler.
      Suggested-by: NSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-25-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b32cea65
    • J
      tools lib traceevent: Use static functions in jbd2 plugin · f04015ec
      Jiri Olsa 提交于
      There's no need for following functions to be global:
      
        process_jbd2_dev_to_name
        process_jiffies_to_msecs
      
      Make them static.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-24-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f04015ec
    • J
      tools lib traceevent: Remove malloc_or_die from event-plugin.c · f9bb36af
      Jiri Olsa 提交于
      Removing malloc_or_die calls from event-plugin.c,
      replacing them with standard malloc and error path.
      Suggested-by: NNamhyung Kim <namhyung@kernel.org>
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-23-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f9bb36af
    • J
      tools lib traceevent: Add cfg80211 plugin · 94371473
      Jiri Olsa 提交于
      Adding cfg80211 plugin.
      
      This plugin adds handler for __le16_to_cpup function
      t properly parse following tracepoint events:
        cfg80211:cfg80211_tx_mlme_mgmt
        cfg80211:cfg80211_rx_mlme_mgmt
        cfg80211:cfg80211_rx_unprot_mlme_mgmt
      
      The diff of 'perf script' output generated by old and new code:
      (data was generated by 'perf record -e 'cfg80211:*' -a')
      
        --- script.cfg80211.old
        +++ script.cfg80211.new
        -        ifconfig  2705 [003]   662.896560: cfg80211:cfg80211_tx_mlme_mgmt: [FAILED TO PARSE] name=wlan0 ifindex=3 frame=ARRAY[c0, 00, 00, 00, 00, 3a, 98, a0, 30, 51, 10, 0b, a9, c6, f4, 74, 00, 3a, 98, a0, 30, 51, 00, 00, 03, 00]
        +        ifconfig  2705 [003]   662.896560: cfg80211:cfg80211_tx_mlme_mgmt: netdev:wlan0(3), ftype:0xc0
        -   kworker/u16:0  1697 [002]   664.808210: cfg80211:cfg80211_rx_mlme_mgmt: [FAILED TO PARSE] name=wlan0 ifindex=3 frame=ARRAY[b0, 00, da, 00, 10, 0b, a9, c6, f4, 74, d8, 24, bd, a1, 26, 31, d8, 24, bd, a1, 26, 31, 10, b7, 00, 00, 02, 00, 00, 00]
        +   kworker/u16:0  1697 [002]   664.808210: cfg80211:cfg80211_rx_mlme_mgmt: netdev:wlan0(3), ftype:0xb0
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.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>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1386076182-14484-22-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      94371473
    • J
      tools lib traceevent: Add scsi plugin · 04010929
      Jiri Olsa 提交于
      Adding scsi plugin.
      
      This plugin adds fields resolving functions for following tracepoint
      events:
      
        scsi:scsi_dispatch_cmd_start
        scsi:scsi_dispatch_cmd_error
        scsi:scsi_dispatch_cmd_done
        scsi:scsi_dispatch_cmd_timeout
      
      The diff of 'perf script' output generated by old and new code:
      (data was generated by 'perf record -e 'scsi:scsi_dispatch_cmd*' -a)
      
        -         swapper     0 [000]  6620.491019: scsi:scsi_dispatch_cmd_done: [FAILED TO PARSE] host_no=0 channel=0 id=0 lun=0 result=0 opcode=53 cmd_len=10 data_sglen=0 prot_sglen=0 prot_op=0 cmnd=5
        +         swapper     0 [000]  6620.491019: scsi:scsi_dispatch_cmd_done: host_no=0 channel=0 id=0 lun=0 data_sgl=0 prot_sgl=0 prot_op=SCSI_PROT_NORMAL cmnd=(SYNCHRONIZE_CACHE - raw=35 00 00 00 00 00 00 00 00 00) result=(driver=DRIVER_OK host=DID_OK message=COMMAND_COMPLETE status=SAM_STAT_GOOD)
        -     kworker/0:0 21554 [000]  6620.491126: scsi:scsi_dispatch_cmd_start: [FAILED TO PARSE] host_no=0 channel=0 id=0 lun=0 opcode=42 cmd_len=10 data_sglen=1 prot_sglen=0 prot_op=0 cmnd=*
        +     kworker/0:0 21554 [000]  6620.491126: scsi:scsi_dispatch_cmd_start: host_no=0 channel=0 id=0 lun=0 data_sgl=1 prot_sgl=0 prot_op=SCSI_PROT_NORMAL cmnd=(WRITE_10 lba=570899168 txlen=8 protect=0 raw=2a 00 22 07 3a e0 00 00 08 00)
        -     jbd2/dm-3-8   593 [002]  6621.607992: scsi:scsi_dispatch_cmd_error: [FAILED TO PARSE] host_no=0 channel=0 id=0 lun=0 rtn=4182 opcode=53 cmd_len=10 data_sglen=0 prot_sglen=0 prot_op=0 cmnd=5
        +     jbd2/dm-3-8   593 [002]  6621.607992: scsi:scsi_dispatch_cmd_error: host_no=0 channel=0 id=0 lun=0 data_sgl=0 prot_sgl=0 prot_op=SCSI_PROT_NORMAL cmnd=(SYNCHRONIZE_CACHE - raw=35 00 00 00 00 00 00 00 00 00) rtn=4182
      
      NOTE I couldn't generate scsi_dispatch_cmd_timeout tracepoint,
           but it's similar to the rest, so I believe it's ok.
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Martin K. Petersen <martin.petersen@oracle.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      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/1386076182-14484-21-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      04010929
    • J
      tools lib traceevent: Add xen plugin · 40c03ad5
      Jiri Olsa 提交于
      Adding xen plugin.
      
      This plugin adds fields resolving for following tracepoint events:
      
        xen:xen_mc_entry
        xen:xen_mc_extend_args
      
      The diff of 'perf script' output generated by old and new code: (data
      was generated by 'perf record -e 'xen:*' ls')
      
        --- script.xen.old
        +++ script.xen.new
        -         swapper     0 [002]   136.267492: xen:xen_mc_entry: [FAILED TO PARSE] op=3 nargs=2 args=ARRAY[18, 00, 00, 00, 00, 00, 00, 00, 00, e0, d4, 4b, 04, 88, ff, ff, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00]
        +         swapper     0 [002]   136.267492: xen:xen_mc_entry: op 3(stack_switch) args [18, 0, 0, 0, 0, 0]
        -            perf  1970 [008]   136.273319: xen:xen_mc_extend_args: [FAILED TO PARSE] op=1 args=16 res=1
        +            perf  1970 [008]   136.273319: xen:xen_mc_extend_args: extending op 1(mmu_update) by 16 bytes res ???
      
      NOTE We still do not handle the 'sizeof' and fail to parse following xen
      tracepoints:
      
        xen:xen_mmu_set_pte
        xen:xen_mmu_set_pte_atomic
        xen:xen_mmu_set_domain_pte
        xen:xen_mmu_set_pte_at
        xen:xen_mmu_set_pmd
        xen:xen_mmu_set_pud
        xen:xen_mmu_set_pgd
        xen:xen_mmu_ptep_modify_prot_start
        xen:xen_mmu_ptep_modify_prot_commit
      Signed-off-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      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/1386076182-14484-20-git-send-email-jolsa@redhat.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      40c03ad5