mainlining shenanigans
Go to file
Ingo Molnar 56b2147f34 perf/core improvements and fixes:
perf report:
 
   Jin Yao:
 
   - Introduce --total-cycles, for basic block profiling, further using data
     obtained from LBR, an example should suffice:
 
       # perf record -b
       ^C[ perf record: Woken up 595 times to write data ]
       [ perf record: Captured and wrote 156.672 MB perf.data (196873 samples) ]
 
       # perf evlist -v
       cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CPU|PERIOD|BRANCH_STACK, read_format: ID, 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, ksymbol: 1, bpf_event: 1, branch_sample_type: ANY
 
       # perf report --total-cycles --stdio
       # To display the perf.data header info, please use --header/--header-only options.
       #
       # Total Lost Samples: 0
       #
       # Samples: 6M of event 'cycles'
       # Event count (approx.): 6299936
       #
       # Sampled  Sampled   Avg     Avg
       # Cycles%  Cycles  Cycles%  Cycles                 [Program Block Range]     Shared Object
       # .......  ......  .......  .....   ....................................  ................
       #
          2.17%     1.7M   0.08%     607       [compiler.h:199 -> common.c:221]  [kernel.vmlinux]
          0.72%   544.5K   0.03%     230     [entry_64.S:657 -> entry_64.S:662]  [kernel.vmlinux]
          0.56%   541.8K   0.09%     672       [compiler.h:199 -> common.c:300]  [kernel.vmlinux]
          0.39%   293.2K   0.01%     104   [list_debug.c:43 -> list_debug.c:61]  [kernel.vmlinux]
          0.36%   278.6K   0.03%     272   [entry_64.S:1289 -> entry_64.S:1308]  [kernel.vmlinux]
 
 perf record:
 
   Adrian Hunter:
 
   - Allow storing perf.data in a directory together with a copy of /proc/kcore.
 
   Jiwei Sun:
 
   - Add support for limit perf output file size, i.e.:
 
     # perf record --all-cpus -F 10000 --max-size=4M sleep 10h
     [ perf record: perf size limit reached (4097 KB), stopping session ]
     [ perf record: Woken up 6 times to write data ]
     [ perf record: Captured and wrote 4.048 MB perf.data (54094 samples) ]
     Terminated
     # ls -lah perf.data
     -rw-------. 1 root root 4.1M Nov  7 15:27 perf.data
     #
 
 perf stat:
 
   Jiri Olsa:
 
   - Add --per-node agregation support:
 
     In live mode:
 
       # perf stat  -a -I 1000 -e cycles --per-node
       #           time node   cpus             counts unit events
            1.000542550 N0       20          6,202,097      cycles
            1.000542550 N1       20            639,559      cycles
            2.002040063 N0       20          7,412,495      cycles
            2.002040063 N1       20          2,185,577      cycles
            3.003451699 N0       20          6,508,917      cycles
            3.003451699 N1       20            765,607      cycles
       ...
 
     Or in the record/report stat session:
 
       # perf stat record -a -I 1000 -e cycles
       #           time             counts unit events
            1.000536937         10,008,468      cycles
            2.002090152          9,578,539      cycles
            3.003625233          7,647,869      cycles
            4.005135036          7,032,086      cycles
       ^C     4.340902364          3,923,893      cycles
 
       # perf stat report --per-node
       #           time node   cpus             counts unit events
            1.000536937 N0       20          9,355,086      cycles
            1.000536937 N1       20            653,382      cycles
            2.002090152 N0       20          7,712,838      cycles
            2.002090152 N1       20          1,865,701      cycles
        ...
 
 perf probe:
 
   Masami Hiramatsu:
 
   Various fixes related to recent additions to the DWARF format:
 
   - Fix to find range-only function instance
 
   - Walk function lines in lexical blocks
 
   - Fix to show function entry line as probe-able
 
   - Fix wrong address verification
 
   - Fix to probe a function which has no entry pc
 
   - Fix to probe an inline function which has no entry pc
 
   - Fix to list probe event with correct line number
 
   - Fix to show inlined function callsite without entry_pc
 
   - Fix to show ranges of variables in functions without entry_pc
 
   - Return a better scope DIE if there is no best scope
 
   - Skip end-of-sequence and non statement lines
 
   - Filter out instances except for inlined subroutine and subprogram
 
   - Fix to show calling lines of inlined functions
 
   - Skip overlapped location on searching variables
 
 perf inject:
 
   Adrian Hunter:
 
   - Do not strip evsels with --strip, as they are needed for create_gcov
     (see the autofdo example in tools/perf/Documentation/intel-pt.txt).
 
 Intel PT:
 
   Adrian Hunter:
 
   - Intel PT uses an auxtrace_cache to store the results of code-walking, to avoid
     repeated decoding. Add an auxtrace_cache__remove to handle text poke events.
 
 core:
 
   Andi Kleen:
 
   - Always preserve errno while cleaning up perf_event_open failures.
 
 llvm:
 
   Arnaldo Carvalho de Melo:
 
   - No need to tell that the request for saving a .o file for BPF events, as
     expressed in ~/.perfconfig was satisfied, make that a debug message.
 
 perf vendor events:
 
 Intel:
 
   Haiyan Song:
 
   - Update CascadelakeX events to v1.05.
 
   - Update all the Intel JSON metrics from TMAM 3.6.
 
 Treewide:
 
   Ian Rogers:
 
   - Improve error paths, plugging leaks found using LLVM tools
     such as libFuzzer.
 
 jevents:
 
   Yunfeng Ye:
 
   - Fix resource leak in process_mapfile() and main()
 
 perf kvm:
 
   Igor Lubashev:
 
   - Use evlist layer api when possible.
 
 libsubcmd:
 
   James Clark:
 
   - Move EXTRA_FLAGS to the end to allow overriding existing flags.
 
   - Use -O0 with DEBUG=1
 
 perf diff:
 
   Jin Yao:
 
   - Don't use hack to skip column length calculation
 
 CoreSight ETM:
 
   Leo yan:
 
   - Fix definition of macro TO_CS_QUEUE_NR
 
 ARM64:
 
   John Garry:
 
   - Do not try to include libelf header files when its feature detection
     failed, fixing the cross build for ARM64.
 
 perf tests:
 
   Leo Yan:
 
   - Fix out of bounds memory access in the backward ring buffer test.
 
 Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQR2GiIUctdOfX2qHhGyPKLppCJ+JwUCXcRowQAKCRCyPKLppCJ+
 JxHcAQCTtl9N3zkNjLWif1i6AGKNU9TzYpup+jDR5J83ggLqgQD+O931nR9wXUOe
 9bDUr45cNw3ZkRbc1558hKPWIsceJgU=
 =Rko+
 -----END PGP SIGNATURE-----

