1. 06 12月, 2016 7 次提交
  2. 02 12月, 2016 13 次提交
    • I
      Merge tag 'perf-core-for-mingo-20161201' of... · e7af7b15
      Ingo Molnar 提交于
      Merge tag 'perf-core-for-mingo-20161201' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
      
      Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
      
      New features:
      
       - Support AArch64 in the 'annotate' code, native/local and
         cross-arch/remote (Kim Phillips)
      
       - Allow considering just events in a given time interval, via the
         '--time start.s.ms,end.s.ms' command line, added to 'perf kmem',
         'perf report', 'perf sched timehist' and 'perf script' (David Ahern)
      
       - Add option to stop printing a callchain at one of a given group of
         symbol names (David Ahern)
      
       - Handle CPU migration events in 'perf sched timehist' (David Ahern)
      
       - Track memory freed in 'perf kmem stat' (David Ahern)
      
      Infrastructure:
      
       - Add initial support (and perf test entry) for tooling hooks, starting with
         'record_start' and 'record_end', that will have as its initial user the
         eBPF infrastructure, where perf_ prefixed functions will be JITed and
         run when such hooks are called (Wang Nan)
      
       - Remove redundant "test" and similar strings from 'perf test' descriptions
         (Arnaldo Carvalho de Melo)
      
       - Implement assorted libbpf improvements (Wang Nan)
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      e7af7b15
    • I
      Merge branch 'linus' into perf/core, to pick up fixes · 3782746a
      Ingo Molnar 提交于
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      3782746a
    • L
      Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs · 2caceb32
      Linus Torvalds 提交于
      Pull overlayfs fix from Miklos Szeredi:
       "This fixes a regression introduced in 4.8"
      
      * 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
        ovl: fix d_real() for stacked fs
      2caceb32
    • L
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 92cf44e2
      Linus Torvalds 提交于
      Pull input fixes from Dmitry Torokhov: "We are disabling automatic
        probing of BYD touchpads as it results in too many false positives,
        and the hardware is not terribly popular and having the protocol
        support does not result in significantly improved user experience.
      
        We also change keycode for KEY_DATA to avoid clashing with
        KEY_FASTREVERSE. Luckily this newish code is used by CEC framework
        that is still in staging, so it is extremely unlikely that someone has
        already started using this keycode"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: change KEY_DATA from 0x275 to 0x277
        Input: psmouse - disable automatic probing of BYD touchpads
      92cf44e2
    • N
      kbuild: make sure autoksyms.h exists early · d3fc425e
      Nicolas Pitre 提交于
      Some people are able to trigger a race where autoksyms.h is used before
      its empty version is even created.  Let's create it at the same time as
      the directory holding it is created.
      Signed-off-by: NNicolas Pitre <nico@linaro.org>
      Tested-by: NPrarit Bhargava <prarit@redhat.com>
      Tested-by: NJarod Wilson <jarod@redhat.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d3fc425e
    • K
      perf annotate: AArch64 support · 0fcb1da4
      Kim Phillips 提交于
      This is a regex converted version from the original:
      
      	https://lkml.org/lkml/2016/5/19/461
      
      Add basic support to recognise AArch64 assembly. This allows perf to
      identify AArch64 instructions that branch to other parts within the
      same function, thereby properly annotating them.
      
      Rebased onto new cross-arch annotation bits:
      
      	https://lkml.org/lkml/2016/11/25/546
      
      Sample output:
      
      security_file_permission  vmlinux
        5.80 │    ← ret                                                  ▒
             │70:   ldr    w0, [x21,#68]                                 ▒
        4.44 │    ↓ tbnz   d0                                            ▒
             │      mov    w0, #0x24                       // #36        ▒
        1.37 │      ands   w0, w22, w0                                   ▒
             │    ↑ b.eq   60                                            ▒
        1.37 │    ↓ tbnz   e4                                            ▒
             │      mov    w19, #0x20000                   // #131072    ▒
        1.02 │    ↓ tbz    ec                                            ▒
             │90:┌─→ldr    x3, [x21,#24]                                 ▒
        1.37 │   │  add    x21, x21, #0x10                               ▒
             │   │  mov    w2, w19                                       ▒
        1.02 │   │  mov    x0, x21                                       ▒
             │   │  mov    x1, x3                                        ▒
        1.71 │   │  ldr    x20, [x3,#48]                                 ▒
             │   │→ bl     __fsnotify_parent                             ▒
        0.68 │   │↑ cbnz   60                                            ▒
             │   │  mov    x2, x21                                       ▒
        1.37 │   │  mov    w1, w19                                       ▒
             │   │  mov    x0, x20                                       ▒
        0.68 │   │  mov    w5, #0x0                        // #0         ▒
             │   │  mov    x4, #0x0                        // #0         ▒
        1.71 │   │  mov    w3, #0x1                        // #1         ▒
             │   │→ bl     fsnotify                                      ▒
        1.37 │   │↑ b      60                                            ▒
             │d0:│  mov    w0, #0x0                        // #0         ▒
             │   │  ldp    x19, x20, [sp,#16]                            ▒
             │   │  ldp    x21, x22, [sp,#32]                            ▒
             │   │  ldp    x29, x30, [sp],#48                            ▒
             │   │← ret                                                  ▒
             │e4:│  mov    w19, #0x10000                   // #65536     ▒
             │   └──b      90                                            ◆
             │ec:   brk    #0x800                                        ▒
      Press 'h' for help on key bindings
      Signed-off-by: NKim Phillips <kim.phillips@arm.com>
      Signed-off-by: NChris Ryder <chris.ryder@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Link: http://lkml.kernel.org/r/20161130092344.012e18e3e623bea395162f95@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0fcb1da4
    • K
      perf annotate: Use arch->objdump.comment_char in dec__parse() · 859afa6c
      Kim Phillips 提交于
      Presume neglected in commit 786c1b51 "perf annotate: Start supporting
      cross arch annotation".  This doesn't fix a bug since none of the
      affected arches support parsing dec/inc instructions yet.
      Signed-off-by: NKim Phillips <kim.phillips@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Chris Ryder <chris.ryder@arm.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Pawel Moll <pawel.moll@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Will Deacon <will.deacon@arm.com>
      Link: http://lkml.kernel.org/r/20161130092333.1cca5dd2c77e1790d61c1e9c@arm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      859afa6c
    • D
      perf report: Add option to specify time window of interest · 46690a80
      David Ahern 提交于
      Add option to allow user to control analysis window. e.g., collect data
      for time window and analyze a segment of interest within that window.
      
      Committer notes:
      
      Testing it:
      
      Using the perf.data file captured via 'perf kmem record':
      
        # perf report --header-only
        # ========
        # captured on: Tue Nov 29 16:01:53 2016
        # hostname : jouet
        # os release : 4.8.8-300.fc25.x86_64
        # perf version : 4.9.rc6.g5a6aca
        # arch : x86_64
        # nrcpus online : 4
        # nrcpus avail : 4
        # cpudesc : Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz
        # cpuid : GenuineIntel,6,61,4
        # total memory : 20254660 kB
        # cmdline : /home/acme/bin/perf kmem record usleep 1
        # event : name = kmem:kmalloc, , id = { 931980, 931981, 931982, 931983 }, type = 2, size = 112, config = 0x1b9, { sample_period, sample_freq } = 1, sample_typ
        # event : name = kmem:kmalloc_node, , id = { 931984, 931985, 931986, 931987 }, type = 2, size = 112, config = 0x1b7, { sample_period, sample_freq } = 1, sampl
        # event : name = kmem:kfree, , id = { 931988, 931989, 931990, 931991 }, type = 2, size = 112, config = 0x1b5, { sample_period, sample_freq } = 1, sample_type
        # event : name = kmem:kmem_cache_alloc, , id = { 931992, 931993, 931994, 931995 }, type = 2, size = 112, config = 0x1b8, { sample_period, sample_freq } = 1, s
        # event : name = kmem:kmem_cache_alloc_node, , id = { 931996, 931997, 931998, 931999 }, type = 2, size = 112, config = 0x1b6, { sample_period, sample_freq } =
        # event : name = kmem:kmem_cache_free, , id = { 932000, 932001, 932002, 932003 }, type = 2, size = 112, config = 0x1b4, { sample_period, sample_freq } = 1, sa
        # HEADER_CPU_TOPOLOGY info available, use -I to display
        # HEADER_NUMA_TOPOLOGY info available, use -I to display
        # pmu mappings: cpu = 4, intel_pt = 7, intel_bts = 6, uncore_arb = 13, cstate_pkg = 15, breakpoint = 5, uncore_cbox_1 = 12, power = 9, software = 1, uncore_im
        # HEADER_CACHE info available, use -I to display
        # missing features: HEADER_BRANCH_STACK HEADER_GROUP_DESC HEADER_AUXTRACE HEADER_STAT
        # ========
        #
        # # Looking at just the histogram entries for the first event:
        #
        # perf report  | head -33
        # To display the perf.data header info, please use --header/--header-only options.
        #
        #
        # Total Lost Samples: 0
        #
        # Samples: 40  of event 'kmem:kmalloc'
        # Event count (approx.): 40
        #
        # Overhead  Trace output
        # ........  ...............................................................................................................
        #
          37.50%  call_site=ffffffffb91ad3c7 ptr=0xffff88895fc05000 bytes_req=4096 bytes_alloc=4096 gfp_flags=GFP_KERNEL
          10.00%  call_site=ffffffffb9258416 ptr=0xffff888a1dc61f00 bytes_req=240 bytes_alloc=256 gfp_flags=GFP_KERNEL|__GFP_ZERO
           7.50%  call_site=ffffffffb9258416 ptr=0xffff888a2640ac00 bytes_req=240 bytes_alloc=256 gfp_flags=GFP_KERNEL|__GFP_ZERO
           2.50%  call_site=ffffffffb92759ba ptr=0xffff888a26776000 bytes_req=4096 bytes_alloc=4096 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb9276864 ptr=0xffff8886f6b82600 bytes_req=136 bytes_alloc=192 gfp_flags=GFP_KERNEL|__GFP_ZERO
           2.50%  call_site=ffffffffb9276903 ptr=0xffff888aefcf0460 bytes_req=32 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb92ad0ce ptr=0xffff888756c98a00 bytes_req=392 bytes_alloc=512 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb92ad0ce ptr=0xffff888756c9ba00 bytes_req=504 bytes_alloc=512 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb92ad301 ptr=0xffff888a31747600 bytes_req=128 bytes_alloc=128 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb92ad511 ptr=0xffff888a9d26a2a0 bytes_req=28 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb936a7fb ptr=0xffff88873e8c11a0 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb936a7fb ptr=0xffff88873e8c12c0 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb936a7fb ptr=0xffff88873e8c1540 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb936a7fb ptr=0xffff88873e8c15a0 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb936a7fb ptr=0xffff88873e8c15e0 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb936a7fb ptr=0xffff88873e8c16e0 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb936a7fb ptr=0xffff88873e8c1c20 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb936a7fb ptr=0xffff888a9d26a2a0 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL
           2.50%  call_site=ffffffffb9373e66 ptr=0xffff8889f1931240 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_ATOMIC|__GFP_ZERO
           2.50%  call_site=ffffffffb9373e66 ptr=0xffff8889f1931980 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_ATOMIC|__GFP_ZERO
           2.50%  call_site=ffffffffb9373e66 ptr=0xffff8889f1931a00 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_ATOMIC|__GFP_ZERO
      
        #
        # # And then limiting using the example for 'perf kmem stat --time' used
        # # in the previous changeset committer note we see that there were no
        # # kmem:kmalloc in that last part of the file, but there were some
        # # kmem:kmem_cache_alloc ones:
        #
        # perf report --time 20119.782088, --stdio
        #
        # Total Lost Samples: 0
        #
        # Samples: 0  of event 'kmem:kmalloc'
        # Event count (approx.): 0
        #
        # Overhead  Trace output
        # ........  ............
        #
      
        # Samples: 0  of event 'kmem:kmalloc_node'
        # Event count (approx.): 0
        #
        # Overhead  Trace output
        # ........  ............
        #
      
        # Samples: 0  of event 'kmem:kfree'
        # Event count (approx.): 0
        #
        # Overhead  Trace output
        # ........  ............
        #
      
        # Samples: 8  of event 'kmem:kmem_cache_alloc'
        # Event count (approx.): 8
        #
        # Overhead  Trace output
        # ........  ..................................................................................................................
        #
          75.00%  call_site=ffffffffb9333b42 ptr=0xffff888bdf1a39c0 bytes_req=48 bytes_alloc=48 gfp_flags=GFP_NOFS|__GFP_ZERO
          12.50%  call_site=ffffffffb90ad33a ptr=0xffff8889f071f6e0 bytes_req=160 bytes_alloc=160 gfp_flags=GFP_ATOMIC|__GFP_NOTRACK
          12.50%  call_site=ffffffffb9287cc1 ptr=0xffff8889b12722d8 bytes_req=104 bytes_alloc=104 gfp_flags=GFP_NOFS|__GFP_ZERO
        #
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1480439746-42695-7-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      46690a80
    • D
      perf kmem: Add option to specify time window of interest · 2a865bd8
      David Ahern 提交于
      Add option to allow user to control analysis window. e.g., collect data
      for time window and analyze a segment of interest within that window.
      
      Committer notes:
      
      Testing it:
      
        # perf kmem record usleep 1
        [ perf record: Woken up 0 times to write data ]
        [ perf record: Captured and wrote 1.540 MB perf.data (2049 samples) ]
        # perf evlist
        kmem:kmalloc
        kmem:kmalloc_node
        kmem:kfree
        kmem:kmem_cache_alloc
        kmem:kmem_cache_alloc_node
        kmem:kmem_cache_free
        # Tip: use 'perf evlist --trace-fields' to show fields for tracepoint events
        #
        # # Use 'perf script' to get a first approach, select a chunk for then using
        # # with 'perf kmem stat --time'
        #
        # perf script | tail -15
          usleep 9889 [0] 20119.782088:  kmem:kmem_cache_free: (selinux_file_free_security+0x27) call_site=ffffffffb936aa07 ptr=0xffff888a1df49fc0
            perf 9888 [3] 20119.782088:  kmem:kmem_cache_free: (jbd2_journal_stop+0x1a1) call_site=ffffffffb9334581 ptr=0xffff888bdf1a39c0
            perf 9888 [3] 20119.782089: kmem:kmem_cache_alloc: (jbd2__journal_start+0x72) call_site=ffffffffb9333b42 ptr=0xffff888bdf1a39c0 bytes_req=48 bytes_alloc=48 gfp_flags=GFP_NOFS|__GFP_ZERO
            perf 9888 [3] 20119.782090:  kmem:kmem_cache_free: (jbd2_journal_stop+0x1a1) call_site=ffffffffb9334581 ptr=0xffff888bdf1a39c0
            perf 9888 [3] 20119.782090: kmem:kmem_cache_alloc: (jbd2__journal_start+0x72) call_site=ffffffffb9333b42 ptr=0xffff888bdf1a39c0 bytes_req=48 bytes_alloc=48 gfp_flags=GFP_NOFS|__GFP_ZERO
          usleep 9889 [0] 20119.782091: kmem:kmem_cache_alloc: (__sigqueue_alloc+0x4a) call_site=ffffffffb90ad33a ptr=0xffff8889f071f6e0 bytes_req=160 bytes_alloc=160 gfp_flags=GFP_ATOMIC|__GFP_NOTRACK
            perf 9888 [3] 20119.782091:  kmem:kmem_cache_free: (jbd2_journal_stop+0x1a1) call_site=ffffffffb9334581 ptr=0xffff888bdf1a39c0
            perf 9888 [3] 20119.782093:  kmem:kmem_cache_free: (__sigqueue_free.part.17+0x33) call_site=ffffffffb90ad3f3 ptr=0xffff8889f071f6e0
            perf 9888 [3] 20119.782098: kmem:kmem_cache_alloc: (jbd2__journal_start+0x72) call_site=ffffffffb9333b42 ptr=0xffff888bdf1a39c0 bytes_req=48 bytes_alloc=48 gfp_flags=GFP_NOFS|__GFP_ZERO
            perf 9888 [3] 20119.782098:  kmem:kmem_cache_free: (jbd2_journal_stop+0x1a1) call_site=ffffffffb9334581 ptr=0xffff888bdf1a39c0
            perf 9888 [3] 20119.782099: kmem:kmem_cache_alloc: (jbd2__journal_start+0x72) call_site=ffffffffb9333b42 ptr=0xffff888bdf1a39c0 bytes_req=48 bytes_alloc=48 gfp_flags=GFP_NOFS|__GFP_ZERO
            perf 9888 [3] 20119.782100: kmem:kmem_cache_alloc: (alloc_buffer_head+0x21) call_site=ffffffffb9287cc1 ptr=0xffff8889b12722d8 bytes_req=104 bytes_alloc=104 gfp_flags=GFP_NOFS|__GFP_ZERO
            perf 9888 [3] 20119.782101:  kmem:kmem_cache_free: (jbd2_journal_stop+0x1a1) call_site=ffffffffb9334581 ptr=0xffff888bdf1a39c0
            perf 9888 [3] 20119.782102: kmem:kmem_cache_alloc: (jbd2__journal_start+0x72) call_site=ffffffffb9333b42 ptr=0xffff888bdf1a39c0 bytes_req=48 bytes_alloc=48 gfp_flags=GFP_NOFS|__GFP_ZERO
            perf 9888 [3] 20119.782103:  kmem:kmem_cache_free: (jbd2_journal_stop+0x1a1) call_site=ffffffffb9334581 ptr=0xffff888bdf1a39c0
        #
        # # stats for the whole perf.data file, i.e. no interval specified
        #
        # perf kmem stat
      
        SUMMARY (SLAB allocator)
        ========================
        Total bytes requested: 172,628
        Total bytes allocated: 173,088
        Total bytes freed:     161,280
        Net total bytes allocated: 11,808
        Total bytes wasted on internal fragmentation: 460
        Internal fragmentation: 0.265761%
        Cross CPU allocations: 0/851
        #
        # # stats for an end open interval, after a certain time:
        #
        # perf kmem stat --time 20119.782088,
      
        SUMMARY (SLAB allocator)
        ========================
        Total bytes requested: 552
        Total bytes allocated: 552
        Total bytes freed:     448
        Net total bytes allocated: 104
        Total bytes wasted on internal fragmentation: 0
        Internal fragmentation: 0.000000%
        Cross CPU allocations: 0/8
        #
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1480439746-42695-6-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2a865bd8
    • D
      perf sched timehist: Add option to specify time window of interest · 853b7407
      David Ahern 提交于
      Add option to allow user to control analysis window. e.g., collect data
      for time window and analyze a segment of interest within that window.
      
      Committer notes:
      
      Testing it:
      
        # perf sched record -a usleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 1.593 MB perf.data (25 samples) ]
        #
        # perf sched timehist | head -18
        Samples do not have callchains.
                time    cpu   task name       wait time  sch delay  run time
                              [tid/pid]          (msec)     (msec)    (msec)
        ------------- ------  --------------- ---------  ---------  --------
         19818.635579 [0002]  <idle>              0.000      0.000     0.000
         19818.635613 [0000]  perf[9116]          0.000      0.000     0.000
         19818.635676 [0000]  <idle>              0.000      0.000     0.063
         19818.635678 [0000]  rcuos/2[29]         0.000      0.002     0.001
         19818.635696 [0002]  perf[9117]          0.000      0.004     0.116
         19818.635702 [0000]  <idle>              0.001      0.000     0.024
         19818.635709 [0002]  migration/2[25]     0.000      0.003     0.012
         19818.636263 [0000]  usleep[9117]        0.005      0.000     0.560
         19818.636316 [0000]  <idle>              0.560      0.000     0.053
         19818.636358 [0002]  <idle>              0.129      0.000     0.649
         19818.636358 [0000]  usleep[9117]        0.053      0.002     0.042
        #
      
        # perf sched timehist --time 19818.635696,
        Samples do not have callchains.
                 time    cpu  task name       wait time  sch delay  run time
                              [tid/pid]          (msec)     (msec)    (msec)
        ------------- ------  ---------------  --------  --------- ---------
         19818.635696 [0002]  perf[9117]          0.000      0.120     0.000
         19818.635702 [0000]  <idle>              0.019      0.000     0.006
         19818.635709 [0002]  migration/2[25]     0.000      0.003     0.012
         19818.636263 [0000]  usleep[9117]        0.005      0.000     0.560
         19818.636316 [0000]  <idle>              0.560      0.000     0.053
         19818.636358 [0002]  <idle>              0.129      0.000     0.649
         19818.636358 [0000]  usleep[9117]        0.053      0.002     0.042
        #
        # perf sched timehist --time 19818.635696,19818.635709
        Samples do not have callchains.
                 time    cpu  task name       wait time  sch delay  run time
                              [tid/pid]          (msec)     (msec)    (msec)
        ------------- ------  --------------- ---------  --------- ---------
         19818.635696 [0002]  perf[9117]          0.000      0.120     0.000
         19818.635702 [0000]  <idle>              0.019      0.000     0.006
         19818.635709 [0002]  migration/2[25]     0.000      0.003     0.012
         19818.635709 [0000]  usleep[9117]        0.005      0.000     0.006
        #
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1480439746-42695-5-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      853b7407
    • D
      perf script: Add option to specify time window of interest · a91f4c47
      David Ahern 提交于
      Add option to allow user to control analysis window. e.g., collect data
      for some amount of time and analyze a segment of interest within that
      window.
      
      Committer notes:
      
      Testing it:
      
        # perf evlist -v
        cycles:ppp: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CALLCHAIN|CPU|PERIOD, disabled: 1, inherit: 1, mmap: 1, comm: 1, freq: 1, task: 1, precise_ip: 3, sample_id_all: 1, exclude_guest: 1, mmap2: 1, comm_exec: 1
        #
        # perf script --hide-call-graph | head -15
          swapper    0 [0] 9693.370039:      1 cycles:ppp: ffffffffb90072ad x86_pmu_enable (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [0] 9693.370044:      1 cycles:ppp: ffffffffb900ca1b intel_pmu_handle_irq (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [0] 9693.370046:      7 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [0] 9693.370048:    126 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [0] 9693.370049:   2701 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [0] 9693.370051:  58823 cycles:ppp: ffffffffb90cd2e0 idle_cpu (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370059:      1 cycles:ppp: ffffffffb91a713a ctx_resched (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370062:      1 cycles:ppp: ffffffffb900ca1b intel_pmu_handle_irq (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370064:     13 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370065:    250 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370067:   5269 cycles:ppp: ffffffffb902fe79 sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370069: 114602 cycles:ppp: ffffffffb90c1c5a atomic_notifier_call_chain (.../4.8.8-300.fc25.x86_64/vmlinux)
             perf 5124 [2] 9693.370076:      1 cycles:ppp: ffffffffb91a76c1 __perf_event_enable (.../4.8.8-300.fc25.x86_64/vmlinux)
             perf 5124 [2] 9693.370091:      1 cycles:ppp: ffffffffb900ca1b intel_pmu_handle_irq (.../4.8.8-300.fc25.x86_64/vmlinux)
             perf 5124 [2] 9693.370095:      3 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
        #
        # perf script --hide-call-graph --time ,9693.370048
          swapper    0 [0] 9693.370039:      1 cycles:ppp: ffffffffb90072ad x86_pmu_enable (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [0] 9693.370044:      1 cycles:ppp: ffffffffb900ca1b intel_pmu_handle_irq (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [0] 9693.370046:      7 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
        # perf script --hide-call-graph --time 9693.370064,9693.370076
          swapper    0 [1] 9693.370064:     13 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370065:    250 cycles:ppp: ffffffffb902fd93 native_sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370067:   5269 cycles:ppp: ffffffffb902fe79 sched_clock (.../4.8.8-300.fc25.x86_64/vmlinux)
          swapper    0 [1] 9693.370069: 114602 cycles:ppp: ffffffffb90c1c5a atomic_notifier_call_chain (.../4.8.8-300.fc25.x86_64/vmlinux)
        #
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1480439746-42695-4-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a91f4c47
    • D
      perf tools: Move parse_nsec_time to time-utils.c · c284d669
      David Ahern 提交于
      Code move only; no functional change intended.
      
      Committer notes:
      
      Fix the build on Ubuntu 16.04 x86-64 cross-compiling to S/390, with this
      set of auto-detected features:
      
        ...                         dwarf: [ on  ]
        ...            dwarf_getlocations: [ on  ]
        ...                         glibc: [ on  ]
        ...                          gtk2: [ OFF ]
        ...                      libaudit: [ OFF ]
        ...                        libbfd: [ OFF ]
        ...                        libelf: [ on  ]
        ...                       libnuma: [ OFF ]
        ...        numa_num_possible_cpus: [ OFF ]
        ...                       libperl: [ OFF ]
        ...                     libpython: [ OFF ]
        ...                      libslang: [ OFF ]
        ...                     libcrypto: [ OFF ]
        ...                     libunwind: [ OFF ]
        ...            libdw-dwarf-unwind: [ on  ]
        ...                          zlib: [ on  ]
        ...                          lzma: [ OFF ]
        ...                     get_cpuid: [ OFF ]
        ...                           bpf: [ on  ]
      
      Where it was failing with:
      
          CC       /tmp/build/perf/util/time-utils.o
        util/time-utils.c: In function 'parse_nsec_time':
        util/time-utils.c:17:13: error: implicit declaration of function 'strtoul' [-Werror=implicit-function-declaration]
          time_sec = strtoul(str, &end, 10);
                     ^
        util/time-utils.c:17:2: error: nested extern declaration of 'strtoul' [-Werror=nested-externs]
          time_sec = strtoul(str, &end, 10);
          ^
        util/time-utils.c: In function 'perf_time__parse_str':
        util/time-utils.c:93:2: error: implicit declaration of function 'free' [-Werror=implicit-function-declaration]
          free(str);
          ^
        util/time-utils.c:93:2: error: incompatible implicit declaration of built-in function 'free' [-Werror]
        util/time-utils.c:93:2: note: include '<stdlib.h>' or provide a declaration of 'free'
      
      Do as suggested and add a '#include <stdlib.h>' to get the free() and strtoul()
      declarations and fix the build.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1480439746-42695-3-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c284d669
    • D
      perf tools: Add time-based utility functions · fdf9dc4b
      David Ahern 提交于
      Add function to parse a user time string of the form <start>,<stop>
      where start and stop are time in sec.nsec format. Both start and stop
      times are optional.
      
      Add function to determine if a sample time is within a given time
      time window of interest.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1480439746-42695-2-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fdf9dc4b
  3. 01 12月, 2016 12 次提交
  4. 30 11月, 2016 7 次提交
    • L
      Merge tag 'arc-4.9-final' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc · ded6e842
      Linus Torvalds 提交于
      Pull ARC fixes from Vineet Gupta:
      
       - fix PAE40 crash [Yuriy]
      
       - disable IO-Coherency by default
      
       - use a different inline asm constraint for Zero Overhead loops
      
      * tag 'arc-4.9-final' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
        ARC: mm: PAE40: Fix crash at munmap
        ARC: mm: IOC: Don't enable IOC by default
        ARC: Don't use "+l" inline asm constraint
      ded6e842
    • L
      Re-enable CONFIG_MODVERSIONS in a slightly weaker form · faaae2a5
      Linus Torvalds 提交于
      This enables CONFIG_MODVERSIONS again, but allows for missing symbol CRC
      information in order to work around the issue that newer binutils
      versions seem to occasionally drop the CRC on the floor.  binutils 2.26
      seems to work fine, while binutils 2.27 seems to break MODVERSIONS of
      symbols that have been defined in assembler files.
      
      [ We've had random missing CRC's before - it may be an old problem that
        just is now reliably triggered with the weak asm symbols and a new
        version of binutils ]
      
      Some day I really do want to remove MODVERSIONS entirely.  Sadly, today
      does not appear to be that day: Debian people apparently do want the
      option to enable MODVERSIONS to make it easier to have external modules
      across kernel versions, and this seems to be a fairly minimal fix for
      the annoying problem.
      
      Cc: Ben Hutchings <ben@decadent.org.uk>
      Acked-by: NMichal Marek <mmarek@suse.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      faaae2a5
    • L
      Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6 · 22d3d4fb
      Linus Torvalds 提交于
      Pull CIFS fixes from Steve French:
       "A few misc important cifs fixes, including a fix for a 4.9 regression
        in posix_acl xattr handling"
      
      * 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
        CIFS: iterate over posix acl xattr entry correctly in ACL_to_cifs_posix()
        Call echo service immediately after socket reconnect
        CIFS: Fix BUG() in calc_seckey()
      22d3d4fb
    • L
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · ab59d1f4
      Linus Torvalds 提交于
      Pull SCSI fixes from James Bottomley:
       "Four small fixes.
      
        The be2iscsi is a potential device overrun in consistent memory, which
        could have nasty consequences if the consistent allocations are
        packed.
      
        The hpsa one fixes a regression where older controllers can now get a
        numbering clash between the first internal disk and the controller.
      
        The libfc one is a regression in timespec conversions which causes a
        user visible issue in a command line tool and the mpt3sas one fixes a
        regression where the controller could remain permanently blocked after
        an ATA pass through command followed by a reset"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo()
        scsi: mpt3sas: Unblock device after controller reset
        scsi: hpsa: use bus '3' for legacy HBA devices
        scsi: libfc: fix seconds_since_last_reset miscalculation
      ab59d1f4
    • Y
      ARC: mm: PAE40: Fix crash at munmap · 6a8b2ca7
      Yuriy Kolerov 提交于
      commit 1c3c9093 broke PAE40. Macro pfn_pte(pfn, prot) creates paddr
      from pfn, but the page shift was getting truncated to 32 bits since we lost
      the proper cast to 64 bits (for PAE400
      
      Instead of reverting that commit, use a better helper which is 32/64 bits
      safe just like ARM implementation.
      
      Fixes: 1c3c9093 ("ARC: mm: fix build breakage with STRICT_MM_TYPECHECKS")
      Cc: <stable@vger.kernel.org>   #4.4+
      Signed-off-by: NYuriy Kolerov <yuriy.kolerov@synopsys.com>
      [vgupta: massaged changelog]
      Signed-off-by: NVineet Gupta <vgupta@synopsys.com>
      6a8b2ca7
    • A
      mremap: move_ptes: check pte dirty after its removal · a2ce2666
      Aaron Lu 提交于
      Linus found there still is a race in mremap after commit 5d190420
      ("mremap: fix race between mremap() and page cleanning").
      
      As described by Linus:
       "the issue is that another thread might make the pte be dirty (in the
        hardware walker, so no locking of ours will make any difference)
        *after* we checked whether it was dirty, but *before* we removed it
        from the page tables"
      
      Fix it by moving the check after we removed it from the page table.
      Suggested-by: NLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: NAaron Lu <aaron.lu@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a2ce2666
    • D
      perf script: Add option to stop printing callchain · 64eff7d9
      David Ahern 提交于
      Allow user to specify list of symbols which cause the dump of callchains
      to stop at that symbol.
      
      Committer notes:
      
      Testing it:
      
        # perf record -ag usleep 1
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 1.177 MB perf.data (33 samples) ]
        #
        # # Without it:
        #
        # perf script
        swapper   0 [000]  9693.370039:          1 cycles:ppp:
                        2072ad x86_pmu_enable (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a29d7 perf_pmu_enable.part.90 (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a713a ctx_resched (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a76c1 __perf_event_enable (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a0390 event_function (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a1cff remote_function (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        326978 flush_smp_call_function_queue (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        327413 generic_smp_call_function_single_interrupt (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        249b37 smp_call_function_single_interrupt (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        a04b2c call_function_single_interrupt (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        889427 cpuidle_enter (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        2e534a call_cpuidle (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        2e5730 cpu_startup_entry (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        9f5167 rest_init (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                       137ffeb start_kernel ([kernel.vmlinux].init.text)
                       137f2ca x86_64_start_reservations ([kernel.vmlinux].init.text)
                       137f419 x86_64_start_kernel ([kernel.vmlinux].init.text)
      
        swapper   0 [000]  9693.370044:          1 cycles:ppp:
                        20ca1b intel_pmu_handle_irq (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        205b0c perf_event_nmi_handler (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        22a14a nmi_handle (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        22a6b3 default_do_nmi (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        22a83c do_nmi (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        a03fb1 end_repeat_nmi (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a29d7 perf_pmu_enable.part.90 (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a713a ctx_resched (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a76c1 __perf_event_enable (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a0390 event_function (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a1cff remote_function (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        326978 flush_smp_call_function_queue (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        327413 generic_smp_call_function_single_interrupt (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        249b37 smp_call_function_single_interrupt (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        a04b2c call_function_single_interrupt (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        889427 cpuidle_enter (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        2e534a call_cpuidle (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        2e5730 cpu_startup_entry (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        9f5167 rest_init (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                       137ffeb start_kernel ([kernel.vmlinux].init.text)
                       137f2ca x86_64_start_reservations ([kernel.vmlinux].init.text)
        #
        # # Using it to see just what are the calls from the 'remote_function' function:
        #
        # perf script --stop-bt remote_function
        swapper   0 [000]  9693.370039:          1 cycles:ppp:
                        2072ad x86_pmu_enable (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a29d7 perf_pmu_enable.part.90 (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a713a ctx_resched (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a76c1 __perf_event_enable (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a0390 event_function (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a1cff remote_function (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
      
        swapper   0 [000]  9693.370044:          1 cycles:ppp:
                        20ca1b intel_pmu_handle_irq (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        205b0c perf_event_nmi_handler (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        22a14a nmi_handle (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        22a6b3 default_do_nmi (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        22a83c do_nmi (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        a03fb1 end_repeat_nmi (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a29d7 perf_pmu_enable.part.90 (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a713a ctx_resched (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a76c1 __perf_event_enable (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a0390 event_function (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
                        3a1cff remote_function (/usr/lib/debug/lib/modules/4.8.8-300.fc25.x86_64/vmlinux)
      Signed-off-by: NDavid Ahern <dsa@cumulusnetworks.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lkml.kernel.org/r/1480104021-36275-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      64eff7d9
  5. 29 11月, 2016 1 次提交