mirror of
https://github.com/torvalds/linux.git
synced 2026-10-13 22:01:02 +02:00
Linux kernel source tree
Currently, stats->nr_samples is incremented per entry in the branch stack
instead of per sample taken. As a result, statistics of samples taken
during perf record in --branch-filter or --branch-any mode does not
seem correct. Instead call hists__inc_nr_samples() for each sample taken
instead of for each entry in the branch stack.
Before:
$ ./perf record -e cycles:u -b -c 10000000000 ./tchain_edit
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.005 MB perf.data (2 samples) ]
$ perf report -D | tail -n 16
Aggregated stats:
TOTAL events: 16
COMM events: 2 (12.5%)
EXIT events: 1 ( 6.2%)
SAMPLE events: 2 (12.5%)
MMAP2 events: 2 (12.5%)
KSYMBOL events: 1 ( 6.2%)
FINISHED_ROUND events: 1 ( 6.2%)
ID_INDEX events: 1 ( 6.2%)
THREAD_MAP events: 1 ( 6.2%)
CPU_MAP events: 1 ( 6.2%)
EVENT_UPDATE events: 2 (12.5%)
TIME_CONV events: 1 ( 6.2%)
FINISHED_INIT events: 1 ( 6.2%)
cpu_core/cycles/u stats:
SAMPLE events: 64
After:
$ ./perf report -D | tail -n 16
Aggregated stats:
TOTAL events: 16
COMM events: 2 (12.5%)
EXIT events: 1 ( 6.2%)
SAMPLE events: 2 (12.5%)
MMAP2 events: 2 (12.5%)
KSYMBOL events: 1 ( 6.2%)
FINISHED_ROUND events: 1 ( 6.2%)
ID_INDEX events: 1 ( 6.2%)
THREAD_MAP events: 1 ( 6.2%)
CPU_MAP events: 1 ( 6.2%)
EVENT_UPDATE events: 2 (12.5%)
TIME_CONV events: 1 ( 6.2%)
FINISHED_INIT events: 1 ( 6.2%)
cpu_core/cycles/u stats:
SAMPLE events: 2
Signed-off-by: Thomas Falcon <thomas.falcon@intel.com>
Link: https://lore.kernel.org/r/20250220045942.114965-1-thomas.falcon@intel.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
|
||
|---|---|---|
| arch | ||
| block | ||
| certs | ||
| crypto | ||
| Documentation | ||
| drivers | ||
| fs | ||
| include | ||
| init | ||
| io_uring | ||
| ipc | ||
| kernel | ||
| lib | ||
| LICENSES | ||
| mm | ||
| net | ||
| rust | ||
| samples | ||
| scripts | ||
| security | ||
| sound | ||
| tools | ||
| usr | ||
| virt | ||
| .clang-format | ||
| .clippy.toml | ||
| .cocciconfig | ||
| .editorconfig | ||
| .get_maintainer.ignore | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .rustfmt.toml | ||
| COPYING | ||
| CREDITS | ||
| Kbuild | ||
| Kconfig | ||
| MAINTAINERS | ||
| Makefile | ||
| README | ||
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 reStructuredText 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.