1. 15 Apr, 2016 4 commits
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Make --(min,max}-stack imply "--call-graph dwarf" · 05614993
      Arnaldo Carvalho de Melo authored
      If one uses:
      
        # perf trace --min-stack 16
      
      Then it implicitly means that callgraphs should be enabled, and the best
      option in terms of widespread availability is "dwarf".
      
      Further work needed to choose a better alternative, LBR, in capable
      systems.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-xtjmnpkyk42npekxz3kynzmx@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      05614993
    • Arnaldo Carvalho de Melo's avatar
      perf record: Export record_opts based callchain parsing helper · 0883e820
      Arnaldo Carvalho de Melo authored
      To be able to call it outside option parsing, like when setting a
      default --call-graph parameter in 'perf trace' when just --min-stack is
      used.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-xay69plylwibpb3l4isrpl1k@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0883e820
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Introduce --min-stack filter · 5cf9c84e
      Arnaldo Carvalho de Melo authored
      Counterpart to --max-stack, to help focusing on deeply nested calls. Can
      be combined with --duration, etc.
      
      E.g.:
      
        System wide syscall tracing looking for call stacks longer than 66:
      
        # trace --mmap-pages 32768 --filter-pid 2711 --call-graph dwarf,16384 --min-stack 66
      
        Or more compactly:
      
        # trace -m 32768 --filt 2711 --call dwarf,16384 --min-st 66
         363.027 ( 0.002 ms): gnome-shell/2287 poll(ufds: 0x7ffc5ea24230, nfds: 1, timeout_msecs: 4294967295         ) = 1
                                             [0xf6fdd] (/usr/lib64/libc-2.22.so)
                                             _xcb_conn_wait+0x92 (/usr/lib64/libxcb.so.1.1.0)
                                             _xcb_out_send+0x4d (/usr/lib64/libxcb.so.1.1.0)
                                             xcb_writev+0x45 (/usr/lib64/libxcb.so.1.1.0)
                                             _XSend+0x19e (/usr/lib64/libX11.so.6.3.0)
                                             _XReply+0x82 (/usr/lib64/libX11.so.6.3.0)
                                             XSync+0x4d (/usr/lib64/libX11.so.6.3.0)
                                             dri3_bind_tex_image+0x42 (/usr/lib64/libGL.so.1.2.0)
                                             _cogl_winsys_texture_pixmap_x11_update+0x117 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_texture_pixmap_x11_update+0x67 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_texture_pixmap_x11_pre_paint+0x13 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_pipeline_layer_pre_paint+0x5e (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_rectangles_validate_layer_cb+0x1b (/usr/lib64/libcogl.so.20.4.1)
                                             cogl_pipeline_foreach_layer+0xbe (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_framebuffer_draw_multitextured_rectangles+0x77 (/usr/lib64/libcogl.so.20.4.1)
                                             cogl_framebuffer_draw_multitextured_rectangle+0x51 (/usr/lib64/libcogl.so.20.4.1)
                                             paint_clipped_rectangle+0xb6 (/usr/lib64/libmutter.so.0.0.0)
                                             meta_shaped_texture_paint+0x3e3 (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_window_actor_paint+0x14b (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_window_group_paint+0x19f (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             [0x3d970] (/usr/lib64/gnome-shell/libgnome-shell.so)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_stage_paint+0x3a (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_stage_paint+0x45 (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0x164 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _clutter_stage_do_paint+0x17b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_stage_cogl_redraw+0x496 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _clutter_stage_do_update+0x117 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_clock_dispatch+0x169 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             g_main_context_dispatch+0x15a (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             g_main_context_iterate.isra.29+0x1e0 (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             g_main_loop_run+0xc2 (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             meta_run+0x2c (/usr/lib64/libmutter.so.0.0.0)
                                             main+0x3f7 (/usr/bin/gnome-shell)
                                             __libc_start_main+0xf0 (/usr/lib64/libc-2.22.so)
                                             [0x2909] (/usr/bin/gnome-shell)
         363.038 ( 0.006 ms): gnome-shell/2287 writev(fd: 5<socket:[32540]>, vec: 0x7ffc5ea243a0, vlen: 3            ) = 4
                                             __GI___writev+0x2d (/usr/lib64/libc-2.22.so)
                                             _xcb_conn_wait+0x359 (/usr/lib64/libxcb.so.1.1.0)
                                             _xcb_out_send+0x4d (/usr/lib64/libxcb.so.1.1.0)
                                             xcb_writev+0x45 (/usr/lib64/libxcb.so.1.1.0)
                                             _XSend+0x19e (/usr/lib64/libX11.so.6.3.0)
                                             _XReply+0x82 (/usr/lib64/libX11.so.6.3.0)
                                             XSync+0x4d (/usr/lib64/libX11.so.6.3.0)
                                             dri3_bind_tex_image+0x42 (/usr/lib64/libGL.so.1.2.0)
                                             _cogl_winsys_texture_pixmap_x11_update+0x117 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_texture_pixmap_x11_update+0x67 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_texture_pixmap_x11_pre_paint+0x13 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_pipeline_layer_pre_paint+0x5e (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_rectangles_validate_layer_cb+0x1b (/usr/lib64/libcogl.so.20.4.1)
                                             cogl_pipeline_foreach_layer+0xbe (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_framebuffer_draw_multitextured_rectangles+0x77 (/usr/lib64/libcogl.so.20.4.1)
                                             cogl_framebuffer_draw_multitextured_rectangle+0x51 (/usr/lib64/libcogl.so.20.4.1)
                                             paint_clipped_rectangle+0xb6 (/usr/lib64/libmutter.so.0.0.0)
                                             meta_shaped_texture_paint+0x3e3 (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_window_actor_paint+0x14b (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_window_group_paint+0x19f (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             [0x3d970] (/usr/lib64/gnome-shell/libgnome-shell.so)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_stage_paint+0x3a (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_stage_paint+0x45 (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0x164 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _clutter_stage_do_paint+0x17b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_stage_cogl_redraw+0x496 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _clutter_stage_do_update+0x117 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_clock_dispatch+0x169 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             g_main_context_dispatch+0x15a (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             g_main_context_iterate.isra.29+0x1e0 (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             g_main_loop_run+0xc2 (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             meta_run+0x2c (/usr/lib64/libmutter.so.0.0.0)
                                             main+0x3f7 (/usr/bin/gnome-shell)
                                             __libc_start_main+0xf0 (/usr/lib64/libc-2.22.so)
                                             [0x2909] (/usr/bin/gnome-shell)
         363.086 ( 0.042 ms): gnome-shell/2287 poll(ufds: 0x7ffc5ea24250, nfds: 1, timeout_msecs: 4294967295         ) = 1
                                             [0xf6fdd] (/usr/lib64/libc-2.22.so)
                                             _xcb_conn_wait+0x92 (/usr/lib64/libxcb.so.1.1.0)
                                             wait_for_reply+0xb7 (/usr/lib64/libxcb.so.1.1.0)
                                             xcb_wait_for_reply+0x61 (/usr/lib64/libxcb.so.1.1.0)
                                             _XReply+0x127 (/usr/lib64/libX11.so.6.3.0)
                                             XSync+0x4d (/usr/lib64/libX11.so.6.3.0)
                                             dri3_bind_tex_image+0x42 (/usr/lib64/libGL.so.1.2.0)
                                             _cogl_winsys_texture_pixmap_x11_update+0x117 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_texture_pixmap_x11_update+0x67 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_texture_pixmap_x11_pre_paint+0x13 (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_pipeline_layer_pre_paint+0x5e (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_rectangles_validate_layer_cb+0x1b (/usr/lib64/libcogl.so.20.4.1)
                                             cogl_pipeline_foreach_layer+0xbe (/usr/lib64/libcogl.so.20.4.1)
                                             _cogl_framebuffer_draw_multitextured_rectangles+0x77 (/usr/lib64/libcogl.so.20.4.1)
                                             cogl_framebuffer_draw_multitextured_rectangle+0x51 (/usr/lib64/libcogl.so.20.4.1)
                                             paint_clipped_rectangle+0xb6 (/usr/lib64/libmutter.so.0.0.0)
                                             meta_shaped_texture_paint+0x3e3 (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_window_actor_paint+0x14b (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_real_paint+0x20 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_window_group_paint+0x19f (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             [0x3d970] (/usr/lib64/gnome-shell/libgnome-shell.so)
                                             _g_closure_invoke_va+0xb2 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_stage_paint+0x3a (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             meta_stage_paint+0x45 (/usr/lib64/libmutter.so.0.0.0)
                                             _g_closure_invoke_va+0x164 (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit_valist+0xc0d (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             g_signal_emit+0x8f (/usr/lib64/libgobject-2.0.so.0.4600.2)
                                             clutter_actor_continue_paint+0x2bb (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_actor_paint.part.41+0x47b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _clutter_stage_do_paint+0x17b (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_stage_cogl_redraw+0x496 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             _clutter_stage_do_update+0x117 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             clutter_clock_dispatch+0x169 (/usr/lib64/libclutter-1.0.so.0.2400.2)
                                             g_main_context_dispatch+0x15a (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             g_main_context_iterate.isra.29+0x1e0 (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             g_main_loop_run+0xc2 (/usr/lib64/libglib-2.0.so.0.4600.2)
                                             meta_run+0x2c (/usr/lib64/libmutter.so.0.0.0)
                                             main+0x3f7 (/usr/bin/gnome-shell)
                                             __libc_start_main+0xf0 (/usr/lib64/libc-2.22.so)
                                             [0x2909] (/usr/bin/gnome-shell)
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-jncuxju9fibq2rl6olhqwjw6@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5cf9c84e
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Do not print interrupted syscalls when using --duration · e519bd9a
      Arnaldo Carvalho de Melo authored
      With multiple threads, e.g. a system wide trace session, and one syscall is
      midway in a thread and another thread starts another syscall we must print the
      start of the interrupted syscall followed by ..., but that can't be done that
      way when we use the --duration filter, as we have to wait for the syscall exit
      to calculate the duration and decide if it should be filtered, so we have to
      disable the interrupted logic and only print at syscall exit, duh.
      
      Before:
      
        # trace --duration 100
        <SNIP>
         9.248 (0.023 ms): gnome-shell/2287 poll(ufds: 0x7ffc5ea26580, nfds: 1, timeout_msecs: 4294967295) ...
         9.296 (0.001 ms): gnome-shell/2287 recvmsg(fd: 11<socket:[35818]>, msg: 0x7ffc5ea264a0          ) ...
         9.311 (0.008 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x8316a0                         ) ...
         9.859 (0.023 ms): gnome-shell/2287 poll(ufds: 0x7ffc5ea24250, nfds: 1, timeout_msecs: 4294967295) ...
         9.942 (0.051 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x8316a0                         ) ...
        10.467 (0.003 ms): gnome-shell/2287 poll(ufds: 0x55e623431220, nfds: 50, timeout_msecs: 4294967295) ...
        11.136 (0.382 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x8316a0                         ) ...
        11.223 (0.023 ms): SoftwareVsyncT/24369 futex(uaddr: 0x7f5ec5df8c14, op: WAIT_BITSET|PRIV, val: 1, utime: 0x7f5ec5df8b68, val3: 4294967295) ...
        16.865 (5.501 ms): firefox/24321 poll(ufds: 0x7f5ec388b460, nfds: 6, timeout_msecs: 4294967295   ) ...
        22.571 (0.006 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x8316a0                         ) ...
        26.793 (4.063 ms): gnome-shell/2287 poll(ufds: 0x55e623431220, nfds: 50, timeout_msecs: 4294967295) ...
        26.917 (0.080 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x8316a0                         ) ...
        27.291 (0.355 ms): qemu-system-x8/10065 ppoll(ufds: 0x55c98b39e400, nfds: 72, tsp: 0x7fffe4e4fe60, sigsetsize: 8) ...
        27.336 (0.012 ms): SoftwareVsyncT/24369 futex(uaddr: 0x7f5ec5df8c14, op: WAIT_BITSET|PRIV, val: 1, utime: 0x7f5ec5df8b68, val3: 4294967295) ...
        33.370 (5.958 ms): firefox/24321 poll(ufds: 0x7f5ec388b460, nfds: 6, timeout_msecs: 4294967295) ...
        33.866 (0.021 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x8316a0                      ) ...
        35.762 (1.611 ms): gnome-shell/2287 poll(ufds: 0x55e623431220, nfds: 50, timeout_msecs: 8     ) ...
        38.765 (2.910 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x8316a0                      ) ...
      
      After:
      
        # trace --duration 100
      
        238.292 (153.226 ms): hexchat/2786 poll(ufds: 0x559ea372f370, nfds: 6, timeout_msecs: 153) = 0 Timeout
        249.634 (199.433 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x7ffdcbb63610        ) = 1
        385.583 (147.257 ms): hexchat/2786 poll(ufds: 0x559ea372f370, nfds: 6, timeout_msecs: 147) = 0 Timeout
        397.166 (110.779 ms): gnome-shell/2287 poll(ufds: 0x55e623431220, nfds: 50, timeout_msecs: 4294967295) = 1
        601.839 (132.066 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x8316a0                          ) = 1
        602.445 (132.679 ms): gnome-shell/2287 poll(ufds: 0x55e623431220, nfds: 50, timeout_msecs: 4294967295) = 1
        686.122 (300.418 ms): hexchat/2786 poll(ufds: 0x559ea372f370, nfds: 6, timeout_msecs: 300) = 0 Timeout
        815.033 (184.641 ms): JS Helper/24352 futex(uaddr: 0x7f5ed98e584c, op: WAIT|PRIV, val: 1149859) = 0
        825.868 (195.469 ms): JS Helper/24351 futex(uaddr: 0x7f5ed98e584c, op: WAIT|PRIV, val: 1149860) = 0
        840.738 (210.335 ms): JS Helper/24350 futex(uaddr: 0x7f5ed98e584c, op: WAIT|PRIV, val: 1149861) = 0
        914.898 (158.692 ms): Compositor/24363 futex(uaddr: 0x7f5ec8dfebf4, op: WAIT|PRIV, val: 1) = 0
        915.199 (100.747 ms): Timer/24358 futex(uaddr: 0x7f5ed98e56cc, op: WAIT_BITSET|PRIV|CLKRT, val: 2545397, utime: 0x7f5ecdbfec30, val3: 4294967295) = 0
        986.639 (247.325 ms): hexchat/2786 poll(ufds: 0x559ea372f370, nfds: 6, timeout_msecs: 247) = 0 Timeout
        996.239 (500.591 ms): chrome/16237 poll(ufds: 0x3ecd739bd0, nfds: 5, timeout_msecs: 500) = 0 Timeout
       1042.890 (120.076 ms): Timer/24358 futex(uaddr: 0x7f5ed98e56cc, op: WAIT_BITSET|PRIV|CLKRT, val: 2545403, utime: 0x7f5ecdbfec30, val3: 4294967295) = -1 ETIMEDOUT Connection timed out
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Milian Wolff <milian.wolff@kdab.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: http://lkml.kernel.org/n/tip-d2nay6kjax5ro991c9kelvi5@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e519bd9a
  2. 14 Apr, 2016 21 commits
  3. 13 Apr, 2016 15 commits