Merge tag 'perf-core-for-mingo-5.5-20191107' 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:

perf report:

  Jin Yao:

  - Introduce --total-cycles, for basic block profiling, further using data
    obtained from LBR, an example should suffice:

      # perf record -b
      ^C[ perf record: Woken up 595 times to write data ]
      [ perf record: Captured and wrote 156.672 MB perf.data (196873 samples) ]

      # perf evlist -v
      cycles: size: 112, { sample_period, sample_freq }: 4000, sample_type: IP|TID|TIME|CPU|PERIOD|BRANCH_STACK, read_format: ID, 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, ksymbol: 1, bpf_event: 1, branch_sample_type: ANY

      # perf report --total-cycles --stdio
      # To display the perf.data header info, please use --header/--header-only options.
      #
      # Total Lost Samples: 0
      #
      # Samples: 6M of event 'cycles'
      # Event count (approx.): 6299936
      #
      # Sampled  Sampled   Avg     Avg
      # Cycles%  Cycles  Cycles%  Cycles                 [Program Block Range]     Shared Object
      # .......  ......  .......  .....   ....................................  ................
      #
         2.17%     1.7M   0.08%     607       [compiler.h:199 -> common.c:221]  [kernel.vmlinux]
         0.72%   544.5K   0.03%     230     [entry_64.S:657 -> entry_64.S:662]  [kernel.vmlinux]
         0.56%   541.8K   0.09%     672       [compiler.h:199 -> common.c:300]  [kernel.vmlinux]
         0.39%   293.2K   0.01%     104   [list_debug.c:43 -> list_debug.c:61]  [kernel.vmlinux]
         0.36%   278.6K   0.03%     272   [entry_64.S:1289 -> entry_64.S:1308]  [kernel.vmlinux]

