25 Apr, 2017

1 commit


21 Apr, 2017

2 commits


20 Apr, 2017

4 commits

  • The users of regex and fnmatch functions should include those headers
    instead.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-ixzm5kuamsq1ixbkuv6kmwzj@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • There are places where we just need a forward declaration, and others
    were we need to include strlist.h and/or strfilter.h, reducing the
    impact of changes in headers on the build time, do it.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-zab42gbiki88y9k0csorxekb@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Removing it from util.h, part of an effort to disentangle the includes
    hell, that makes changes to util.h or something included by it to cause
    a complete rebuild of the tools.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-ztrjy52q1rqcchuy3rubfgt2@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Needed to use the PRI[xu](32,64) formatting macros.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-wkbho8kaw24q67dd11q0j39f@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

27 Mar, 2017

2 commits

  • It takes some time to look for inline stack for callgraph addresses. So
    it provides new option "--inline" to let user decide if enable this
    feature.

    --inline:

    If a callgraph address belongs to an inlined function, the inline stack
    will be printed. Each entry is the inline function name or file/line.

    Signed-off-by: Yao Jin
    Tested-by: Milian Wolff
    Cc: Andi Kleen
    Cc: Jiri Olsa
    Cc: Kan Liang
    Link: http://lkml.kernel.org/r/1490474069-15823-4-git-send-email-yao.jin@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jin Yao
     
  • We got it from the git sources but never used it for anything, with the
    place where this would be somehow used remaining:

    static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
    {
    prefix = NULL;
    if (p->option & RUN_SETUP)
    prefix = NULL; /* setup_perf_directory(); */

    Ditch it.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-uw5swz05vol0qpr32c5lpvus@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

14 Mar, 2017

1 commit

  • Introduce a new option to record PERF_RECORD_NAMESPACES events emitted
    by the kernel when fork, clone, setns or unshare are invoked. And update
    perf-record documentation with the new option to record namespace
    events.

    Committer notes:

    Combined it with a later patch to allow printing it via 'perf report -D'
    and be able to test the feature introduced in this patch. Had to move
    here also perf_ns__name(), that was introduced in another later patch.

    Also used PRIu64 and PRIx64 to fix the build in some enfironments wrt:

    util/event.c:1129:39: error: format '%lx' expects argument of type 'long unsigned int', but argument 6 has type 'long long unsigned int' [-Werror=format=]
    ret += fprintf(fp, "%u/%s: %lu/0x%lx%s", idx
    ^
    Testing it:

    # perf record --namespaces -a
    ^C[ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 1.083 MB perf.data (423 samples) ]
    #
    # perf report -D

    3 2028902078892 0x115140 [0xa0]: PERF_RECORD_NAMESPACES 14783/14783 - nr_namespaces: 7
    [0/net: 3/0xf0000081, 1/uts: 3/0xeffffffe, 2/ipc: 3/0xefffffff, 3/pid: 3/0xeffffffc,
    4/user: 3/0xeffffffd, 5/mnt: 3/0xf0000000, 6/cgroup: 3/0xeffffffb]

    0x1151e0 [0x30]: event: 9
    .
    . ... raw event: size 48 bytes
    . 0000: 09 00 00 00 02 00 30 00 c4 71 82 68 0c 7f 00 00 ......0..q.h....
    . 0010: a9 39 00 00 a9 39 00 00 94 28 fe 63 d8 01 00 00 .9...9...(.c....
    . 0020: 03 00 00 00 00 00 00 00 ce c4 02 00 00 00 00 00 ................

    NAMESPACES events: 1

    #

    Signed-off-by: Hari Bathini
    Acked-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Alexei Starovoitov
    Cc: Ananth N Mavinakayanahalli
    Cc: Aravinda Prasad
    Cc: Brendan Gregg
    Cc: Daniel Borkmann
    Cc: Eric Biederman
    Cc: Peter Zijlstra
    Cc: Sargun Dhillon
    Cc: Steven Rostedt
    Link: http://lkml.kernel.org/r/148891930386.25309.18412039920746995488.stgit@hbathini.in.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Hari Bathini
     

07 Mar, 2017

1 commit

  • The tip message at the end was printed regardless of the -q option.

    Originally, the message suggested only '-s comm,dso' option for higher
    level view when no sort option and parent option were given.

    Now it shows random help message regardless of the options so the
    condition can be simplified to honor the -q option.

    Committer notes:

    Before:

    $ perf report --stdio -q
    42.77% ls ls [.] _init
    13.21% ls ld-2.24.so [.] match_symbol
    12.55% ls libc-2.24.so [.] __strcoll_l
    11.94% ls libc-2.24.so [.] _init

    #
    # (Tip: Show current config key-value pairs: perf config --list)
    #
    $

    After:

    $ perf report --stdio -q
    42.77% ls ls [.] _init
    13.21% ls ld-2.24.so [.] match_symbol
    12.55% ls libc-2.24.so [.] __strcoll_l
    11.94% ls libc-2.24.so [.] _init

    $

    We still have those two extra lines tho (that git commit insists in
    turning into one, or git commit --amend doesn't make me add), food for
    another patch...

    Reported-and-Tested-by: Arnaldo Carvalho de Melo
    Signed-off-by: Namhyung Kim
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: kernel-team@lge.com
    Link: http://lkml.kernel.org/r/20170307150851.22304-2-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

20 Feb, 2017

2 commits

  • The -q/--quiet option is to suppress any message. Sometimes users just
    want to see the numbers and it can be used for that case.

    Before:

    $ perf report | head -15
    Failed to open /lib/modules/3.19.3-3-ARCH/kernel/fs/ext4/ext4.ko.gz, continuing without symbols
    Failed to open /lib/modules/3.19.3-3-ARCH/kernel/fs/jbd2/jbd2.ko.gz, continuing without symbols
    Failed to open /tmp/perf-14507.map, continuing without symbols
    ...
    # To display the perf.data header info, please use --header/--header-only options.
    #
    #
    # Total Lost Samples: 0
    #
    # Samples: 39K of event 'cycles'
    # Event count (approx.): 30444796573
    #
    # Overhead Command Shared Object Symbol
    # ........ ........... ................... .........................
    #
    9.28% swapper [kernel.vmlinux] [k] intel_idle
    5.64% swapper [kernel.vmlinux] [k] native_write_msr_safe
    1.93% swapper [kernel.vmlinux] [k] __switch_to
    1.89% swapper [kernel.vmlinux] [k] menu_select
    1.75% sched-pipe [kernel.vmlinux] [k] __switch_to

    After:

    $ perf report -q | head
    9.28% swapper [kernel.vmlinux] [k] intel_idle
    5.64% swapper [kernel.vmlinux] [k] native_write_msr_safe
    1.93% swapper [kernel.vmlinux] [k] __switch_to
    1.89% swapper [kernel.vmlinux] [k] menu_select
    1.75% sched-pipe [kernel.vmlinux] [k] __switch_to
    1.67% swapper [kernel.vmlinux] [k] cpu_startup_entry
    1.48% sched-pipe [kernel.vmlinux] [k] enqueue_entity
    1.46% swapper [kernel.vmlinux] [k] __schedule
    1.36% swapper [kernel.vmlinux] [k] native_read_tsc
    1.34% sched-pipe [kernel.vmlinux] [k] __schedule

    Signed-off-by: Namhyung Kim
    Suggested-and-Tested-by: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: kernel-team@lge.com
    Link: http://lkml.kernel.org/r/20170217081742.17417-4-namhyung@kernel.org
    [ Removed builtin-report.c verbose > 0 hunk added to the previous patch ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     
  • It now can have negative value to suppress the message entirely. So it
    needs to check it being positive.

    Signed-off-by: Namhyung Kim
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: kernel-team@lge.com
    Link: http://lkml.kernel.org/r/20170217081742.17417-3-namhyung@kernel.org
    [ Adjust fuzz on tools/perf/util/pmu.c, add > 0 checks in many other places ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

27 Jan, 2017

1 commit

  • Previously these were being ignored, sometimes silently.

    Stop doing that, emitting debug messages and handling the errors.

    Testing it:

    $ cat ~/.perfconfig
    cat: /home/acme/.perfconfig: No such file or directory
    $ perf stat -e cycles usleep 1

    Performance counter stats for 'usleep 1':

    938,996 cycles:u

    0.003813731 seconds time elapsed

    $ perf top --stdio
    Error:
    You may not have permission to collect system-wide stats.

    Consider tweaking /proc/sys/kernel/perf_event_paranoid,

    [ perf record: Captured and wrote 0.019 MB perf.data (7 samples) ]
    [acme@jouet linux]$ perf report --stdio
    # To display the perf.data header info, please use --header/--header-only options.
    # Overhead Command Shared Object Symbol
    # ........ ....... ................. .........................
    71.77% usleep libc-2.24.so [.] _dl_addr
    27.07% usleep ld-2.24.so [.] _dl_next_ld_env_entry
    1.13% usleep [kernel.kallsyms] [k] page_fault
    $
    $ touch ~/.perfconfig
    $ ls -la ~/.perfconfig
    -rw-rw-r--. 1 acme acme 0 Jan 27 12:14 /home/acme/.perfconfig
    $
    $ perf stat -e instructions usleep 1

    Performance counter stats for 'usleep 1':

    244,610 instructions:u

    0.000805383 seconds time elapsed

    $
    [root@jouet ~]# chown acme.acme ~/.perfconfig
    [root@jouet ~]# perf stat -e cycles usleep 1
    Warning: File /root/.perfconfig not owned by current user or root, ignoring it.

    Performance counter stats for 'usleep 1':

    937,615 cycles

    0.000836931 seconds time elapsed
    #

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-j2rq96so6xdqlr8p8rd6a3jx@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

16 Dec, 2016

1 commit


02 Dec, 2016

1 commit

  • 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: David Ahern
    Tested-by: Arnaldo Carvalho de Melo
    Acked-by: Namhyung Kim
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1480439746-42695-7-git-send-email-dsahern@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    David Ahern
     

15 Nov, 2016

1 commit

  • Create a new flag show_branchflag_count in symbol_conf. The flag is used
    to control if showing the branch flag counting information. The flag
    depends on if the perf.data has branch data and if user chooses the
    "branch-history" option in perf report command line.

    Signed-off-by: Yao Jin
    Acked-by: Andi Kleen
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Linux-kernel@vger.kernel.org
    Cc: Yao Jin
    Link: http://lkml.kernel.org/r/1477876794-30749-3-git-send-email-yao.jin@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jin Yao
     

24 Oct, 2016

1 commit

  • We already have handling for errors when processing PERF_RECORD_ events,
    so instead of calling die() when not being able to alloc, propagate the
    error, so that the normal UI exit sequence can take place, the user be
    warned and possibly the terminal be properly reset to a sane mode.

    Cc: Adrian Hunter
    Cc: Brice Goglin
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-r90je3c009a125dvs3525yge@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

14 Sep, 2016

1 commit

  • Now that all the missing pieces are implemented, let's enable it. An
    example output below:

    $ perf record -e '{cycles,instructions}' make
    $ perf report --hierarchy --stdio
    ...
    # Overhead Command / Shared Object / Symbol
    # ...................... ..................................
    #
    ...
    25.74% 27.18% sh
    19.96% 24.14% libc-2.24.so
    9.55% 14.64% [.] __strcmp_sse2
    1.54% 0.00% [.] __tfind
    1.07% 1.13% [.] _int_malloc
    0.95% 0.00% [.] __strchr_sse2
    0.89% 1.39% [.] __tsearch
    0.76% 0.00% [.] strlen
    ...

    Signed-off-by: Namhyung Kim
    Requested-by: Andi Kleen
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20160913074552.13284-8-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

30 Aug, 2016

1 commit

  • We need to initializa some fields (right now just a mutex) when we
    allocate the per symbol annotation struct, so do it at the symbol
    constructor instead of (ab)using the filter mechanism for that.

    This way we remove one of the few cases we have for that symbol filter,
    which will eventually led to removing it.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-cvz34avlz1lez888lob95390@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

24 Aug, 2016

1 commit


12 Jul, 2016

1 commit

  • 'perf report --stdio' will colorize entries with most hits and possibly
    some other aspects of its output, but those colors gets suppressed if we
    redirect the output to a non-tty, allow keeping the colors by adding a
    new option, --stdio-color, now this use case will also output escape
    sequences for colors:

    $ perf annotate --stdio-color | more

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-3iuawqjldu4i8gziot7e3d5n@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

23 Jun, 2016

2 commits

  • To match the semantics for list.h in the kernel, that are used to
    implement those macros.

    Cc: Adrian Hunter
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Milian Wolff
    Cc: Namhyung Kim
    Cc: Taeung Song
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-qbcjlgj0ffxquxscahbpddi3@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Lately util/config.h has been added but util/cache.h has declarations of
    functions and a global variable for config features.

    To manage codes about configuration at one spot, move them to
    util/config.h and let source files that need config features include
    config.h And if the source files that included previous cache.h need
    only config.h, remove including cache.h.

    Signed-off-by: Taeung Song
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1466672119-4852-2-git-send-email-treeze.taeung@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Taeung Song
     

15 Jun, 2016

1 commit

  • It will be convenient in following patches to display hists entries
    without callchains even if they are defined.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1465928361-2442-9-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

20 May, 2016

2 commits

  • This patch moves the reference of buildid dir to 'symfs/.debug' and
    skips the local buildid dir when '--symfs' is given, so that every
    single file opened by perf is relative to symfs directory now.

    Signed-off-by: He Kuang
    Acked-by: David Ahern
    Acked-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Ekaterina Tumanova
    Cc: Josh Poimboeuf
    Cc: Kan Liang
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: Pekka Enberg
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Sukadev Bhattiprolu
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1463658462-85131-2-git-send-email-hekuang@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    He Kuang
     
  • We cannot limit processing stacks from the current value of the sysctl,
    as we may be processing perf.data files, possibly from other machines.

    Instead use the old PERF_MAX_STACK_DEPTH, the sysctl default, that can
    be overriden using --max-stack or equivalent.

    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Alexei Starovoitov
    Cc: Brendan Gregg
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: He Kuang
    Cc: Jiri Olsa
    Cc: Masami Hiramatsu
    Cc: Milian Wolff
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Thomas Gleixner
    Cc: Vince Weaver
    Cc: Wang Nan
    Cc: Zefan Li
    Fixes: 4cb93446c587 ("perf tools: Set the maximum allowed stack from /proc/sys/kernel/perf_event_max_stack")
    Link: http://lkml.kernel.org/n/tip-eqeutsr7n7wy0c36z24ytvii@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

06 May, 2016

2 commits

  • Now we have sort dimensions private for struct hists, we need to make
    dimension booleans hists specific as well.

    Moving sort__has_parent into struct perf_hpp_list.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1462276488-26683-3-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Now we have sort dimensions private for struct hists, we need to make
    dimension booleans hists specific as well.

    Moving sort__need_collapse into struct perf_hpp_list.

    Adding hists__has macro to easily access this info perf struct hists
    object.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1462276488-26683-2-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

27 Apr, 2016

1 commit

  • There is an upper limit to what tooling considers a valid callchain,
    and it was tied to the hardcoded value in the kernel,
    PERF_MAX_STACK_DEPTH (127), now that this can be tuned via a sysctl,
    make it read it and use that as the upper limit, falling back to
    PERF_MAX_STACK_DEPTH for kernels where this sysctl isn't present.

    Cc: Adrian Hunter
    Cc: Brendan Gregg
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Milian Wolff
    Cc: Namhyung Kim
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-yjqsd30nnkogvj5oyx9ghir9@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

18 Apr, 2016

1 commit


24 Mar, 2016

1 commit


23 Mar, 2016

1 commit

  • Since we only deal with fields in the passed struct perf_sample move
    this method to struct machine, that is where the perf_sample fields
    will be resolved to a struct addr_location, i.e. thread, map, symbol,
    etc.

    Cc: Adrian Hunter
    Cc: Hemant Kumar
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Naveen N. Rao
    Cc: Ravi Bangoria
    Cc: Wang Nan
    Link: http://lkml.kernel.org/n/tip-a1ww2lbm2vbuqsv4p7ilubu9@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

27 Feb, 2016

1 commit

  • Before this patch each subcommand calls perf_config() by themself,
    reading the default configuration together with subcommand specific
    options. If a subcommand doesn't have it own options, it needs to call
    'perf_config(perf_default_config, NULL)' to ensure .perfconfig is
    loaded.

    This patch brings perf_config(perf_default_config, NULL) to the very
    start of main(), so subcommands don't need to do it.

    After this patch, 'llvm.clang-path' works for 'perf trace'.

    Signed-off-by: Wang Nan
    Suggested-and-Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexei Starovoitov
    Cc: Jiri Olsa
    Cc: Li Zefan
    Cc: Masami Hiramatsu
    Cc: Namhyung Kim
    Cc: pi3orama@163.com
    Link: http://lkml.kernel.org/r/1456479154-136027-4-git-send-email-wangnan0@huawei.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Wang Nan
     

25 Feb, 2016

1 commit

  • The --hierarchy option is to show output in hierarchy mode. It extends
    folding/unfolding in the TUI and GTK browsers to support sort items as
    well as callchains. Users can toggle the items to see the performance
    result at wanted level.

    $ perf report --hierarchy --tui
    Overhead Command / Shared Object / Symbol
    --------------------------------------------------
    + 32.96% gnome-shell
    - 15.11% swapper
    - 14.97% [kernel.vmlinux]
    6.82% [k] intel_idle
    0.66% [k] menu_select
    0.43% [k] __hrtimer_start_range_ns
    ...

    Signed-off-by: Namhyung Kim
    Acked-by: Pekka Enberg
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1456326830-30456-17-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

20 Feb, 2016

1 commit

  • If it returns an error, warn user and bail out instead of silently
    ignoring it.

    Signed-off-by: Namhyung Kim
    Acked-by: Jiri Olsa
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1455631723-17345-9-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

03 Feb, 2016

2 commits

  • The ui initialization changes hpp format callbacks, based on the used
    browser. Thus we need this init being processed before setup_sorting.

    Signed-off-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1453109064-1026-9-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Adding evsel specific function to sort hists_evsel based hists. The
    hists__output_resort can be now used to sort common hists object.

    Signed-off-by: Jiri Olsa
    Cc: David Ahern
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/1453109064-1026-3-git-send-email-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

02 Feb, 2016

1 commit

  • Currently --percent-limit option only works for hist entries. However
    it'd be better to have same effect to callchains as well

    Requested-by: Andi Kleen
    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1453909257-26015-4-git-send-email-namhyung@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

12 Jan, 2016

1 commit

  • Some people don't install perf, but just use compiled version in the
    source. Fallback to lookup the source directory for those poor guys. :)

    Signed-off-by: Namhyung Kim
    Cc: Andi Kleen
    Cc: David Ahern
    Cc: Jiri Olsa
    Cc: Peter Zijlstra
    Cc: Wang Nan
    Link: http://lkml.kernel.org/r/1452334589-8782-4-git-send-email-namhyung@kernel.org
    [ Make perf_tip() return NULL for ENOENT, making the fallback to really take place ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim