Giter Site home page Giter Site logo

kdab / hotspot Goto Github PK

View Code? Open in Web Editor NEW
3.9K 92.0 243.0 7.89 MB

The Linux perf GUI for performance analysis.

CMake 3.42% C++ 92.35% C 0.70% Shell 1.23% Dockerfile 0.88% Python 1.40% Ruby 0.02%
performance-analysis performance qt profiler cpu-profiling linux perf profiling cpp

hotspot's Introduction

Hotspot - the Linux perf GUI for performance analysis

This project is a KDAB 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

Screenshots

Here are some screenshots showing the most important features of hotspot in action:

Visualize Data

The main feature of hotspot is visualizing a perf.data file graphically.

hotspot summary page

hotspot FlameGraph page

hotspot off-CPU analysis

hotspot caller-callee page

hotspot bottom-up page

hotspot top-down page

hotspot dockwidget layouts

Time Line

The time line allows filtering the results by time, process or thread. The data views will update accordingly.

hotspot timeline filtering by time

hotspot timeline filtering by thread or process

hotspot timeline filtering applied to FlameGraph

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 into account though.

hotspot launch application

hotspot attach to process

Getting Hotspot

Note: Hotspot is not yet packaged on all Linux distributions. In such cases, or when 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

Head over to our list of AppImage build jobs. When you click on a job, you'll see a page with an "Artifacts" section that contains an "appimage" binary you can then download. Unzip the AppImage file and make it executable, 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.

To find out how to debug the Appimage, see HACKING.

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 from the distro package manager or as an AppImage.

For everyone that wants to contribute to Hotspot or use the newest version without the Appimage detailed notes are found at HACKING.

Using

General

First of all, record some data with perf. To get backtraces, you will need to enable the dwarf callgraph mode:

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:

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 for details on that). All command line options are shown with --help:

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 extra paths to 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.

Arguments:
  files                    Optional input files to open on startup, i.e.
                           perf.data files.

Off-CPU Profiling

Hotspot supports a very powerful way of doing wait-time analysis, or off-CPU profiling. This analysis is based on kernel tracepoints in the linux scheduler. By recording that data, we can find the time delta during which a thread was not running on the CPU, but instead was off-CPU. There can be multiple reasons for that, all of which can be found using this technique:

  • synchronous I/O, e.g. via read() or write()
  • page faults, e.g. when accessing mmap()'ed file data
  • calls to nanosleep() or yield()
  • lock contention via futex() etc.
  • preemption
  • and probably many more

By leveraging kernel trace points in the scheduler, the overhead is pretty manageable and we only pay a price, when the process is actually getting switched out. Most notably we do not pay a price when e.g. a mutex lock operation can be handled directly in user-space.

To do off-CPU analysis with hotspot, you need to record the data with a very specific command:

perf record \
    -e cycles \                             # on-CPU profiling
    -e sched:sched_switch --switch-events \ # off-CPU profiling
    --sample-cpu \                          # track on which core code is executed
    -m 8M \                                 # reduce chance of event loss
    --aio -z \                              # reduce disk-I/O overhead and data size
    --call-graph dwarf \                    # we definitely want backtraces
    <your application>

Alternatively, you can use the off-CPU check box in hotspot's integrated record page.

During the analysis, you can then switch between the "cycles" cost view for on-CPU data to the "off-CPU time" cost view for wait-time analysis. Often, you will want to change between both, e.g. to find places in your code which may require further parallelization (see also Amdahl's law).

The "sched:sched_switch" cost will also be shown to you. But in my opinion that is less useful, as it only indicates the number of scheduler switches. The length of the time inbetween is often way more interesting to me - and that's what is shown to you in the "off-CPU time" metric.

Embedded Systems

If you are recording on an embedded system, you will want to analyze the data on your development machine with hotspot. To do so, make sure your sysroot contains the debug information required for unwinding (see below). Then record the data on your embedded system:

embedded$ 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) ]
embedded$ cp /proc/kallsyms /tmp/kallsyms # make pseudo-file a real file

