1. 07 11月, 2019 4 次提交
  2. 20 9月, 2019 1 次提交
  3. 01 9月, 2019 4 次提交
  4. 29 8月, 2019 1 次提交
  5. 09 8月, 2019 1 次提交
    • T
      perf annotate: Fix s390 gap between kernel end and module start · b9c0a649
      Thomas Richter 提交于
      During execution of command 'perf top' the error message:
      
         Not enough memory for annotating '__irf_end' symbol!)
      
      is emitted from this call sequence:
        __cmd_top
          perf_top__mmap_read
            perf_top__mmap_read_idx
              perf_event__process_sample
                hist_entry_iter__add
                  hist_iter__top_callback
                    perf_top__record_precise_ip
                      hist_entry__inc_addr_samples
                        symbol__inc_addr_samples
                          symbol__get_annotation
                            symbol__alloc_hist
      
      In this function the size of symbol __irf_end is calculated. The size of
      a symbol is the difference between its start and end address.
      
      When the symbol was read the first time, its start and end was set to:
      
         symbol__new: __irf_end 0xe954d0-0xe954d0
      
      which is correct and maps with /proc/kallsyms:
      
         root@s8360046:~/linux-4.15.0/tools/perf# fgrep _irf_end /proc/kallsyms
         0000000000e954d0 t __irf_end
         root@s8360046:~/linux-4.15.0/tools/perf#
      
      In function symbol__alloc_hist() the end of symbol __irf_end is
      
        symbol__alloc_hist sym:__irf_end start:0xe954d0 end:0x3ff80045a8
      
      which is identical with the first module entry in /proc/kallsyms
      
      This results in a symbol size of __irf_req for histogram analyses of
      70334140059072 bytes and a malloc() for this requested size fails.
      
      The root cause of this is function
        __dso__load_kallsyms()
        +-> symbols__fixup_end()
      
      Function symbols__fixup_end() enlarges the last symbol in the kallsyms
      map:
      
         # fgrep __irf_end /proc/kallsyms
         0000000000e954d0 t __irf_end
         #
      
      to the start address of the first module:
         # cat /proc/kallsyms | sort  | egrep ' [tT] '
         ....
         0000000000e952d0 T __security_initcall_end
         0000000000e954d0 T __initramfs_size
         0000000000e954d0 t __irf_end
         000003ff800045a8 T fc_get_event_number       [scsi_transport_fc]
         000003ff800045d0 t store_fc_vport_disable    [scsi_transport_fc]
         000003ff800046a8 T scsi_is_fc_rport  [scsi_transport_fc]
         000003ff800046d0 t fc_target_setup   [scsi_transport_fc]
      
      On s390 the kernel is located around memory address 0x200, 0x10000 or
      0x100000, depending on linux version. Modules however start some- where
      around 0x3ff xxxx xxxx.
      
      This is different than x86 and produces a large gap for which histogram
      allocation fails.
      
      Fix this by detecting the kernel's last symbol and do no adjustment for
      it. Introduce a weak function and handle s390 specifics.
      Reported-by: NKlaus Theurich <klaus.theurich@de.ibm.com>
      Signed-off-by: NThomas Richter <tmricht@linux.ibm.com>
      Acked-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
      Cc: Vasily Gorbik <gor@linux.ibm.com>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/20190724122703.3996-2-tmricht@linux.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b9c0a649
  6. 09 7月, 2019 1 次提交
  7. 02 7月, 2019 1 次提交
  8. 26 6月, 2019 1 次提交
    • A
      tools perf: Move from sane_ctype.h obtained from git to the Linux's original · 3052ba56
      Arnaldo Carvalho de Melo 提交于
      We got the sane_ctype.h headers from git and kept using it so far, but
      since that code originally came from the kernel sources to the git
      sources, perhaps its better to just use the one in the kernel, so that
      we can leverage tools/perf/check_headers.sh to be notified when our copy
      gets out of sync, i.e. when fixes or goodies are added to the code we've
      copied.
      
      This will help with things like tools/lib/string.c where we want to have
      more things in common with the kernel, such as strim(), skip_spaces(),
      etc so as to go on removing the things that we have in tools/perf/util/
      and instead using the code in the kernel, indirectly and removing things
      like EXPORT_SYMBOL(), etc, getting notified when fixes and improvements
      are made to the original code.
      
      Hopefully this also should help with reducing the difference of code
      hosted in tools/ to the one in the kernel proper.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: https://lkml.kernel.org/n/tip-7k9868l713wqtgo01xxygn12@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3052ba56
  9. 29 5月, 2019 2 次提交
  10. 20 3月, 2019 1 次提交
    • S
      perf symbols: Introduce DSO_BINARY_TYPE__BPF_PROG_INFO · 9b86d04d
      Song Liu 提交于
      Introduce a new dso type DSO_BINARY_TYPE__BPF_PROG_INFO for BPF programs. In
      symbol__disassemble(), DSO_BINARY_TYPE__BPF_PROG_INFO dso will call into a new
      function symbol__disassemble_bpf() in an upcoming patch, where annotation line
      information is filled based bpf_prog_info and btf saved in given perf_env.
      
      Committer notes:
      
      Removed the unnamed union with 'bpf_prog' and 'cache' in 'struct dso',
      to fix this bug when exiting 'perf top':
      
        # perf top
        perf: Segmentation fault
        -------- backtrace --------
        perf[0x5a785a]
        /lib64/libc.so.6(+0x385bf)[0x7fd68443c5bf]
        perf(rb_first+0x2b)[0x4d6eeb]
        perf(dso__delete+0xb7)[0x4dffb7]
        perf[0x4f9e37]
        perf(perf_session__delete+0x64)[0x504df4]
        perf(cmd_top+0x1957)[0x454467]
        perf[0x4aad18]
        perf(main+0x61c)[0x42ec7c]
        /lib64/libc.so.6(__libc_start_main+0xf2)[0x7fd684428412]
        perf(_start+0x2d)[0x42eead]
        #
        # addr2line -fe ~/bin/perf 0x4dffb7
        dso_cache__free
        /home/acme/git/perf/tools/perf/util/dso.c:713
      
      That is trying to access the dso->data.cache, and that is not used with
      BPF programs, so we end up accessing what is in bpf_prog.first_member,
      b00m.
      Signed-off-by: NSong Liu <songliubraving@fb.com>
      Reviewed-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stanislav Fomichev <sdf@google.com>
      Cc: kernel-team@fb.com
      Link: http://lkml.kernel.org/r/20190312053051.2690567-13-songliubraving@fb.com
      [ split from a larger patch ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9b86d04d
  11. 12 3月, 2019 1 次提交
    • A
      perf report: Implement browsing of individual samples · 4968ac8f
      Andi Kleen 提交于
      Now 'perf report' can show whole time periods with 'perf script', but
      the user still has to find individual samples of interest manually.
      
      It would be expensive and complicated to search for the right samples in
      the whole perf file. Typically users only need to look at a small number
      of samples for useful analysis.
      
      Also the full scripts tend to show samples of all CPUs and all threads
      mixed up, which can be very confusing on larger systems.
      
      Add a new --samples option to save a small random number of samples per
      hist entry.
      
      Use a reservoir sample technique to select a representatve number of
      samples.
      
      Then allow browsing the samples using 'perf script' as part of the hist
      entry context menu. This automatically adds the right filters, so only
      the thread or cpu of the sample is displayed. Then we use less' search
      functionality to directly jump the to the time stamp of the selected
      sample.
      
      It uses different menus for assembler and source display.  Assembler
      needs xed installed and source needs debuginfo.
      
      Currently it only supports as many samples as fit on the screen due to
      some limitations in the slang ui code.
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Link: http://lkml.kernel.org/r/20190311174605.GA29294@tassilo.jf.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4968ac8f
  12. 11 3月, 2019 2 次提交
  13. 06 2月, 2019 2 次提交
  14. 25 1月, 2019 1 次提交
  15. 10 1月, 2019 1 次提交
  16. 19 12月, 2018 1 次提交
  17. 22 11月, 2018 1 次提交
  18. 06 6月, 2018 1 次提交
    • A
      perf symbols: Add BSS symbols when reading from /proc/kallsyms · 2be732c0
      Arnaldo Carvalho de Melo 提交于
      We were not considering 'B' and 'b' (BSS, uninitialized data objects,
      that gets set to zero at program start), do it so that we can resolve
      more symbols in tools doing resolution of data operands, like 'perf c2c'.
      
      When using vmlinux, i.e. an ELF symbol table, those were already
      considered, as the decision was about STT_FUNC or STT_OBJECT, and the
      later covers BSS symbols.
      
        # grep -i ' b ' /proc/kallsyms  | head -20 | tail -5
        ffffffffa789d030 b execute_command
        ffffffffa789d038 b initcall_command_line
        ffffffffa789d040 b static_command_line
        ffffffffa789d048 B ROOT_DEV
        ffffffffa789d050 b once.73786
        #
        # readelf -s /lib/modules/`uname -r`/build/vmlinux | grep ROOT_DEV
        79219: ffffffff8289d048     4 OBJECT  GLOBAL DEFAULT   58 ROOT_DEV
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-z960xobig39ca1pmp5brl2fr@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2be732c0
  19. 04 6月, 2018 1 次提交
  20. 23 5月, 2018 1 次提交
  21. 22 5月, 2018 3 次提交
  22. 16 5月, 2018 1 次提交
  23. 28 4月, 2018 3 次提交
  24. 27 4月, 2018 4 次提交