1. 27 4月, 2016 1 次提交
  2. 26 4月, 2016 9 次提交
  3. 25 4月, 2016 6 次提交
    • A
      perf trace: Make --pf honour --min-stack too · 1df54290
      Arnaldo Carvalho de Melo 提交于
      To check deeply nested page fault callchains.
      
      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-wuji34xx003kr88nmqt6jkgf@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1df54290
    • A
      perf trace: Make --event honour --min-stack too · 7ad35615
      Arnaldo Carvalho de Melo 提交于
      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-shj0fazntmskhjild5i6x73l@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7ad35615
    • C
      perf script: Fix segfault when printing callchains · e557b674
      Chris Phlipot 提交于
      This fixes a bug caused by an unitialized callchain cursor. The crash
      frist appeared in:
      
      6f736735 ("perf evsel: Require that callchains be resolved before
      calling fprintf_{sym,callchain}")
      
      The callchain cursor is a struct that contains pointers, that when
      uninitialized will cause unpredictable behavior (usually a crash)
      when trying to append to the callchain.
      
      The existing implementation has the following issues:
      
      1. The callchain cursor used is not initialized, resulting in
      	unpredictable behavior when used.
      2. The cursor is declared on the stack. Even if it is properly initalized,
      	the implmentation will leak memory when the function returns,
      	since all the references to the callchain_nodes allocated by
      	callchain_cursor_append will be lost when the cursor goes out of
      	scope.
      3. Storing the cursor on the stack is inefficient. Even if memory is
      	properly freed when it goes out of scope, a performance penalty
      	will be incurred due to reallocation of callchain nodes.
      	callchain_cursor_append is designed to avoid these reallocations
      	when an existing cursor is reused.
      
      This patch fixes the crash by replacing cursor_callchain with a reference
      to the global callchain_cursor which also resolves all 3 issues mentioned
      above.
      
      How to reproduce the crash:
      
        $ perf record --call-graph=dwarf stress -t 1 -c 1
        $ perf script > /dev/null
        Segfault
      Signed-off-by: NChris Phlipot <cphlipot0@gmail.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Fixes: 6f736735 ("perf evsel: Require that callchains be resolved before calling fprintf_{sym,callchain}")
      Link: http://lkml.kernel.org/r/1461119531-2529-1-git-send-email-cphlipot0@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e557b674
    • A
      perf trace: Make --pf maj/min/all use callchains too · 0c3a6ef4
      Arnaldo Carvalho de Melo 提交于
      Forgot about page faults, a software event, when adding support for callchains,
      fix it:
      
        # trace --no-syscalls --pf maj --call dwarf
           0.000 ( 0.000 ms): Xorg/2068 majfault [sfbSegment1+0x0] => /usr/lib64/xorg/modules/drivers/intel_drv.so@0x11b490 (x.)
                                             sfbSegment1+0x0 (/usr/lib64/xorg/modules/drivers/intel_drv.so)
                                             fbPolySegment32+0x361 (/usr/lib64/xorg/modules/drivers/intel_drv.so)
                                             sna_poly_segment+0x743 (/usr/lib64/xorg/modules/drivers/intel_drv.so)
                                             damagePolySegment+0x77 (/usr/libexec/Xorg)
                                             ProcPolySegment+0xe7 (/usr/libexec/Xorg)
                                             Dispatch+0x25f (/usr/libexec/Xorg)
                                             dix_main+0x3c3 (/usr/libexec/Xorg)
                                             __libc_start_main+0xf0 (/usr/lib64/libc-2.22.so)
                                             _start+0x29 (/usr/libexec/Xorg)
           0.257 ( 0.000 ms): Xorg/2068 majfault [miZeroClipLine+0x0] => /usr/libexec/Xorg@0x18e830 (x.)
                                             miZeroClipLine+0x0 (/usr/libexec/Xorg)
                                             _fbSegment+0x2c0 (/usr/lib64/xorg/modules/drivers/intel_drv.so)
                                             sfbSegment1+0x67 (/usr/lib64/xorg/modules/drivers/intel_drv.so)
                                             fbPolySegment32+0x361 (/usr/lib64/xorg/modules/drivers/intel_drv.so)
                                             sna_poly_segment+0x743 (/usr/lib64/xorg/modules/drivers/intel_drv.so)
                                             damagePolySegment+0x77 (/usr/libexec/Xorg)
                                             ProcPolySegment+0xe7 (/usr/libexec/Xorg)
                                             Dispatch+0x25f (/usr/libexec/Xorg)
                                             dix_main+0x3c3 (/usr/libexec/Xorg)
                                             __libc_start_main+0xf0 (/usr/lib64/libc-2.22.so)
                                             _start+0x29 (/usr/libexec/Xorg)
      ^C#
      
      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-8h6ssirw5z15qyhy2lwd6f89@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0c3a6ef4
    • A
      perf trace: Extract evsel contructor from perf_evlist__add_pgfault · 0ae537cb
      Arnaldo Carvalho de Melo 提交于
      Prep work for next patches, where we'll need access to the created
      evsels, to possibly configure callchains.
      
      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-2pcgsgnkgellhlcao4aub8tu@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0ae537cb
    • A
      perf buildid: Fix off-by-one in write_buildid() · 70a2cba9
      Andrey Ryabinin 提交于
      write_buildid() increments 'name_len' with intention to take into
      account trailing zero byte. However, 'name_len' was already incremented
      in machine__write_buildid_table() before.  So this leads to
      out-of-bounds read in do_write():
      
        $ ./perf record sleep 0
        [ perf record: Woken up 1 times to write data ]
        =================================================================
        ==15899==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00000099fc92 at pc 0x7f1aa9c7eab5 bp 0x7fff940f84d0 sp 0x7fff940f7c78
        READ of size 19 at 0x00000099fc92 thread T0
            #0 0x7f1aa9c7eab4  (/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/libasan.so.2+0x44ab4)
            #1 0x649c5b in do_write util/header.c:67
            #2 0x649c5b in write_padded util/header.c:82
            #3 0x57e8bc in write_buildid util/build-id.c:239
            #4 0x57e8bc in machine__write_buildid_table util/build-id.c:278
        ...
      
        0x00000099fc92 is located 0 bytes to the right of global variable '*.LC99' defined in 'util/symbol.c' (0x99fc80) of size 18
          '*.LC99' is ascii string '[kernel.kallsyms]'
        ...
      
        Shadow bytes around the buggy address:
          0x00008012bf80: f9 f9 f9 f9 00 00 00 00 00 00 03 f9 f9 f9 f9 f9
        =>0x00008012bf90: 00 00[02]f9 f9 f9 f9 f9 00 00 00 00 00 05 f9 f9
          0x00008012bfa0: f9 f9 f9 f9 00 03 f9 f9 f9 f9 f9 f9 00 00 00 00
      Signed-off-by: NAndrey Ryabinin <aryabinin@virtuozzo.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1461053847-5633-1-git-send-email-aryabinin@virtuozzo.com
      [ Remove the off-by one at the origin, to keep len(s) == strlen(s) assumption ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      70a2cba9
  4. 19 4月, 2016 6 次提交
    • A
      perf test: Add missing verbose output explaining the reason for failure · 6566feaf
      Arnaldo Carvalho de Melo 提交于
      One of the branches leading to an error had no debug message emitted,
      fix it, the new lines are:
      
        # perf test -v kallsyms
      <SNIP>
        0xffffffff81001000: diff name v: xen_hypercall_set_trap_table k: hypercall_page
        0xffffffff810691f0: diff name v: try_to_free_pud_page k: try_to_free_pmd_page
      <SNIP>
        0xffffffff8150bb20: diff name v: wakeup_expire_count_show.part.5 k: wakeup_active_count_show.part.7
        0xffffffff816bc7f0: diff name v: phys_switch_id_show.part.11 k: phys_port_name_show.part.12
        0xffffffff817bbb90: diff name v: __do_softirq k: __softirqentry_text_start
      <SNIP>
      
      This in turn exercises another bug, still under investigation, because those
      aliases _are_ in kallsyms, with the same name...
      
      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: ab414dcd ("perf test: Fixup aliases checking in the 'vmlinux matches kallsyms' test")
      Link: http://lkml.kernel.org/n/tip-5fhea7a54a54gsmagu9obpr4@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6566feaf
    • A
      perf test: Ignore kcore files in the "vmlinux matches kallsyms" test · 53d0fe68
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      53d0fe68
    • A
      perf symbols: Allow loading kallsyms without considering kcore files · e02092b9
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      e02092b9
    • A
      perf build: Remove x86 references from arch-neutral Build · 2cc46669
      Arnaldo Carvalho de Melo 提交于
      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: NStephen Rothwell <sfr@canb.auug.org.au>
      Tested-by: NJiri 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      2cc46669
    • C
      perf jit: memset() variable 'st' using the correct size · f56ebf20
      Colin Ian King 提交于
      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: NColin Ian King <colin.king@canonical.com>
      Tested-by: NArnaldo 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      f56ebf20
    • C
      perf script: Fix postgresql ubuntu install instructions · d6632dd5
      Chris Phlipot 提交于
      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: NChris 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: NArnaldo Carvalho de Melo <acme@redhat.com>
      d6632dd5
  5. 18 4月, 2016 8 次提交
  6. 16 4月, 2016 7 次提交
    • A
      perf trace: Fix build when DWARF unwind isn't available · ccd62a89
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      ccd62a89
    • A
      perf trace: Bump --mmap-pages when --call-graph is used by the root user · f3e459d1
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      f3e459d1
    • A
      perf evlist: Expose perf_event_mlock_kb_in_pages() helper · f5e7150c
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      f5e7150c
    • A
      perf trace: Make --(min,max}-stack imply "--call-graph dwarf" · 05614993
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      05614993
    • A
      perf record: Export record_opts based callchain parsing helper · 0883e820
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      0883e820
    • A
      perf trace: Introduce --min-stack filter · 5cf9c84e
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      5cf9c84e
    • A
      perf trace: Do not print interrupted syscalls when using --duration · e519bd9a
      Arnaldo Carvalho de Melo 提交于
      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: NArnaldo Carvalho de Melo <acme@redhat.com>
      e519bd9a
  7. 15 4月, 2016 3 次提交