kdab / hotspot Goto Github PK
View Code? Open in Web Editor NEWThe Linux perf GUI for performance analysis.
The Linux perf GUI for performance analysis.
When running hotspot on something that has separate .debug files, one needs to pass "-DebugPaths ." explicitly. This shouldn't be needed, for each executable and library hotspot should first check if such a file is found in the same directory.
/usr/lib/debug should also be in the default path list if it isn't already.
With a recently compiled version against Qt 5.9.1:
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Reinstalling the application may fix this problem.
Aborted (core dumped)
That doesn't make sense to me... I've been able to compile and run other cmake-based applications (e.g. gammaray) and many other qmake-based (e.g. the examples) with the same Qt.
I configured like this:
cmake .. -DCMAKE_PREFIX_PATH=$HOME/local/qt/5.9.1/gcc_64 -DCMAKE_INSTALL_PREFIX=$HOME/local/hotspot
Qt comes from the online installer, and as you see, is installed in $HOME/local/qt
. OS is Ubuntu 16.04, cmake 3.5.1.
Is there something in the build that could affect Qt not finding the plugin?
The full log with QT_DEBUG_PLUGINS
is the following:
QFactoryLoader::QFactoryLoader() checking directory path "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqeglfs.so"
Found metadata in lib /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqeglfs.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"eglfs"
]
},
"className": "QEglFSIntegrationPlugin",
"debug": false,
"version": 329985
}
Got keys from plugin meta data ("eglfs")
QFactoryLoader::QFactoryLoader() looking at "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqlinuxfb.so"
Found metadata in lib /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqlinuxfb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"linuxfb"
]
},
"className": "QLinuxFbIntegrationPlugin",
"debug": false,
"version": 329985
}
Got keys from plugin meta data ("linuxfb")
QFactoryLoader::QFactoryLoader() looking at "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqminimal.so"
Found metadata in lib /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqminimal.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 329985
}
Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqminimalegl.so"
Found metadata in lib /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqminimalegl.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimalegl"
]
},
"className": "QMinimalEglIntegrationPlugin",
"debug": false,
"version": 329985
}
Got keys from plugin meta data ("minimalegl")
QFactoryLoader::QFactoryLoader() looking at "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqoffscreen.so"
Found metadata in lib /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqoffscreen.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 329985
}
Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() looking at "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqvnc.so"
Found metadata in lib /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqvnc.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"vnc"
]
},
"className": "QVncIntegrationPlugin",
"debug": false,
"version": 329985
}
Got keys from plugin meta data ("vnc")
QFactoryLoader::QFactoryLoader() looking at "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqxcb.so"
Found metadata in lib /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 329985
}
Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/alex/projects/3rdparty/hotspot/build/bin/platforms" ...
Cannot load library /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5: version `Qt_5' not found (required by /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5))
QLibraryPrivate::loadPlugin failed on "/home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqxcb.so" : "Cannot load library /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/libqxcb.so: (/usr/lib/x86_64-linux-gnu/libQt5DBus.so.5: version `Qt_5' not found (required by /home/alex/local/qt/5.9.1/gcc_64/plugins/platforms/../../lib/libQt5XcbQpa.so.5))"
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.
Reinstalling the application may fix this problem.
Hi, "ECM" (extra-cmake-modules
on Debian/Ubuntu) seems to be a dependency but is not in the dependencies list. Mind adding it?
Without it I get
CMake Error at CMakeLists.txt:49 (find_package):
Could not find a package configuration file provided by "ECM" (requested
version 1.0.0) with any of the following names:
ECMConfig.cmake
ecm-config.cmake
Thanks!
the text on the summary page needs to be selectable
Maybe we need to use HTML definition lists like I did in heaptrack within a QLabel that has selection enabled. Currently we have individual labels, which is a mess to extend, I don't think it's worth it. Just have one label for the summary, and one for the system information. Then build a HTML <dl>
with the contents and set it on these labels. Then we can copy'n'paste the contents into a text editor
The call-graph sampling data (inclusive cost) should be displayable as a flamegraph, both bottom-up and top-down should be supported. Heaptrack has an implementation of a flamegraph that can be used as a basis for this feature.
Looks like ThreadWeaver is supposed to be optional, but compilation on Ubuntu trusty fails for me (Travis CI build log) with
-- Found ElfUtils: /usr/lib/x86_64-linux-gnu/libdw.so
CMake Warning at /usr/local/share/ECM/find-modules/FindKF5.cmake:74 (find_package):
Could not find a package configuration file provided by "KF5ThreadWeaver"
with any of the following names:
KF5ThreadWeaverConfig.cmake
kf5threadweaver-config.cmake
Add the installation prefix of "KF5ThreadWeaver" to CMAKE_PREFIX_PATH or
set "KF5ThreadWeaver_DIR" to a directory containing one of the above files.
If "KF5ThreadWeaver" provides a separate development package or SDK, be
sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:65 (find_package)
-- Could NOT find KF5ThreadWeaver: found neither KF5ThreadWeaverConfig.cmake nor kf5threadweaver-config.cmake
CMake Warning at /usr/local/share/ECM/find-modules/FindKF5.cmake:74 (find_package):
Could not find a package configuration file provided by "KF5I18n" with any
of the following names:
KF5I18nConfig.cmake
kf5i18n-config.cmake
Add the installation prefix of "KF5I18n" to CMAKE_PREFIX_PATH or set
"KF5I18n_DIR" to a directory containing one of the above files. If
"KF5I18n" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:65 (find_package)
(...)
-- The following REQUIRED packages have been found:
* Qt5Core
* Qt5Gui (required version >= 5.8.0)
* Qt5Widgets
* Qt5Network
* Qt5Test
* Qt5
* LibElf
* Elfutils
* ECM (required version >= 1.0.0)
* KF5
-- The following OPTIONAL packages have not been found:
* KF5ThreadWeaver
* KF5I18n
* KF5ConfigWidgets
* KF5CoreAddons
* KF5ItemViews
* KF5ItemModels
-- Could not set up the appstream test. appstreamcli is missing.
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - found
-- Performing Test _OFFT_IS_64BIT
-- Performing Test _OFFT_IS_64BIT - Success
-- Configuring done
(...)
Scanning dependencies of target hotspot
[ 85%] Building CXX object src/CMakeFiles/hotspot.dir/main.cpp.o
[ 87%] Building CXX object src/CMakeFiles/hotspot.dir/util.cpp.o
[ 89%] Building CXX object src/CMakeFiles/hotspot.dir/parsers/perf/perfparser.cpp.o
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:38:37: fatal error: ThreadWeaver/ThreadWeaver: No such file or directory
#include <ThreadWeaver/ThreadWeaver>
^
compilation terminated.
make[2]: *** [src/CMakeFiles/hotspot.dir/parsers/perf/perfparser.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
Linking CXX executable ../lib/hotspot/libexec/hotspot-perfparser
[ 89%] Built target hotspot-perfparser
make[1]: *** [src/CMakeFiles/hotspot.dir/all] Error 2
make: *** [all] Error 2
Similar to WPA, the aggregated cost views should let the user decide how to aggregate the (inclusive) cost data. By default, we should aggregate by symbol name. But it would be great to also support aggregation by:
add an "annotate source" view, similar to what other profilers have:
apparently perfparser hangs indefinitely when trying to open a broken perfdata file, e.g.:
echo > perf.data
hotspot
The PerfFeatures parsed in perfparser contain some useful information we want to display on our summary page.
Add this upstream to the data stream then parse it in hotspot and display on our summary page.
Most of the system information is only necessary rarely so put it into a toggable "advanced" group, or down bottom so that one needs to scroll to see it.
What must be displayed on top:
perf data for off-cpu profiling, or sleep-time profiling, uses tracepoints instead of samples. Extend perfparser upstream as needed and visualize the sleep time data in hotspot.
Extend the feature in #11 to allow running perf on a remote machine via ssh, then stream the data to localhost
Would be cool if such a useful tool could be installed via standard distribution package manager. I see some steps in that direction already happening with #58 but I'm more interested in .deb
As an intermediary step it could be made available via OBS or Launchpad.
Allow running perf from within a nice launcher GUI in hotspot
This should allow multiple user-configurable analysis types, to select different event sources for perf, or do off-cpu VS. on-cpu profiling - or both at the same time.
As a first iteration, this only needs to run on localhost.
The current filtering is not as efficient as it could be. Most notably, we concatenate the symbol+binary strings. Instead we should:
filterAcceptsRow
overload, ask the model directly whether it matches the given needleNote that we cannot simply return a Data::Symbol
variant, as that would still allocate the data on the heap for type erasure.
It would be nice to be able to generate a PDF report, potentially using KDReport.
Similar to #1, but invert the call graph. This allows one to drill down from main and eventually find the leaf entries that actually triggered the sample.
would be nice if we could export the flamegraph
somewhat related to #36
Without debug symbols, it is hard to interpret the data because the function name can not be displayed. Even worse is that many backtraces will be broken because unwinding fails, resulting in wrong data being displayed.
Hotspot should show which debug symbols are missing in the summary view, to alert the user about the problem.
Idealy it would even show how many samples make use of the library without debug symbols, so one can judge how important the debug symbols for that library are.
hotspot was invoked with:
hotspot --sysroot /path/to/sysroot --kallsyms kallsyms_copy perf.data.loadhtml
hotspot-perfparser doesn't crash, so I can not provide a backtrace. All I get is "The hotspot-perfparser binary exited with code 5.".
This doesn't happen right away, hotspot shows more than 35% or progress being done before the exit.
This only happens for one specific perf.data file.
This is reproducible and I still have the data file around.
Produced this on a relatively new system.
instead of just respecting <filename>
the parser takes over perfs (deleted)
note on the file,
such that <filename> (deleted)
as a new , compound filename is produced and used later on.
perf report --dump-raw-trace |& grep -i mmap
reveals them in the raw data:
0 0x3e6e68 [0xa0]: PERF_RECORD_MMAP2 985/18205: [0x7f0d5667e000(0x2000) @ 0 103:02 131138 5927068273831587376]: r-xs /var/cache/fontconfig/33f58129975983c0607f205585cf82a1-le64.cache-7
0 0x3e6f08 [0xa0]: PERF_RECORD_MMAP2 985/18205: [0x7f0d56680000(0x2000) @ 0 103:02 132249 5927068273831587376]: r-xs /var/cache/fontconfig/6ba42ae0000f58711b5caaf10d690066-le64.cache-7
0 0x3e6fa8 [0xa0]: PERF_RECORD_MMAP2 985/18205: [0x7f0d56682000(0x6000) @ 0 103:02 131894 5927068273831587376]: r-xs /var/cache/fontconfig/210c0516121708a580e22e6b1f9a103a-le64.cache-7
0 0x3e7048 [0xa0]: PERF_RECORD_MMAP2 985/18205: [0x7f0d56688000(0x13000) @ 0 103:02 134581 5927068273831587376]: r-xs /var/cache/fontconfig/f6b893a7224233d96cb72fd88691c0b4-le64.cache-7
0 0x3e70e8 [0xa0]: PERF_RECORD_MMAP2 985/18205: [0x7f0d5669b000(0x22000) @ 0 103:02 131204 5927068273831587376]: r-xs /var/cache/fontconfig/f349e9996a5320f6dd491cedd2b1f964-le64.cache-7
0 0x3e7188 [0xa8]: PERF_RECORD_MMAP2 985/18205: [0x7f0d566bd000(0x1000) @ 0 103:04 21111103 5927068273831587376]: r-xs /home/christoph/.cache/fontconfig/ac83d8bd911bd856f6a804cad045a0b2-le64.cache-7
0 0x3e7230 [0x60]: PERF_RECORD_MMAP2 985/18205: [0x7f0d566be000(0x2000) @ 0 00:00 0 5927068273831587376]: rwxp //anon
0 0x3e7290 [0x70]: PERF_RECORD_MMAP2 985/18205: [0x7f0d566c0000(0x1000) @ 0x22000 103:02 264331 5927068273831587376]: r-xp /usr/lib/ld-2.25.so
0 0x3e7300 [0x70]: PERF_RECORD_MMAP2 985/18205: [0x7f0d566c1000(0x1000) @ 0x23000 103:02 264331 5927068273831587376]: rwxp /usr/lib/ld-2.25.so
0 0x3e7370 [0x60]: PERF_RECORD_MMAP2 985/18205: [0x7f0d566c2000(0x1000) @ 0 00:00 0 5927068273831587376]: rwxp //anon
0 0x3e73d0 [0x60]: PERF_RECORD_MMAP2 985/18205: [0x7ffe101d6000(0x21000) @ 0 00:00 0 5927068273831587376]: rwxp [stack]
0 0x3e7430 [0x60]: PERF_RECORD_MMAP2 985/18205: [0x7ffe101f9000(0x2000) @ 0 00:00 0 5927068273831587376]: r-xp [vdso]
0 0x3e7490 [0x68]: PERF_RECORD_MMAP2 985/18205: [0xffffffffff600000(0x1000) @ 0 00:00 0 5927068273831587376]: r-xp [vsyscall]
93277656537656 0x3e79d8 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d41085000(0x40000) @ 0 00:15 1722833 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.L6zPdE (deleted)
93277658125772 0x3e7d08 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d40bcd000(0x40000) @ 0 00:15 1722834 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.34DU05 (deleted)
93277659564714 0x3e8048 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d400b7000(0x40000) @ 0 00:15 1722835 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.6pXhOx (deleted)
93277660562647 0x3e82e8 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d40037000(0x40000) @ 0 00:15 1722836 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.PwaRBZ (deleted)
93277661588967 0x3e8678 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d3fff7000(0x40000) @ 0 00:15 1722837 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.xauCpr (deleted)
93277662952551 0x3e89e8 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d3fe17000(0x40000) @ 0 00:15 1722838 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.YFQDdT (deleted)
93277664309105 0x3e8e40 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d22656000(0x40000) @ 0 00:15 1722839 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.PfMU1k (deleted)
93277665690778 0x3e92b0 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d225d6000(0x40000) @ 0 00:15 1722840 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.wPhsQM (deleted)
93277667178322 0x3e9790 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d21855000(0x40000) @ 0 00:15 1722841 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.U3hhFe (deleted)
93277668616447 0x3e9d88 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d216d5000(0x40000) @ 0 00:15 1722842 1491901386]: rwxs /dev/shm/.org.chromium.Chromium.CoinuG (deleted)
93283656630412 0x3f3158 [0x90]: PERF_RECORD_MMAP2 985/1217: [0x7f0d41f75000(0x40000) @ 0 00:15 1722857 1491901392]: rwxs /dev/shm/.org.chromium.Chromium.8mXnFq (deleted)
an strace-run shows, perfparser is indeed trying to open these filenames.
stat("/home/christoph/<folder>/<folder>/<folder>/<folder/.org.chromium.Chromium.NADGtM (deleted)", 0x7ffd6b85b870) = -1 ENOENT (No such file or directory)
open("/home/christoph/<folder>/<folder>/<folder>/<folder>", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 5
fstat(5, {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
getdents(5, /* 13 entries */, 32768) = 408
getdents(5, /* 0 entries */, 32768) = 0
close(5) = 0
most models don't yet show good tooltips, this should be fixed
large perf files are slow to parse, and we are still ~2x slower than perf report, even though we apply much more caching. investigate why this is and find a way to improve this situation
The call graph view should allow dynamic filtering/searching. A KRecursiveFilterProxyModel or similar should be used such that I can search for any symbols within the call stack and still see the full matching event(s).
clang version 5.0.0 (trunk 298362)
Qt 5.7.1, built with default mkspec
lab-mandelbrot built with linux-clang-libc++ mkspec
Flamegraph doesn't show inline functions and caller/callee view is missing file/line information
"file lab_mandelbrot" shows that the clang build has no build ID, while a GCC build does have the build ID.
Make hotspot support different parser backends, and add one for heaptrack and share as much code as possible for the visualization part.
Every entry in the hotspot gui that resembles a code location should offer a "open in editor" context menu. This should then open the preferred editor of the user. Use QDesktopServices::openUrl
by default, but allow the user to configure an editor/ide of his choice with potentially custom command line arguments via hotspot settings. GammaRay has this feature as well.
The call graph views should be dynamically sortable. Most notably, this is useful to switch between sorting by exclusive cost vs. inclusive cost.
when opening a file that was recorded without --call-graph [fp|lbr|dwarf]
, we should tell the user that the results will only show inlined frames but will miss the real call graph.
somehow we need to detect that, either from the features or within perfparser and then display it in hotspot with a suggestion to rerun with --call-graph dwarf
I tried to load a perf.data generated on a CentOS 6 box into my Ubuntu workstation.
I get this error repeatedly on stdout
18087 failed to attach state Couldn't find architecture of any ELF
And all symbols appear as ??
Is this a problem with incompatible perf.data files across kernel versions?
These distros are still where alot of development happens and despite some of the dated libs, are overall keeping up fairly well, this iteration. Qt is also available as a precompiled installation - so tools like qtcreator can run even on something as old as RHEL (+CentOS) 6. The only real issue is the dependency that is a big deal is KDE SC, as far as I can tell.
CentOS/RHEL7/Ubuntu 16.04 are important support targets because of how heavily they are involved in research and non-profit usages and where it can be important to need a profiler such as hotspot.
Can another way forward be found that keeps hotspot's developer's happy but extends support to these distributions?
cf. the original request from #14:
when collecting multiple perf event sources in one profile, Hotspot should correlate different metrics. For example we should:
github does not include git submodules in its tagged tar files, and thus you get
CMake Error at CMakeLists.txt:9 (message):
The perfparser git submodule is not initialized.
Please run the following commands in the source directory
(/builddir/build/BUILD/hotspot-1.0.0):
git submodule update --init --recursive
when trying to build from it
Find a way to visualize the sampling timeline in a birds-eye view that shows where a lot of activity happened. Make sure this view displays its data per-thread. It should be possible to select a time range within this view to change the aggregation period for the call graph views.
We need a logo and potentially some more icons for hotspot
when the trace contains multiple processes, it would be useful to split the data in the reports by default (on demand)
maybe this first needs us to implement #4 in a sane way, because probably we may want the same for threads, cgroups, ...
we need to write some tests that check the integration of the perfparser utility library
The stack views, i.e. bottom-up, top-down and flame-graph should get context menus that show the selected symbol in the caller/callee view. I.e. set the current index, and ensure it's visible.
Add an aggregated statistics view of all samples within a perf.data file and display its call graphs in a bottom-up manner.
For inspiration, have a look at heaptrack or VTune, which both have such a view.
the costdelegate code should be copied over to allow us to graphically visualize the percentage cost in our views
I just published an Arch Linux package file for hotspot
. May be worth adopting it into the repository so that it can be maintained as the program develops: https://aur.archlinux.org/packages/hotspot-git/
Having a CPU usage overview graph/timeline would be useful, to quickly see when the application is busy.
The selection/zooming should probably be synchronized with the events timeline from #7
parsing perf.data can often produce misleading results when anything is amiss. We need to tell the user about such situations by extending upstream error reporting:
implement a diff view between two reports. The diff algorithm must neglect pointer addresses, due to ASLR. Only check for differences based on binary+symbol and file+line
when collecting multiple perf event sources in one profile, Hotspot should visualize all of them and if possible also show correlated data.
For example we should:
Hotspot should show an overview page, similar to what VTune displays whenever you open a new profiling result:
if possible:
perf stat
potentially also useful:
I think the name hotspot should be changed to something else. Very hard to search, trademarked in both software and hardware, and people already think of something else when they hear hotspot.
(Noticed these concerns on reddit, agreed, figured an issue was worthwhile)
The QtC perfparser does not seem to support symbol resolution via kernel.kallsyms. At least on my machine I always get empty symbols. Fix that upstream.
Trying to build like this:
https://github.com/probonopd/hotspot/blob/patch-1/.travis.yml
Getting:
[ 82%] Building CXX object 3rdparty/CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfelfmap.cpp.o
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp: In member function ‘void PerfParserPrivate::addLocation(const {anonymous}::LocationDefinition&)’:
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:751:29: warning: missing initializer for member ‘{anonymous}::SymbolData::symbol’ [-Wmissing-field-initializers]
symbols.push_back({});
^
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:751:29: warning: missing initializer for member ‘{anonymous}::SymbolData::binary’ [-Wmissing-field-initializers]
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp: In static member function ‘static void PerfParserPrivate::buildCallerCalleeResult(const QVector<FrameData>&, FrameData*)’:
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:899:67: error: parameter declared ‘auto’
[](const FrameData& frame, const auto needle) { return CallerCalleeLocation{frame.symbol, frame.binary} < needle; });
^
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp: In lambda function:
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:899:135: error: ‘needle’ is not captured
[](const FrameData& frame, const auto needle) { return CallerCalleeLocation{frame.symbol, frame.binary} < needle; });
^
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp: In static member function ‘static void PerfParserPrivate::buildCallerCalleeResult(const QVector<FrameData>&, FrameData*)’:
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:902:150: error: no matching function for call to ‘QVector<FrameData>::insert(FrameData*&, <brace-enclosed initializer list>)’
it = callerCalleeData->children.insert(it, {node->symbol, node->binary, node->location, node->address, 0, 0, {}, nullptr});
^
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:902:150: note: candidates are:
In file included from /opt/qt59/include/QtCore/qdebug.h:51:0,
from /opt/qt59/include/QtCore/QDebug:1,
from /home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:31:
/opt/qt59/include/QtCore/qvector.h:441:13: note: void QVector<T>::insert(int, const T&) [with T = FrameData]
inline void QVector<T>::insert(int i, const T &t)
^
/opt/qt59/include/QtCore/qvector.h:441:13: note: no known conversion for argument 2 from ‘<brace-enclosed initializer list>’ to ‘const FrameData&’
/opt/qt59/include/QtCore/qvector.h:445:13: note: void QVector<T>::insert(int, int, const T&) [with T = FrameData]
inline void QVector<T>::insert(int i, int n, const T &t)
^
/opt/qt59/include/QtCore/qvector.h:445:13: note: candidate expects 3 arguments, 2 provided
/opt/qt59/include/QtCore/qvector.h:692:31: note: QVector<T>::iterator QVector<T>::insert(QVector<T>::iterator, QVector<T>::size_type, const T&) [with T = FrameData; QVector<T>::iterator = FrameData*; QVector<T>::size_type = int]
typename QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, const T &t)
^
/opt/qt59/include/QtCore/qvector.h:692:31: note: candidate expects 3 arguments, 2 provided
In file included from /opt/qt59/include/QtCore/qdebug.h:51:0,
from /opt/qt59/include/QtCore/QDebug:1,
from /home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:31:
/opt/qt59/include/QtCore/qvector.h:229:21: note: QVector<T>::iterator QVector<T>::insert(QVector<T>::iterator, const T&) [with T = FrameData; QVector<T>::iterator = FrameData*]
inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
^
/opt/qt59/include/QtCore/qvector.h:229:21: note: no known conversion for argument 2 from ‘<brace-enclosed initializer list>’ to ‘const FrameData&’
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /opt/qt59/include/QtCore/qglobal.h:109,
from /opt/qt59/include/QtCore/qnamespace.h:43,
from /opt/qt59/include/QtCore/qobjectdefs.h:48,
from /opt/qt59/include/QtCore/qobject.h:46,
from /opt/qt59/include/QtCore/QObject:1,
from /home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.h:30,
from /home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:28:
/usr/include/c++/4.8/bits/stl_algo.h: In instantiation of ‘_FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare) [with _FIter = FrameData*; _Tp = {anonymous}::CallerCalleeLocation; _Compare = PerfParserPrivate::buildCallerCalleeResult(const QVector<FrameData>&, FrameData*)::__lambda1]’:
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:899:144: required from here
/usr/include/c++/4.8/bits/stl_algo.h:2447:31: error: no match for call to ‘(PerfParserPrivate::buildCallerCalleeResult(const QVector<FrameData>&, FrameData*)::__lambda1) (FrameData&, const {anonymous}::CallerCalleeLocation&)’
if (__comp(*__middle, __val))
^
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:899:30: note: candidates are:
[](const FrameData& frame, const auto needle) { return CallerCalleeLocation{frame.symbol, frame.binary} < needle; });
^
In file included from /usr/include/c++/4.8/algorithm:62:0,
from /opt/qt59/include/QtCore/qglobal.h:109,
from /opt/qt59/include/QtCore/qnamespace.h:43,
from /opt/qt59/include/QtCore/qobjectdefs.h:48,
from /opt/qt59/include/QtCore/qobject.h:46,
from /opt/qt59/include/QtCore/QObject:1,
from /home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.h:30,
from /home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:28:
/usr/include/c++/4.8/bits/stl_algo.h:2447:31: note: void (*)(const FrameData&) <conversion>
if (__comp(*__middle, __val))
^
/usr/include/c++/4.8/bits/stl_algo.h:2447:31: note: candidate expects 2 arguments, 3 provided
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:899:73: note: PerfParserPrivate::buildCallerCalleeResult(const QVector<FrameData>&, FrameData*)::__lambda1
[](const FrameData& frame, const auto needle) { return CallerCalleeLocation{frame.symbol, frame.binary} < needle; });
^
/home/travis/build/probonopd/hotspot/src/parsers/perf/perfparser.cpp:899:73: note: candidate expects 1 argument, 2 provided
make[2]: *** [src/CMakeFiles/hotspot.dir/parsers/perf/perfparser.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/hotspot.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 85%] Building CXX object 3rdparty/CMakeFiles/hotspot-perfparser.dir/perfparser/app/perfkallsyms.cpp.o
[ 87%] Building CXX object tests/modeltests/CMakeFiles/tst_models.dir/tst_models_automoc.cpp.o
[ 89%] Building CXX object 3rdparty/CMakeFiles/hotspot-perfparser.dir/hotspot-perfparser_automoc.cpp.o
Linking CXX executable tst_models
Linking CXX executable ../lib/hotspot/libexec/hotspot-perfparser
[ 89%] Built target tst_models
[ 89%] Built target hotspot-perfparser
make: *** [all] Error 2
Performance call graph data should also be displayed in a way similar to what KCachegrind does, or what VTune shows in it's caller/callee view:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.