21 Aug, 2020

1 commit

  • When I execute 'perf top' without HAVE_LIBBPF_SUPPORT, there exists the
    following segmentation fault, skip the side-band event setup to fix it,
    this is similar with commit 1101c872c8c7 ("perf record: Skip side-band
    event setup if HAVE_LIBBPF_SUPPORT is not set").

    [yangtiezhu@linux perf]$ ./perf top

    perf: Segmentation fault
    Obtained 6 stack frames.
    ./perf(sighandler_dump_stack+0x5c) [0x12011b604]
    [0xffffffc010]
    ./perf(perf_mmap__read_init+0x3e) [0x1201feeae]
    ./perf() [0x1200d715c]
    /lib64/libpthread.so.0(+0xab9c) [0xffee10ab9c]
    /lib64/libc.so.6(+0x128f4c) [0xffedc08f4c]
    Segmentation fault
    [yangtiezhu@linux perf]$

    I use git bisect to find commit b38d85ef49cf ("perf bpf: Decouple
    creating the evlist from adding the SB event") is the first bad commit,
    so also add the Fixes tag.

    Committer testing:

    First build perf explicitely disabling libbpf:

    $ make NO_LIBBPF=1 O=/tmp/build/perf -C tools/perf install-bin && perf test python

    Now make sure it isn't linked:

    $ perf -vv | grep -w bpf
    bpf: [ OFF ] # HAVE_LIBBPF_SUPPORT
    $
    $ nm ~/bin/perf | grep libbpf
    $

    And now try to run 'perf top':

    # perf top
    perf: Segmentation fault
    -------- backtrace --------
    perf[0x5bcd6d]
    /lib64/libc.so.6(+0x3ca6f)[0x7fd0f5a66a6f]
    perf(perf_mmap__read_init+0x1e)[0x5e1afe]
    perf[0x4cc468]
    /lib64/libpthread.so.0(+0x9431)[0x7fd0f645a431]
    /lib64/libc.so.6(clone+0x42)[0x7fd0f5b2b912]
    #

    Applying this patch fixes the issue.

    Fixes: b38d85ef49cf ("perf bpf: Decouple creating the evlist from adding the SB event")
    Signed-off-by: Tiezhu Yang
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Mark Rutland
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Xuefeng Li
    Link: http://lore.kernel.org/lkml/1597753837-16222-1-git-send-email-yangtiezhu@loongson.cn
    Signed-off-by: Arnaldo Carvalho de Melo

    Tiezhu Yang
     

23 Jun, 2020

1 commit


30 May, 2020

1 commit

  • This patch links perf with the libpfm4 library if it is available and
    LIBPFM4 is passed to the build. The libpfm4 library contains hardware
    event tables for all processors supported by perf_events. It is a helper
    library that helps convert from a symbolic event name to the event
    encoding required by the underlying kernel interface. This library is
    open-source and available from: http://perfmon2.sf.net.

    With this patch, it is possible to specify full hardware events by name.
    Hardware filters are also supported. Events must be specified via the
    --pfm-events and not -e option. Both options are active at the same time
    and it is possible to mix and match:

    $ perf stat --pfm-events inst_retired:any_p:c=1:i -e cycles ....

    One needs to explicitely ask for its inclusion by using the LIBPFM4 make
    command line option, ie its opt-in rather than opt-out of feature
    detection and build support.

    Signed-off-by: Stephane Eranian
    Reviewed-by: Ian Rogers
    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Alexei Starovoitov
    Cc: Alexey Budankov
    Cc: Andi Kleen
    Cc: Andrii Nakryiko
    Cc: Daniel Borkmann
    Cc: Florian Fainelli
    Cc: Greg Kroah-Hartman
    Cc: Igor Lubashev
    Cc: Jin Yao
    Cc: Jiri Olsa
    Cc: Jiwei Sun
    Cc: John Garry
    Cc: Kan Liang
    Cc: Leo Yan
    Cc: Mark Rutland
    Cc: Martin KaFai Lau
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: Yonghong Song
    Cc: bpf@vger.kernel.org
    Cc: netdev@vger.kernel.org
    Cc: yuzhoujian
    Link: http://lore.kernel.org/lkml/20200505182943.218248-2-irogers@google.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     

28 May, 2020

2 commits


06 May, 2020

6 commits


18 Apr, 2020

1 commit

  • With the LBR stitching approach, the reconstructed LBR call stack
    can break the HW limitation. However, it may reconstruct invalid call
    stacks in some cases, e.g. exception handing such as setjmp/longjmp.
    Also, it may impact the processing time especially when the number of
    samples with stitched LBRs are huge.

    Add an option to enable the approach.
    The option must be used with --call-graph lbr.

    Signed-off-by: Kan Liang
    Reviewed-by: Andi Kleen
    Acked-by: Jiri Olsa
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Adrian Hunter
    Cc: Alexey Budankov
    Cc: Mathieu Poirier
    Cc: Michael Ellerman
    Cc: Namhyung Kim
    Cc: Pavel Gerasimov
    Cc: Peter Zijlstra
    Cc: Ravi Bangoria
    Cc: Stephane Eranian
    Cc: Vitaly Slobodskoy
    Link: http://lore.kernel.org/lkml/20200319202517.23423-16-kan.liang@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Kan Liang
     

03 Apr, 2020

3 commits

  • It would be nice if we can use a hotkey in perf top browser to select a
    event for sorting.

    For example:

    perf top --group -e cycles,instructions,cache-misses

    Samples
    Overhead Shared Object Symbol
    40.03% 45.71% 0.03% div [.] main
    20.46% 14.67% 0.21% libc-2.27.so [.] __random_r
    20.01% 19.54% 0.02% libc-2.27.so [.] __random
    9.68% 10.68% 0.00% div [.] compute_flag
    4.32% 4.70% 0.00% libc-2.27.so [.] rand
    3.84% 3.43% 0.00% div [.] rand@plt
    0.05% 0.05% 2.33% libc-2.27.so [.] __strcmp_sse2_unaligned
    0.04% 0.08% 2.43% perf [.] perf_hpp__is_dynamic_en
    0.04% 0.02% 6.64% perf [.] rb_next
    0.04% 0.01% 3.87% perf [.] dso__find_symbol
    0.04% 0.04% 1.77% perf [.] sort__dso_cmp

    When user press hotkey '2' (event index, starting from 0), it indicates
    to sort output by the third event in group (cache-misses).

    Samples
    Overhead Shared Object Symbol
    4.07% 1.28% 6.68% perf [.] rb_next
    3.57% 3.98% 4.11% perf [.] __hists__insert_output
    3.67% 11.24% 3.60% perf [.] perf_hpp__is_dynamic_e
    3.67% 3.20% 3.20% perf [.] hpp__sort_overhead
    0.81% 0.06% 3.01% perf [.] dso__find_symbol
    1.62% 5.47% 2.51% perf [.] hists__match
    2.70% 1.86% 2.47% libc-2.27.so [.] _int_malloc
    0.19% 0.00% 2.29% [kernel] [k] copy_page
    0.41% 0.32% 1.98% perf [.] hists__decay_entries
    1.84% 3.67% 1.68% perf [.] sort__dso_cmp
    0.16% 0.00% 1.63% [kernel] [k] clear_page_erms

    Now the output is sorted by cache-misses.

    v2:
    ---
    Zero the history if hotkey is pressed.

    Signed-off-by: Jin Yao
    Suggested-by: Arnaldo Carvalho de Melo
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Jin Yao
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20200324220711.6025-2-yao.jin@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jin Yao
     
  • 'perf report' supports the option --group-sort-idx, which sorts the
    output by the event at the index n in event group.

    For example:

    perf record -e cycles,instructions,cache-misses
    perf report --group --group-sort-idx 2 --stdio

    The perf-report output is sorted by cache-misses.

    This patch supports --group-sort-idx in perf-top.

    For example:

    perf top --group -e cycles,instructions,cache-misses --group-sort-idx 2

    The perf-top output is sorted by cache-misses.

    Signed-off-by: Jin Yao
    Suggested-by: Arnaldo Carvalho de Melo
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Jin Yao
    Cc: Jiri Olsa
    Cc: Kan Liang
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20200324220711.6025-1-yao.jin@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jin Yao
     
  • The --all-cgroups option is to enable cgroup profiling support. It
    tells kernel to record CGROUP events in the ring buffer so that 'perf
    top' can identify task/cgroup association later.

    Committer testing:

    Use:

    # perf top --all-cgroups -s cgroup_id,cgroup,pid

    Signed-off-by: Namhyung Kim
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Mark Rutland
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20200325124536.2800725-9-namhyung@kernel.org
    Link: http://lore.kernel.org/lkml/20200402015249.3800462-1-namhyung@kernel.org
    [ Extracted the HAVE_FILE_HANDLE from the followup patch ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Namhyung Kim
     

06 Mar, 2020

1 commit

  • Since glibc 2.28 when running 'perf top --stdio', input handling no
    longer works, but hitting any key always just prints the "Mapped keys"
    help text.

    To fix it, call clearerr() in the display_thread() loop to clear any EOF
    sticky errors, as instructed in the glibc NEWS file
    (https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS):

    * All stdio functions now treat end-of-file as a sticky condition. If you
    read from a file until EOF, and then the file is enlarged by another
    process, you must call clearerr or another function with the same effect
    (e.g. fseek, rewind) before you can read the additional data. This
    corrects a longstanding C99 conformance bug. It is most likely to affect
    programs that use stdio to read interactive input from a terminal.
    (Bug #1190.)

    Signed-off-by: Tommi Rantala
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Alexander Shishkin
    Cc: Jiri Olsa
    Cc: Mark Rutland
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20200305083714.9381-2-tommi.t.rantala@nokia.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Tommi Rantala
     

27 Feb, 2020

2 commits

  • privsize is passed as 0 from all the symbol__annotate() callers.
    Remove it from argument list.

    Signed-off-by: Ravi Bangoria
    Acked-by: Jiri Olsa
    Cc: Ian Rogers
    Cc: Jin Yao
    Cc: Namhyung Kim
    Cc: Song Liu
    Link: http://lore.kernel.org/lkml/20200204045233.474937-2-ravi.bangoria@linux.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ravi Bangoria
     
  • perf default config set by user in [annotate] section is totally ignored
    by annotate code. Fix it.

    Before:

    $ ./perf config
    annotate.hide_src_code=true
    annotate.show_nr_jumps=true
    annotate.show_nr_samples=true

    $ ./perf annotate shash
    │ unsigned h = 0;
    │ movl $0x0,-0xc(%rbp)
    │ while (*s)
    │ ↓ jmp 44
    │ h = 65599 * h + *s++;
    11.33 │24: mov -0xc(%rbp),%eax
    43.50 │ imul $0x1003f,%eax,%ecx
    │ mov -0x18(%rbp),%rax

    After:

    │ movl $0x0,-0xc(%rbp)
    │ ↓ jmp 44
    1 │1 24: mov -0xc(%rbp),%eax
    4 │ imul $0x1003f,%eax,%ecx
    │ mov -0x18(%rbp),%rax

    Note that we have removed show_nr_samples and show_total_period from
    annotation_options because they are not used. Instead of them we use
    symbol_conf.show_nr_samples and symbol_conf.show_total_period.

    Committer testing:

    Using 'perf annotate --stdio2' to use the TUI rendering but emitting the output to stdio:

    # perf config
    #
    # perf config annotate.hide_src_code=true
    # perf config
    annotate.hide_src_code=true
    #
    # perf config annotate.show_nr_jumps=true
    # perf config annotate.show_nr_samples=true
    # perf config
    annotate.hide_src_code=true
    annotate.show_nr_jumps=true
    annotate.show_nr_samples=true
    #
    #

    Before:

    # perf annotate --stdio2 ObjectInstance::weak_pointer_was_finalized
    Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period]
    ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0
    Percent
    00000000000609f0 :
    endbr64
    cmpq $0x0,0x20(%rdi)
    ↓ je 10
    xor %eax,%eax
    ← retq
    xchg %ax,%ax
    100.00 10: push %rbp
    cmpq $0x0,0x18(%rdi)
    mov %rdi,%rbp
    ↓ jne 20
    1b: xor %eax,%eax
    pop %rbp
    ← retq
    nop
    20: lea 0x18(%rdi),%rdi
    → callq JS_UpdateWeakPointerAfterGC(JS::Heap /dev/null
    Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period]
    ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0
    Samples endbr64
    cmpq $0x0,0x20(%rdi)
    ↓ je 10
    xor %eax,%eax
    ← retq
    xchg %ax,%ax
    1 1 10: push %rbp
    cmpq $0x0,0x18(%rdi)
    mov %rdi,%rbp
    ↓ jne 20
    1 1b: xor %eax,%eax
    pop %rbp
    ← retq
    nop
    1 20: lea 0x18(%rdi),%rdi
    → callq JS_UpdateWeakPointerAfterGC(JS::Heap /dev/null
    Samples: 1 of event 'cycles', 4000 Hz, Event count (approx.): 830873, [percent: local period]
    ObjectInstance::weak_pointer_was_finalized() /usr/lib64/libgjs.so.0.0.0
    Samples endbr64
    cmpq $0x0,0x20(%rdi)
    ↓ je 10
    xor %eax,%eax
    ← retq
    xchg %ax,%ax
    1 10: push %rbp
    cmpq $0x0,0x18(%rdi)
    mov %rdi,%rbp
    ↓ jne 20
    1b: xor %eax,%eax
    pop %rbp
    ← retq
    nop
    20: lea 0x18(%rdi),%rdi
    → callq JS_UpdateWeakPointerAfterGC(JS::Heap
    Tested-by: Arnaldo Carvalho de Melo
    Cc: Adrian Hunter
    Cc: Alexey Budankov
    Cc: Changbin Du
    Cc: Ian Rogers
    Cc: Jin Yao
    Cc: Jiri Olsa
    Cc: Leo Yan
    Cc: Namhyung Kim
    Cc: Song Liu
    Cc: Taeung Song
    Cc: Thomas Richter
    Cc: Yisheng Xie
    Link: http://lore.kernel.org/lkml/20200213064306.160480-6-ravi.bangoria@linux.ibm.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Ravi Bangoria
     

14 Jan, 2020

1 commit

  • The objdump utility has useful --prefix / --prefix-strip options to
    allow changing source code file names hardcoded into executables' debug
    info. Add options to 'perf report', 'perf top' and 'perf annotate',
    which are then passed to objdump.

    $ mkdir foo
    $ echo 'main() { for (;;); }' > foo/foo.c
    $ gcc -g foo/foo.c
    foo/foo.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    1 | main() { for (;;); }
    | ^~~~
    $ perf record ./a.out
    ^C[ perf record: Woken up 1 times to write data ]
    [ perf record: Captured and wrote 0.230 MB perf.data (5721 samples) ]
    $ mv foo bar
    $ perf annotate

    $ perf annotate --prefix=/home/ak/lsrc/git/bar --prefix-strip=5

    Signed-off-by: Andi Kleen
    Tested-by: Jiri Olsa
    LPU-Reference: 20200107210444.214071-1-andi@firstfloor.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

11 Dec, 2019

1 commit

  • 'perf top' stopped working on hw architectures that do not provide a
    get_cpuid() implementation and thus fallback to the weak get_cpuid()
    default function.

    This is done because at annotation time we may need it in the arch
    specific annotation init routine, but that is only being used by arches
    that do provide a get_cpuid() implementation:

    $ find tools/ -name "*.[ch]" | xargs grep 'evlist->env'
    tools/perf/builtin-top.c: top.evlist->env = &perf_env;
    tools/perf/util/evsel.c: return evsel->evlist->env;
    tools/perf/util/s390-cpumsf.c: sf->machine_type = s390_cpumsf_get_type(session->evlist->env->cpuid);
    tools/perf/util/header.c: session->evlist->env = &header->env;
    tools/perf/util/sample-raw.c: const char *arch_pf = perf_env__arch(evlist->env);
    $

    $ find tools/perf/arch -name "*.[ch]" | xargs grep -w get_cpuid
    tools/perf/arch/x86/util/auxtrace.c: ret = get_cpuid(buffer, sizeof(buffer));
    tools/perf/arch/x86/util/header.c:get_cpuid(char *buffer, size_t sz)
    tools/perf/arch/powerpc/util/header.c:get_cpuid(char *buffer, size_t sz)
    tools/perf/arch/s390/util/header.c: * Implementation of get_cpuid().
    tools/perf/arch/s390/util/header.c:int get_cpuid(char *buffer, size_t sz)
    tools/perf/arch/s390/util/header.c: if (buf && get_cpuid(buf, 128))
    $

    For 'report' or 'script', i.e. tools working on perf.data files, that is
    setup while reading the header, its just top that needs to explicitely
    read it at tool start.

    Fixes: 608127f73779 ("perf top: Initialize perf_env->cpuid, needed by the per arch annotation init routine")
    Reported-by: John Garry
    Analysed-by: Jiri Olsa
    Reviewed-by: Mark Rutland
    Tested-by: Mark Rutland
    Tested-by: John Garry # arm64
    Acked-by: Jiri Olsa
    Cc: Adrian Hunter
    Cc: Namhyung Kim
    Cc: Will Deacon
    Link: https://lkml.kernel.org/n/tip-lxwjr0cd2eggzx04a780ffrv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

12 Nov, 2019

1 commit


07 Nov, 2019

1 commit

  • We can get the per sample cycles by hist__account_cycles(). It's also
    useful to know the total cycles of all samples in order to get the
    cycles coverage for a single program block in further. For example:

    coverage = per block sampled cycles / total sampled cycles

    This patch creates a new argument 'total_cycles' in hist__account_cycles(),
    which will be added with the cycles of each sample.

    Signed-off-by: Jin Yao
    Reviewed-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Andi Kleen
    Cc: Jin Yao
    Cc: Kan Liang
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20191107074719.26139-4-yao.jin@linux.intel.com
    Signed-off-by: Arnaldo Carvalho de Melo

    Jin Yao
     

10 Oct, 2019

4 commits

  • Move perf_mmap__read_event() from tools/perf to libperf and export it in
    the perf/mmap.h header.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20191007125344.14268-13-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Move perf_mmap__read_init() from tools/perf to libperf and export it in
    the perf/mmap.h header.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20191007125344.14268-12-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Move perf_mmap__read_init() from tools/perf to libperf and export it in
    perf/mmap.h header.

    And add pr_debug2()/pr_debug3() macros support, because the code is
    using them.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20191007125344.14268-11-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Move perf_mmap__consume() vrom tools/perf to libperf and export it in
    the perf/mmap.h header.

    Move also the needed helpers perf_mmap__write_tail(),
    perf_mmap__read_head() and perf_mmap__empty().

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20191007125344.14268-10-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

07 Oct, 2019

1 commit


26 Sep, 2019

1 commit


25 Sep, 2019

6 commits

  • Move perf_evlist__poll() from tools/perf to libperf, it will be used in
    the following patches.

    And rename the existing perf's function to evlist__poll().

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20190913132355.21634-39-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Add perf_evlist__first()/last() functions to libperf, as internal
    functions and rename perf's origins to evlist__first/last.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20190913132355.21634-29-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Moving 'nr_mmaps' from 'struct evlist' to 'struct perf_evlist', it will
    be used in following patches.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20190913132355.21634-21-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • As this isn't used at all in mmap.h but in evlist.h, so to cut down the
    header dependency tree, move it to where it is used.

    Also add mmap.h to the places using it but previously getting it
    indirectly via evlist.h.

    Add missing pthread.h to evlist.h, as it has a pthread_t struct member
    and was getting the header via mmap.h.

    Noticed while processing a Jiri's libperf batch touching mmap.h, where
    almost everything gets rebuilt because evlist.h is so popular, so cut
    down't this rebuild the world party.

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Cc: Song Liu
    Link: https://lkml.kernel.org/n/tip-he0uljeftl0xfveh3d6vtode@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Rename perf_evlist__mmap() to evlist__mmap(), so we don't have a name
    clash when we add perf_evlist__mmap() in libperf.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20190913132355.21634-5-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • Rename 'struct perf_evlist' to 'struct evlist', so we don't have a name
    clash when we add 'struct perf_mmap' to libperf.

    Signed-off-by: Jiri Olsa
    Cc: Alexander Shishkin
    Cc: Michael Petlan
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Link: http://lore.kernel.org/lkml/20190913132355.21634-4-jolsa@kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     

21 Sep, 2019

1 commit

  • This patch is to return error code of perf_new_session function on
    failure instead of NULL.

    Test Results:

    Before Fix:

    $ perf c2c report -input
    failed to open nput: No such file or directory

    $ echo $?
    0
    $

    After Fix:

    $ perf c2c report -input
    failed to open nput: No such file or directory

    $ echo $?
    254
    $

    Committer notes:

    Fix 'perf tests topology' case, where we use that TEST_ASSERT_VAL(...,
    session), i.e. we need to pass zero in case of failure, which was the
    case before when NULL was returned by perf_session__new() for failure,
    but now we need to negate the result of IS_ERR(session) to respect that
    TEST_ASSERT_VAL) expectation of zero meaning failure.

    Reported-by: Nageswara R Sastry
    Signed-off-by: Mamatha Inamdar
    Tested-by: Arnaldo Carvalho de Melo
    Tested-by: Nageswara R Sastry
    Acked-by: Ravi Bangoria
    Reviewed-by: Jiri Olsa
    Reviewed-by: Mukesh Ojha
    Cc: Adrian Hunter
    Cc: Alexander Shishkin
    Cc: Alexey Budankov
    Cc: Greg Kroah-Hartman
    Cc: Jeremie Galarneau
    Cc: Kate Stewart
    Cc: Namhyung Kim
    Cc: Peter Zijlstra
    Cc: Shawn Landden
    Cc: Song Liu
    Cc: Thomas Gleixner
    Cc: Tzvetomir Stoyanov
    Link: http://lore.kernel.org/lkml/20190822071223.17892.45782.stgit@localhost.localdomain
    Signed-off-by: Arnaldo Carvalho de Melo

    Mamatha Inamdar
     

20 Sep, 2019

1 commit

  • Those are the only routines using the perf_event__handler_t typedef and
    are all related, so move to a separate header to reduce the header
    dependency tree, lots of places were getting event.h and even stdio.h,
    limits.h indirectly, so fix those as well.

    Cc: Adrian Hunter
    Cc: Jiri Olsa
    Cc: Namhyung Kim
    Link: https://lkml.kernel.org/n/tip-yvx9u1mf7baq6cu1abfhbqgs@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

01 Sep, 2019

4 commits