It's OK if your embedded machine is using a different platform than your host. On your host, do the following steps then to analyze the data:

host$ scp embedded:perf.data embedded:/tmp/kallsyms .
host$ hotspot --sysroot /path/to/sysroot --kallsyms kallsyms \
              perf.data

If you manually deployed an application from a path outside your sysroot, do this instead:

host$ hotspot --sysroot /path/to/sysroot --kallsyms kallsyms --appPath /path/to/app \
              perf.data

If your application is also using libraries outside your sysroot and the appPath, do this:

host$ hotspot --sysroot /path/to/sysroot --kallsyms kallsyms --appPath /path/to/app \
              --extraLibPaths /path/to/lib1:/path/to/lib2:... \
              perf.data

And, worst-case, if you also use split debug files in non-standard locations, do this:

host$ hotspot --sysroot /path/to/sysroot --kallsyms kallsyms --appPath /path/to/app \
              --extraLibPaths /path/to/lib1:/path/to/lib2:... \
              --debugPaths /path/to/debug1:/path/to/debug2:... \
              perf.data

Import Export

The perf.data file format is not self-contained. To analyze it, you need access to the executables and libraries of the profiled process, together with debug symbols. This makes it unwieldy to share such files across machines, e.g. to get the help from a colleague to investigate a performance issue, or for bug reporting purposes.

Hotspot allows you to export the analyzed data, which is then fully self-contained. This feature is accessible via the "File > Save As" menu action. The data is then saved in a self-contained *.perfparser file. To import the data into hotspot again, just open that file directly in place of the original perf.data file.

Note: The file format is not yet stable. Meaning data exported by one version of hotspot can only be read back in by the same version. This problem will be resolved in the future, as time permits.

tracepoints

hotspot currently only shows the name of the tracepoints in the timeline.

hotspot tracepoints

Disassembler

hotspot disassembler page

Hotspot includes an disassembler, which can show you the cost per instruction. The disassembler uses colors to indicate which assembly lines correspond to which source code line. For easier navigation, you can simply click on a line and the other view will jump to it. You can follow function calls with a double click. In the sourcecode view you can press ctrl+f or press the search icon to open a search window.

If you have the sources in different directory, you can use --sourcePaths or the settings to select tell the disassembler to search there for the source code.

Known Issues

If anything breaks in the above and the output is less usable than perf report, please report an issue on GitHub. That said, there are some known issues that people may trip over:

Broken Backtraces

Unwinding the stack to produce a backtrace is a dark art and can go wrong in many ways. Hotspot relies on perfparser (see below), which in turn relies on libdw from elfutils to unwind the stack. This works quite well most of the time, but still can go wrong. Most notably, unwinding will fail when:

  • an ELF file (i.e. executable or library) referenced by the perf.data file is missing
    • to fix this, try to use one of the following CLI arguments to let hotspot know where to look for the ELF files:
      • --debugPaths <paths>: Use this when you have split debug files in non-standard locations
      • --extraLibPaths <paths>: Use this when you have moved libraries to some other location since recording
      • --appPath <paths>: This is kind of a combination of the above two fields. The path is traversed recursively, looking for debug files and libraries.
      • --sysroot <path>: Use this when you try to inspect a data file recorded on an embedded platform
  • an ELF file is missing debug information
    • to fix this, install the debug package from your distro
    • or compile the code in "release with debug" mode, i.e. ensure your compiler is invoked with something like -O2 -g. You will have to repeat the perf record step
    • potentially both of the above is not an option for you, e.g. when the library is closed source and supplied by a thirdparty vendor. If that is the case, you may be lucky and the library contains frame pointers. If so, then try to build elfutils from current git master (you want commit a55df2c1, which should be part of 0.170). This version of elfutils will try to fallback to the frame pointer for unwinding, when the debug information is missing.
  • your call stacks are too deep
    • by default, perf record only copies a part of the stack to the data file. This can lead to issues with very deep call stacks, which will be cut off at some point. This issue will break the top-down call trees in hotspot, as visualized in the Top-Down view or the Flame Graph. To fix this, you can try to increase the stack dump size, i.e.:

      perf record --call-graph dwarf,32768
      

      Note that this can dramatically increase the size of the perf.data files - use it with care. Also have a look at man perf record.

    • For some scenarios, recursive function calls simply fail to be unwound. See also #93