perf record:

  Adrian Hunter:

  - Allow storing perf.data in a directory together with a copy of /proc/kcore.

  Jiwei Sun:

  - Add support for limit perf output file size, i.e.:

    # perf record --all-cpus -F 10000 --max-size=4M sleep 10h
    [ perf record: perf size limit reached (4097 KB), stopping session ]
    [ perf record: Woken up 6 times to write data ]
    [ perf record: Captured and wrote 4.048 MB perf.data (54094 samples) ]
    Terminated
    # ls -lah perf.data
    -rw-------. 1 root root 4.1M Nov  7 15:27 perf.data
    #

perf stat:

  Jiri Olsa:

  - Add --per-node agregation support:

    In live mode:

      # perf stat  -a -I 1000 -e cycles --per-node
      #           time node   cpus             counts unit events
           1.000542550 N0       20          6,202,097      cycles
           1.000542550 N1       20            639,559      cycles
           2.002040063 N0       20          7,412,495      cycles
           2.002040063 N1       20          2,185,577      cycles
           3.003451699 N0       20          6,508,917      cycles
           3.003451699 N1       20            765,607      cycles
      ...

    Or in the record/report stat session:

      # perf stat record -a -I 1000 -e cycles
      #           time             counts unit events
           1.000536937         10,008,468      cycles
           2.002090152          9,578,539      cycles
           3.003625233          7,647,869      cycles
           4.005135036          7,032,086      cycles
      ^C     4.340902364          3,923,893      cycles

      # perf stat report --per-node
      #           time node   cpus             counts unit events
           1.000536937 N0       20          9,355,086      cycles
           1.000536937 N1       20            653,382      cycles
           2.002090152 N0       20          7,712,838      cycles
           2.002090152 N1       20          1,865,701      cycles
       ...

perf probe:

  Masami Hiramatsu:

  Various fixes related to recent additions to the DWARF format:

  - Fix to find range-only function instance

  - Walk function lines in lexical blocks

  - Fix to show function entry line as probe-able

  - Fix wrong address verification

  - Fix to probe a function which has no entry pc

  - Fix to probe an inline function which has no entry pc

  - Fix to list probe event with correct line number

  - Fix to show inlined function callsite without entry_pc

  - Fix to show ranges of variables in functions without entry_pc

  - Return a better scope DIE if there is no best scope

  - Skip end-of-sequence and non statement lines

  - Filter out instances except for inlined subroutine and subprogram

  - Fix to show calling lines of inlined functions

  - Skip overlapped location on searching variables

perf inject:

  Adrian Hunter:

  - Do not strip evsels with --strip, as they are needed for create_gcov
    (see the autofdo example in tools/perf/Documentation/intel-pt.txt).

Intel PT:

  Adrian Hunter:

  - Intel PT uses an auxtrace_cache to store the results of code-walking, to avoid
    repeated decoding. Add an auxtrace_cache__remove to handle text poke events.

core:

  Andi Kleen:

  - Always preserve errno while cleaning up perf_event_open failures.

llvm:

  Arnaldo Carvalho de Melo:

  - No need to tell that the request for saving a .o file for BPF events, as
    expressed in ~/.perfconfig was satisfied, make that a debug message.

perf vendor events:

Intel:

  Haiyan Song:

  - Update CascadelakeX events to v1.05.

  - Update all the Intel JSON metrics from TMAM 3.6.

