<img width="100%" src="src/images/hotspot-logo.png">
# Hotspot - the Linux perf GUI for performance analysis
This project is a [KDAB](https://www.kdab.com) R&D effort to create a standalone
GUI for performance data. As the first goal, we want to provide a UI like
KCachegrind around Linux perf. Looking ahead, we intend to support various other
performance data formats under this umbrella.
## Table of Contents
<!--
TOC generated with https://github.com/jonschlinkert/markdown-toc
To update, run `markdown-toc -i README.md`
-->
<!-- toc -->
- [Screenshots](#screenshots)
- [Visualizing Data](#visualizing-data)
- [Time Line](#time-line)
- [Record Data](#record-data)
- [Getting Hotspot](#getting-hotspot)
- [ArchLinux](#archlinux)
- [Debian / Ubuntu](#debian--ubuntu)
- [Gentoo](#gentoo)
- [Fedora](#fedora)
- [For any Linux distro: AppImage](#for-any-linux-distro-appimage)
- [Building Hotspot](#building-hotspot)
- [Using](#using)
- [Off-CPU Profiling](#off-cpu-profiling)
- [Embedded Systems](#embedded-systems)
- [Import Export](#import-export)
- [tracepoints](#tracepoints)
- [Disassembler](#disassembler)
- [Known Issues](#known-issues)
- [Broken Backtraces](#broken-backtraces)
- [debuginfod](#debuginfod)
- [Missing Features](#missing-features)
- [Recording with perf without super user rights](#recording-with-perf-without-super-user-rights)
- [Export File Format](#export-file-format)
- [Qt Creator](#qt-creator)
- [License](#license)
<!-- tocstop -->
## Screenshots
Here are some screenshots showing the most important features of Hotspot in action:
### Visualizing Data
The main feature of Hotspot is the graphical visualization of a `perf.data` file.
![hotspot summary page](screenshots/summary.png?raw=true "Hotspot summary page")
![hotspot FlameGraph page](screenshots/flamegraph.png?raw=true "Hotspot FlameGraph page")
Note: Inlined functions have a darker border than non-inlined ones.
![hotspot off-CPU analysis](screenshots/off-cpu.png?raw=true "hotspot off-CPU analysis")
![hotspot caller-callee page](screenshots/caller-callee.png?raw=true "Hotspot caller-callee page")
![hotspot bottom-up page](screenshots/bottom-up.png?raw=true "Hotspot bottom-up page")
![hotspot top-down page](screenshots/top-down.png?raw=true "Hotspot top-down page")
![hotspot dockwidget layouts](screenshots/dockwidgets.png?raw=true
"Hotspot with custom dockwidget layout and disassembly view")
### Time Line
The time line allows filtering the results by time, process or thread. The data views are updated accordingly.
![hotspot timeline filtering by time](screenshots/timeline-filter-time.png?raw=true
"Hotspot timeline filtering by time")
![hotspot timeline filtering by thread or process](screenshots/timeline-filter-thread.png?raw=true
"Hotspot timeline filtering by thread or process")
![hotspot timeline filtering applied to FlameGraph](screenshots/timeline-flamegraph.png?raw=true
"Hotspot timeline filtering also applies to the data views on top, like e.g. the FlameGraph.
You can also zoom in on the timeline and inspect individual sample data.")
### Record Data
You can also launch `perf` from Hotspot, to profile a newly started application
or to attach to already running process(es). Do take the
[caveats below](#recording-with-perf-without-super-user-rights) into account though.
![hotspot launch application](screenshots/record-launch.png?raw=true
"Hotspot can launch a new application and profile it with perf from the record page.")
![hotspot attach to process](screenshots/record-attach.png?raw=true
"Hotspot also allows runtime-attaching of perf to existing applications to profile them.")
## Getting Hotspot
*Note: Hotspot is not yet packaged on all Linux distributions. In such cases, or if you want to use the
latest version, please use the AppImage which will work on any recent Linux distro just fine.*
### ArchLinux
Hotspot is available in AUR (https://aur.archlinux.org/packages/hotspot).
### Debian / Ubuntu
Hotspot is available in Debian (https://packages.debian.org/hotspot) and Ubuntu
(https://packages.ubuntu.com/hotspot).
### Gentoo
Hotspot ebuilds are available from our overlay (https://github.com/KDAB/kdab-overlay).
### Fedora
Hotspot is available in Fedora (https://packages.fedoraproject.org/pkgs/hotspot/hotspot/).
### For any Linux distro: AppImage
You can either head over to the most [current release](https://github.com/KDAB/hotspot/releases/latest)
or the [continuous build](https://github.com/KDAB/hotspot/releases/tag/continuous).
In both cases you'll find the AppImage under "Assets" that you can download.
Untar the AppImage file (in case of the latest release), then make it executable and then run it.
Please use the latest build to get the most recent version. If it doesn't work, please report a
bug and test the latest stable version.
*Note: Your system libraries or preferences are not altered. In case you'd like to remove Hotspot again,
simply delete the downloaded file. Learn more about AppImage [here](https://appimage.org/).*
To find out how to debug the AppImage, see [HACKING](HACKING.md#debugging-the-appimage).
## Building Hotspot
Building Hotspot from source gives you the latest and greatest, but you'll have to make sure all its
dependencies are available. Most users should probably [install Hotspot](#getting-hotspot) from the distro
package manager or as an [AppImage](#for-any-linux-distro-appimage).
For everyone that wants to contribute to Hotspot or use the newest version without the AppImage detailed
notes are found at [HACKING](HACKING.md#table-of-contents).
## Using
### General
First of all, record some data with `perf`. To get backtraces, you will need to enable the dwarf callgraph
mode:
```bash
perf record --call-graph dwarf <your application>
...
[ perf record: Woken up 58 times to write data ]
[ perf record: Captured and wrote 14.874 MB perf.data (1865 samples) ]
```
Now, if you have Hotspot available on the same machine, all you need to do is launch it.
It will automatically open the `perf.data` file in the current directory (similar to `perf report`).
Alternatively, you can specify the path to the data file on the console:
```bash
hotspot /path/to/perf.data
```
### Command Line options
Depending on your needs you may want to pass additional command line options to Hotspot.
This allows to one-time set configuration options that are found in the GUI under "Settings"
and also allows to convert Linux perf data files into the smaller and portable perfdata format
(see [Import / Export](#import-export) for details on that).
All command line options are shown with `--help`:
```text
Usage: hotspot [options] [files...]
Linux perf GUI for performance analysis.
Options:
-h, --help Displays help on commandline options.
--help-all Displays help including Qt specific options.
-v, --version Displays version information.
--sysroot <path> Path to sysroot which is used to find libraries.
--kallsyms <path> Path to kallsyms file which is used to resolve
kernel symbols.
--debugPaths <paths> Colon separated list of paths that contain debug
information. These paths are relative to the
executable and not to the current working directory.
--extraLibPaths <paths> Colon separated list of extra paths to find
libraries.
--appPath <path> Path to folder containing the application executable
and libraries.
--sourcePaths <paths> Colon separated list of search paths for the source
code.
--arch <path> Architecture to use for unwinding.
--exportTo <path> Path to .perfparser output file to which the input
data should be exported. A single input file has to
be given too.
--perf-binary <p
没有合适的资源?快使用搜索试试~ 我知道了~
The Linux perf GUI for performance analysis..zip
共294个文件
cpp:76个
h:62个
txt:29个
需积分: 5 0 下载量 121 浏览量
2024-06-22
17:04:15
上传
评论
收藏 4.01MB ZIP 举报
温馨提示
Linux是一套免费使用和自由传播的类Unix操作系统,由林纳斯·托瓦兹于1991年首次发布。 Linux不仅是一个强大的操作系统,也是一个庞大的技术生态系统,涵盖了从服务器到个人电脑的各种应用场景。同时,它的开源特性和广泛的社区支持使其成为技术发展的重要推动力。在了解Linux的过程中,人们不仅能够看到其强大的技术基础和广泛的应用领域,还能体会到它作为开源先锋在全球科技发展中的重要地位。
资源推荐
资源详情
资源评论
收起资源包目录
The Linux perf GUI for performance analysis..zip (294个子文件)
vector_static_gcc_v9.1.0 1003KB
BaseUbuntu20.04 1KB
BaseUbuntu22.04 887B
BaseArchlinux 490B
BaseArchlinuxWithoutOptional 447B
BaseFedora34 720B
BaseNeonQt6 1KB
BaseOpenSuseTumbleweed 707B
BuildDependencies 445B
BuildDependenciesQt6 1KB
BuildHotspotWithoutPresets 359B
BuildHotspotWithPresets 155B
BuildHotspotWithPresetsQt6 163B
main.c 769B
main.c 740B
c-fork.c 721B
.clang-format 1KB
.clang-tidy 1KB
ECMEnableSanitizers.cmake 6KB
perfparser.cmake 4KB
FindLibElf.cmake 3KB
FindQCustomPlot.cmake 2KB
FindElfUtils.cmake 2KB
hotspot-config.h.cmake 890B
HotspotMacrosInternal.cmake 643B
Findobjdump.cmake 414B
PrefixTickLabels.cmake 317B
perfparser.cpp 73KB
tst_models.cpp 43KB
flamegraph.cpp 42KB
tst_perfparser.cpp 41KB
recordpage.cpp 30KB
resultsdisassemblypage.cpp 27KB
timelinedelegate.cpp 26KB
mainwindow.cpp 23KB
tst_disassemblyoutput.cpp 18KB
util.cpp 15KB
disassemblyoutput.cpp 15KB
data.cpp 15KB
resultspage.cpp 14KB
eventmodel.cpp 13KB
settingsdialog.cpp 13KB
resultscallercalleepage.cpp 12KB
recordhost.cpp 11KB
main.cpp 11KB
highlightedtext.cpp 11KB
resultsutil.cpp 10KB
settings.cpp 10KB
timelinewidget.cpp 9KB
resultssummarypage.cpp 9KB
treemodel.cpp 9KB
perfrecord.cpp 9KB
disassemblymodel.cpp 9KB
sourcecodemodel.cpp 9KB
filterandzoomstack.cpp 8KB
timeaxisheaderview.cpp 8KB
frequencypage.cpp 7KB
callercalleemodel.cpp 6KB
tst_formatting.cpp 5KB
callgraphwidget.cpp 5KB
processlist_unix.cpp 5KB
processmodel.cpp 5KB
startpage.cpp 4KB
perfoutputwidgetkonsole.cpp 4KB
resultsbottomuppage.cpp 4KB
perfcontrolfifowrapper.cpp 4KB
resultsflamegraphpage.cpp 4KB
callgraphgenerator.cpp 4KB
elfwalk.cpp 3KB
costheaderview.cpp 3KB
multiconfigwidget.cpp 3KB
initiallystoppedprocess.cpp 3KB
tst_timelinedelegate.cpp 3KB
tst_search.cpp 3KB
codedelegate.cpp 3KB
tst_callgraphgenerator.cpp 3KB
resultstopdownpage.cpp 3KB
dockwidgetsetup.cpp 2KB
dump_perf_data.cpp 2KB
perfoutputwidgettext.cpp 2KB
frequencymodel.cpp 2KB
costdelegate.cpp 2KB
copyabletreeview.cpp 2KB
processfiltermodel.cpp 2KB
callercalleeproxy.cpp 2KB
topproxy.cpp 2KB
costcontextmenu.cpp 1KB
aboutdialog.cpp 1KB
main.cpp 956B
main.cpp 893B
main.cpp 775B
formattingutils.cpp 747B
sharedlib.cpp 730B
staticlib.cpp 730B
main.cpp 687B
main.cpp 632B
main.cpp 609B
main.cpp 595B
main.cpp 592B
perfoutputwidget.cpp 439B
共 294 条
- 1
- 2
- 3
资源评论
热爱嵌入式的小佳同学
- 粉丝: 1w+
- 资源: 2136
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功