1. 19 Apr, 2016 5 commits
    • Arnaldo Carvalho de Melo's avatar
      perf test: Ignore kcore files in the "vmlinux matches kallsyms" test · 53d0fe68
      Arnaldo Carvalho de Melo authored
      Before:
      
        # perf test -v kallsyms
      <SNIP>
        Maps only in vmlinux:
         ffffffff81d5e000-ffffffff81ec3ac8 115e000 [kernel].init.text
         ffffffff81ec3ac8-ffffffffa0000000 12c3ac8 [kernel].exit.text
         ffffffffa0000000-ffffffffa000c000 0 [fjes]
         ffffffffa000c000-ffffffffa0017000 0 [video]
         ffffffffa0017000-ffffffffa001c000 0 [grace]
      <SNIP>
         ffffffffa0a7f000-ffffffffa0ba5000 0 [xfs]
         ffffffffa0ba5000-ffffffffffffffff 0 [veth]
        Maps in vmlinux with a different name in kallsyms:
        Maps only in kallsyms:
         ffff880000100000-ffff88001000b000 80000103000 [kernel.kallsyms]
         ffff88001000b000-ffff880100000000 8001000e000 [kernel.kallsyms]
         ffff880100000000-ffffc90000000000 80100003000 [kernel.kallsyms]
      <SNIP>
         ffffffffa0000000-ffffffffff600000 7fffa0003000 [kernel.kallsyms]
         ffffffffff600000-ffffffffffffffff 7fffff603000 [kernel.kallsyms]
        test child finished with -1
        ---- end ----
        vmlinux symtab matches kallsyms: FAILED!
        #
      
      After:
      
        # perf test -v 1
         1: vmlinux symtab matches kallsyms                          :
        --- start ---
        test child forked, pid 7058
        Looking at the vmlinux_path (8 entries long)
        Using /lib/modules/4.6.0-rc1+/build/vmlinux for symbols
        0xffffffff81076870: diff end addr for aesni_gcm_dec v: 0xffffffff810791f2 k: 0xffffffff81076902
        0xffffffff81079200: diff end addr for aesni_gcm_enc v: 0xffffffff8107bb03 k: 0xffffffff81079292
        0xffffffff8107e8d0: diff end addr for aesni_gcm_enc_avx_gen2 v: 0xffffffff81083e76 k: 0xffffffff8107e943
        0xffffffff81083e80: diff end addr for aesni_gcm_dec_avx_gen2 v: 0xffffffff81089611 k: 0xffffffff81083ef3
        0xffffffff81089990: diff end addr for aesni_gcm_enc_avx_gen4 v: 0xffffffff8108e7c4 k: 0xffffffff81089a03
        0xffffffff8108e7d0: diff end addr for aesni_gcm_dec_avx_gen4 v: 0xffffffff810937ef k: 0xffffffff8108e843
        Maps only in vmlinux:
         ffffffff81d5e000-ffffffff81ec3ac8 115e000 [kernel].init.text
         ffffffff81ec3ac8-ffffffffa0000000 12c3ac8 [kernel].exit.text
        Maps in vmlinux with a different name in kallsyms:
        Maps only in kallsyms:
        test child finished with -1
        ---- end ----
       vmlinux symtab matches kallsyms: FAILED!
        #
      
      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>
      Fixes: 8e0cf965 ("perf symbols: Add support for reading from /proc/kcore")
      Link: http://lkml.kernel.org/n/tip-n6vrwt9t89w8k769y349govx@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      53d0fe68
    • Arnaldo Carvalho de Melo's avatar
      perf symbols: Allow loading kallsyms without considering kcore files · e02092b9
      Arnaldo Carvalho de Melo authored
      Before the support for using /proc/kcore was introduced, the kallsyms
      routines used /proc/modules and the first 'perf test' entry expected
      finding maps for each module in the system, which is not the case with
      the kcore code. Provide a way to ignore kcore files so that the test can
      have its expectations met.
      
      Improving the test to cover kcore files as well needs to be done.
      
      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-ek5urnu103dlhfk4l6pcw041@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e02092b9
    • Arnaldo Carvalho de Melo's avatar
      perf build: Remove x86 references from arch-neutral Build · 2cc46669
      Arnaldo Carvalho de Melo authored
      It will already be dealt with generating the syscalltbl.c file in the
      x86 arch specific Build files, namely via 'archheaders'.
      
      This fixes the build on !x86 arches, as reported for powerpcle
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Tested-by: default avatarJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Wang Nan <wangnan0@huawei.com>
      Fixes: 1b700c99 ("perf tools: Build syscall table .c header from kernel's syscall_64.tbl")
      Link: http://lkml.kernel.org/r/20160415212831.GT9056@kernel.org
      [ Removed the syscalltbl.o altogether, as per Jiri's suggestion ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      2cc46669
    • Colin Ian King's avatar
      perf jit: memset() variable 'st' using the correct size · f56ebf20
      Colin Ian King authored
      The current code is memsetting the 'struct stat' variable 'st' with the size of
      'stat' (which turns out to be 1 byte) rather than the size of variable 'sz'.
      
      Committer notes:
      
      sizeof(function) isn't valid, the result depends on the compiler used, with
      gcc, enabling pedantic warnings we get:
      
        $ cat sizeof_function.c
        #include <sys/types.h>
        #include <sys/stat.h>
        #include <unistd.h>
        #include <stdio.h>
      
        int main(void)
        {
      	  printf("sizeof(stat)=%zd, stat=%p\n", sizeof(stat), stat);
      	  return 0;
        }
        $ readelf -sW sizeof_function | grep -w stat
            49: 0000000000400630    16 FUNC    WEAK   HIDDEN    13 stat
        $ cc -pedantic sizeof_function.c   -o sizeof_function
        sizeof_function.c: In function ‘main’:
        sizeof_function.c:8:46: warning: invalid application of ‘sizeof’ to a function type [-Wpointer-arith]
          printf("sizeof(stat)=%zd, stat=%p\n", sizeof(stat), stat);
                                                    ^
        $ ./sizeof_function
        sizeof(stat)=1, stat=0x400630
        $
      
        Standard C, section 6.5.3.4:
      
        "The sizeof operator shall not be applied to an expression that has function
         type or an incomplete type, to the parenthesized name of such a type,
         or to an expression that designates a bit-field member."
      
        http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdfSigned-off-by: default avatarColin Ian King <colin.king@canonical.com>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Fixes: 9b07e27f ("perf inject: Add jitdump mmap injection support")
      Link: http://lkml.kernel.org/r/1461020838-9260-1-git-send-email-colin.king@canonical.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f56ebf20
    • Chris Phlipot's avatar
      perf script: Fix postgresql ubuntu install instructions · d6632dd5
      Chris Phlipot authored
      The current instructions for setting up an Ubuntu system for using the
      export-to-postgresql.py script are incorrect.
      
      The instructions in the script have been updated to work on newer
      versions of ubuntu.
      
      -Add missing dependencies to apt-get command:
          python-pyside.qtsql, libqt4-sql-psql
      -Add '-s' option to createuser command to force the user to be a
          superuser since the command doesn't prompt as indicated in the
          current instructions.
      
      Tested on: Ubuntu 14.04, Ubuntu 16.04(beta)
      Signed-off-by: default avatarChris Phlipot <cphlipot0@gmail.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1461056164-14914-3-git-send-email-cphlipot0@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d6632dd5
  2. 18 Apr, 2016 7 commits
  3. 16 Apr, 2016 2 commits
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Fix build when DWARF unwind isn't available · ccd62a89
      Arnaldo Carvalho de Melo authored
      The variable is initialized and then conditionally set to a different
      value, but not used when DWARF unwinding is not available, bummer, write
      1000 times: "Run make -C tools/perf build-test"...
      
        builtin-trace.c: In function ‘cmd_trace’:
        builtin-trace.c:3112:6: error: variable ‘max_stack_user_set’ set but not
        used [-Werror=unused-but-set-variable]
          bool max_stack_user_set = true;
              ^
        cc1: all warnings being treated as err
      
      Fix it by marking it as __maybe_unused.
      
      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>
      Fixes: 05614993 ("perf trace: Make --(min,max}-stack imply "--call-graph dwarf"")
      Link: http://lkml.kernel.org/n/tip-85r40c5hhv6jnmph77l1hgsr@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      ccd62a89
    • Ingo Molnar's avatar
      Merge tag 'perf-core-for-mingo-20160415' of... · 9243ae5b
      Ingo Molnar authored
      Merge tag 'perf-core-for-mingo-20160415' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements from Arnaldo Carvalho de Melo:
      
      User visible changes:
      
      - Wire the callchain unwinding "max-stack" now to 'perf script --max-stack',
        allowing to limit the depth of callchains, possibly reducing processing
        time (Arnaldo Carvalho de Melo)
      
      - Ditto for 'perf trace --max-stack' (Arnaldo Carvalho de Melo)
      
      - Introduce a --min-stack filter for 'perf trace', to show syscalls that
        had a userspace callchain leading to it at least min-stack deep (Arnaldo Carvalho de Melo)
      
      - Make 'perf trace' work with multiple threads and the --duration filter,
        i.e. do not print the start of an interrupted syscall followed by ...
        to print interrupts from other threads, as we need to wait the sys_exit
        syscall tracepoint to calculate the duration, duh. (Arnaldo Carvalho de Melo)
      
        System wide --duration now works as expected:
      
         [root@jouet ~]# trace --duration 100
           152.393 (145.147 ms): Timer/24358 futex(uaddr: 0x7f5ed98e56cc, op: WAIT_BITSET|PRIV|CLKRT, val: 7055125, utime: 0x7f5ecdbfec30, val3: 4294967295) = -1 ETIMEDOUT Connection timed out
           152.438 (145.040 ms): firefox/24321 poll(ufds: 0x7f5ec388b460, nfds: 6, timeout_msecs: 4294967295) = 1
           358.580 (158.279 ms): Xorg/2025 select(n: 512, inp: 0x83a8e0, tvp: 0x7ffdcbb63610) = 0 Timeout
           358.687 (148.285 ms): gnome-terminal/2711 poll(ufds: 0x55b7e6811ad0, nfds: 15, timeout_msecs: 249) = 1
           370.150 (169.569 ms): gnome-shell/2287 poll(ufds: 0x55e623d65490, nfds: 86, timeout_msecs: 4294967295) = 1
      
      - Now 'perf trace's --max-stack and --min-stack will automatically set
        "--call-graph dwarf", if --call-graph is not present on the command line:
      
         [root@jouet ~]# perf trace -e nanosleep --max-stack 3 usleep 1
           0.299 ( 0.057 ms): usleep/29658 nanosleep(rqtp: 0x7fff80f3b230) = 0
                                             __nanosleep+0x10 (/usr/lib64/libc-2.22.so)
                                             usleep+0x34 (/usr/lib64/libc-2.22.so)
                                             main+0x1eb (/usr/bin/usleep)
         [root@jouet ~]#
      
      - Bump 'perf trace --mmap-pages' for root when using callchains and not
        specifying --mmap-pages explicitely (Arnaldo Carvalho de Melo)
      
      Build fixes:
      
      - The python binding object had missing symbols, to some refactoring
        to fix that (Arnaldo Carvalho de Melo)
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      9243ae5b
  4. 15 Apr, 2016 6 commits
    • Arnaldo Carvalho de Melo's avatar
      perf trace: Bump --mmap-pages when --call-graph is used by the root user · f3e459d1
      Arnaldo Carvalho de Melo authored
      To reduce the chances we'll overflow the mmap buffer, manual fine tuning
      trumps this.
      
      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-wxygbxmp1v9mng1ea28wet02@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f3e459d1
    • Arnaldo Carvalho de Melo's avatar
      perf evlist: Expose perf_event_mlock_kb_in_pages() helper · f5e7150c
      Arnaldo Carvalho de Melo authored
      When the user doesn't set --mmap-pages, perf_evlist__mmap() will do it
      by reading the maximum possible for a non-root user from the
      /proc/sys/kernel/perf_event_mlock_kb file.
      
      Expose that function so that 'perf trace' can, for root users, to bump
      mmap-pages to a higher value for root, based on the contents of this
      proc file.
      
      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-xay69plylwibpb3l4isrpl1k@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      f5e7150c
    • 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
  5. 14 Apr, 2016 20 commits