Treewide:

  Ian Rogers:

  - Improve error paths, plugging leaks found using LLVM tools
    such as libFuzzer.

jevents:

  Yunfeng Ye:

  - Fix resource leak in process_mapfile() and main()

perf kvm:

  Igor Lubashev:

  - Use evlist layer api when possible.

libsubcmd:

  James Clark:

  - Move EXTRA_FLAGS to the end to allow overriding existing flags.

  - Use -O0 with DEBUG=1

perf diff:

  Jin Yao:

  - Don't use hack to skip column length calculation

CoreSight ETM:

  Leo yan:

  - Fix definition of macro TO_CS_QUEUE_NR

ARM64:

  John Garry:

  - Do not try to include libelf header files when its feature detection
    failed, fixing the cross build for ARM64.

perf tests:

  Leo Yan:

  - Fix out of bounds memory access in the backward ring buffer test.

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2019-11-12 12:06:08 +01:00
arch perf/x86/amd: Remove set but not used variable 'active' 2019-11-11 08:31:55 +01:00
block blkcg: make blkcg_print_stat() print stats only for online blkgs 2019-11-06 17:08:38 -07:00
certs PKCS#7: Refactor verify_pkcs7_signature() 2019-08-05 18:40:18 -04:00
crypto Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
Documentation Documentation: TLS: Add missing counter description 2019-11-05 18:34:06 -08:00
drivers ARM: SoC fixes 2019-11-10 13:41:59 -08:00
fs configfs regression fix for 5.4-rc 2019-11-10 12:59:34 -08:00
include Linux 5.4-rc7 2019-11-11 07:59:06 +01:00
init Merge branch 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2019-09-28 08:14:15 -07:00
ipc ipc/sem.c: convert to use built-in RCU list checking 2019-09-25 17:51:41 -07:00
kernel Linux 5.4-rc7 2019-11-11 07:59:06 +01:00
lib lib: Remove select of inexistant GENERIC_IO 2019-11-10 10:38:43 -08:00
LICENSES LICENSES: Rename other to deprecated 2019-05-03 06:34:32 -06:00
mm mm: memcontrol: fix network errors from failing __GFP_ATOMIC charges 2019-11-06 08:47:50 -08:00
net vsock/virtio: fix sock refcnt holding during the shutdown 2019-11-08 12:17:50 -08:00
samples samples/bpf: fix build by setting HAVE_ATTR_TEST to zero 2019-10-31 21:39:15 +01:00
scripts Modules fixes for v5.4-rc7 2019-11-08 09:48:19 -08:00
security Linux 5.4-rc7 2019-11-11 07:59:06 +01:00
sound ASoC: Fixes for v5.4 2019-11-07 13:52:17 +01:00
tools perf/core improvements and fixes: 2019-11-12 12:06:08 +01:00
usr kbuild: update compile-test header list for v5.4-rc2 2019-10-05 15:29:49 +09:00
virt kvm: call kvm_arch_destroy_vm if vm creation fails 2019-10-31 12:13:16 +01:00
.clang-format clang-format: Update with the latest for_each macro list 2019-08-31 10:00:51 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes
.gitignore Modules updates for v5.4 2019-09-22 10:34:46 -07:00
.mailmap ARM: SoC fixes 2019-11-10 13:41:59 -08:00
COPYING COPYING: use the new text with points to the license files 2018-03-23 12:41:45 -06:00
CREDITS MAINTAINERS: Remove Simon as Renesas SoC Co-Maintainer 2019-10-10 08:12:51 -07:00
Kbuild kbuild: do not descend to ./Kbuild when cleaning 2019-08-21 21:03:58 +09:00
Kconfig docs: kbuild: convert docs to ReST and rename to *.rst 2019-06-14 14:21:21 -06:00
MAINTAINERS Linux 5.4-rc7 2019-11-11 07:59:06 +01:00
Makefile Linux 5.4-rc7 2019-11-10 16:17:15 -08:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.