debuginfod

hotspot supports downloading debug symbols via debuginfod. This can be enabled by either adding download urls in the settings or launching hotspot with DEBUGINFOD_URLS defined in the environment.

Missing Features

Compared to perf report, hotspot misses a lot of features. Some of these are planned to be resolved in the future. Others may potentially never get implemented. But be aware that the following features are not available in hotspot currently:

  • the columns in the tables are currently hardcoded, while potentially a user may want to change this to show e.g. cost per-process or thread and so forth. Basic group-by functionality was added, but a more flexible column arrangement a la WPA is not planned for now.
  • many of the more advanced features, such as --itrace, --mem-mode, --branch-stack and --branch-history, are unsupported

Recording with perf without super user rights

It is not a good idea to launch hotspot with sudo or as root user. See e.g. Editing Files As Root for an article on that matter. Issue #83 is also relevant in this contact.

But without superuser rights, you may see error messages such as the following when using hotspot's record feature:

You may not have permission to collect stats.
Consider tweaking /proc/sys/kernel/perf_event_paranoid:
  -1 - Not paranoid at all
   0 - Disallow raw tracepoint access for unpriv
   1 - Disallow cpu events for unpriv
   2 - Disallow kernel profiling for unpriv

To workaround this limitation, hotspot can run perf itself with elevated privileges.

Export File Format

The current data export is limited to a format that can only be read back by hotspot of the same version. This makes interop with other visualization tools quasi impossible. This is known and will get improved in the future. Most notably support for export to web viewers such as perfetto or the Mozilla profiler is planned but not yet implemented. Patches welcome!

Qt Creator

This project leverages the excellent perfparser utility created by The Qt Company for their Qt Creator IDE. If you are already using Qt Creator, consider leveraging its integrated CPU Usage Analyzer.

License

Hotspot is the GPL v2+. See LICENSE.GPL.txt for more information, or contact [email protected] if any conditions of this licensing are not clear to you.

hotspot's People

Contributors

albert-astals-cid-kdab avatar aleixpol avatar calinou avatar cb750-rider avatar danielchabrowski avatar dfaure avatar dknysh avatar erijo avatar gitmensch avatar jktjkt avatar kbroulik avatar koenpoppe avatar kpales avatar krf avatar lievenhey avatar martinus avatar mgerhardy avatar milianw avatar nanxiao avatar newproggie avatar nicolasfella avatar nilsdeppe avatar nwrogers avatar quexint avatar redstrate avatar ristovski avatar supervacuus avatar tmcguire avatar winterz avatar zeno-endemann-kdab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hotspot's Issues

Can't start the application without LD_LIBRARY_PATH

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.

aggregated caller/callee view

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:

  • aggregate data by symbol name
  • add one entry per symbol to a flat table view showing inclusive/exclusive cost

dynamic column aggregation configuration

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:

  • thread
  • program (when profiling multple programs)
  • dso
  • cpu

support multiple perf event sources

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:

  • display CPI (cycles per instructions) when both cycles and instructions are measured in a group
  • percentage of branch-misses, when we measure both branches and brach-misses
  • same for cache-misses
  • ...

1.0 github tarball does not build

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

improve multi-process support

when the trace contains multiple processes, it would be useful to split the data in the reports by default (on demand)

  • have one entry per process in the flamegraph
  • have one entry per process in the top-down/bottom-up views
  • filter the caller/callee view per process

maybe this first needs us to implement #4 in a sane way, because probably we may want the same for threads, cgroups, ...

add top-down call graph view

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.

generate reports

It would be nice to be able to generate a PDF report, potentially using KDReport.

  • show summary page tables
  • show minified bottom-up/top-down view, i.e. do something like massif does:
    • only display nodes with a cost of at least X% to parent
    • merge all other nodes in a "an Y% from elsewhere" node
  • potentially for the future:
    • include flamegraph
    • show charts

integrate heaptrack

Make hotspot support different parser backends, and add one for heaptrack and share as much code as possible for the visualization part.

optimize filtering

The current filtering is not as efficient as it could be. Most notably, we concatenate the symbol+binary strings. Instead we should:

  • inherit from QSortFilterProxyModel
  • in its filterAcceptsRow overload, ask the model directly whether it matches the given needle
  • in the model, check against the symbol contents

Note that we cannot simply return a Data::Symbol variant, as that would still allocate the data on the heap for type erasure.

report issues when parsing files

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:

  • elf not found
  • missing debug symbols
  • broken backtraces
  • ...

flamegraph view

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.

Cannot build hotspot-perfparser

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

Find .debug files in same directory as binary

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.

overview page

Hotspot should show an overview page, similar to what VTune displays whenever you open a new profiling result:

  • total number of samples in the profile
  • total time tracked by profile
  • top X hotspots

if possible:

  • CPU time
  • total number of $event-type (i.e. cycles, instructions, cache-misses, ...) essentially what you'd get otherwise from perf stat

potentially also useful:

  • perf command used to record data
  • event types in the data (i.e. cycles, instructions, ...)
  • number of processes
  • number of threads

export flamegraph

would be nice if we could export the flamegraph

  • print to pdf
  • export as (interactive?) svg
  • export as image

somewhat related to #36

improve parse speed

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

text selection + copy support on summary page

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

dynamic filtering in call graph view

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).

Symbols not resolved for clang

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.

bottom-up call graph view

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.

Problematic name

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)

difference view between two reports

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

Perfparser cannot handle perfs deleted files

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

get a logo

We need a logo and potentially some more icons for hotspot

visualize events over time

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.

Perfparser exits with code 5 when opening perf.data file

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.

Couldn't find architecture of any ELF

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?

Increase support for LTS distros such as RHEL 7 and Ubuntu 16.04 LTS

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?

annotate source

add an "annotate source" view, similar to what other profilers have:

  • source code with cost aggregated by line, show both inclusive/exclusive cost if possible
  • assembly code with cost per instruction, again if possible also show inclusive cost for callq & friends

open editor feature

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.

warn user when no callgraph is available

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

launch perf from hotspot

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.

correlate event metrics

cf. the original request from #14:

when collecting multiple perf event sources in one profile, Hotspot should correlate different metrics. For example we should:

  • display CPI (cycles per instructions) when both cycles and instructions are measured in a group
  • percentage of branch-misses, when we measure both branches and brach-misses
  • dito for cache-misses
  • dito for topdown metrics
  • ...

support off-cpu profiling data

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.

jump to callers/callee view from stack views

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.

Compile error: ThreadWeaver/ThreadWeaver: No such file or directory

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

dynamic sorting in call graph views

The call graph views should be dynamically sortable. Most notably, this is useful to switch between sorting by exclusive cost vs. inclusive cost.

ECM undeclared dependency

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!

proper tooltips for models

most models don't yet show good tooltips, this should be fixed

  • a tooltip should be the same for all columns
  • it should include the information of all columns
  • it should show cost as both, percentage to total as well as absolute numbers

Display which debug symbols are missing in summary

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.

.deb (and maybe other) distribution packaging

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.

CPU usage timeline

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

forward PerfFeatures from perfparser

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:

  • cmdline
  • nrCpus
  • totalMem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.