Trusted Software Excellence across Desktop and Embedded
Take a glance at the areas of expertise where KDAB excels ranging from swift troubleshooting, ongoing consulting and training to multi-year, large-scale software development projects.
Find out why customers from innovative industries rely on our extensive expertise, including Medical, Biotech, Science, Renewable Energy, Transportation, Mobility, Aviation, Automation, Electronics, Agriculture and Defense.
High-quality Embedded Engineering across the Stack
To successfully develop an embedded device that meets your expectations regarding quality, budget and time to market, all parts of the project need to fit perfectly together.
Learn more about KDAB's expertise in embedded software development.
Where the capabilities of modern mobile devices or web browsers fall short, KDAB engineers help you expertly architect and build high-functioning desktop and workstation applications.
Extensible, Safety-compliant Software for the Medical Sector
Create intelligent, patient-focused medical software and devices and stay ahead with technology that adapts to your needs.
KDAB offers you expertise in developing a broad spectrum of clinical and home-healthcare devices, including but not limited to, internal imaging systems, robotic surgery devices, ventilators and non-invasive monitoring systems.
Building digital dashboards and cockpits with fluid animations and gesture-controlled touchscreens is a big challenge.
In over two decades of developing intricate UI solutions for cars, trucks, tractors, scooters, ships, airplanes and more, the KDAB team has gained market leading expertise in this realm.
Build on Advanced Expertise when creating Modern UIs
KDAB assists you in the creation of user-friendly interfaces designed specifically for industrial process control, manufacturing, and fabrication.
Our specialties encompass the custom design and development of HMIs, enabling product accessibility from embedded systems, remote desktops, and mobile devices on the move.
Legacy software is a growing but often ignored problem across all industries. KDAB helps you elevate your aging code base to meet the dynamic needs of the future.
Whether you want to migrate from an old to a modern GUI toolkit, update to a more recent version, or modernize your code base, you can rely on over 25 years of modernization experience.
KDAB offers a wide range of services to address your software needs including consulting, development, workshops and training tailored to your requirements.
Our expertise spans cross-platform desktop, embedded and 3D application development, using the proven technologies for the job.
When working with KDAB, the first-ever Qt consultancy, you benefit from a deep understanding of Qt internals, that allows us to provide effective solutions, irrespective of the depth or scale of your Qt project.
Qt Services include developing applications, building runtimes, mixing native and web technologies, solving performance issues, and porting problems.
KDAB helps create commercial, scientific or industrial desktop applications from scratch, or update its code or framework to benefit from modern features.
Discover clean, efficient solutions that precisely meet your requirements.
Boost your team's programming skills with in-depth, constantly updated, hands-on training courses delivered by active software engineers who love to teach and share their knowledge.
Our courses cover Modern C++, Qt/QML, Rust, 3D programming, Debugging, Profiling and more.
The collective expertise of KDAB's engineering team is at your disposal to help you choose the software stack for your project or master domain-specific challenges.
Our particular focus is on software technologies you use for cross-platform applications or for embedded devices.
Since 1999, KDAB has been the largest independent Qt consultancy worldwide and today is a Qt Platinum partner. Our experts can help you with any aspect of software development with Qt and QML.
KDAB specializes in Modern C++ development, with a focus on desktop applications, GUI, embedded software, and operating systems.
Our experts are industry-recognized contributors and trainers, leveraging C++'s power and relevance across these domains to deliver high-quality software solutions.
KDAB can guide you incorporating Rust into your project, from as overlapping element to your existing C++ codebase to a complete replacement of your legacy code.
Unique Expertise for Desktop and Embedded Platforms
Whether you are using Linux, Windows, MacOS, Android, iOS or real-time OS, KDAB helps you create performance optimized applications on your preferred platform.
If you are planning to create projects with Slint, a lightweight alternative to standard GUI frameworks especially on low-end hardware, you can rely on the expertise of KDAB being one of the earliest adopters and official service partner of Slint.
KDAB has deep expertise in embedded systems, which coupled with Flutter proficiency, allows us to provide comprehensive support throughout the software development lifecycle.
Our engineers are constantly contributing to the Flutter ecosystem, for example by developing flutter-pi, one of the most used embedders.
KDAB invests significant time in exploring new software technologies to maintain its position as software authority. Benefit from this research and incorporate it eventually into your own project.
Start here to browse infos on the KDAB website(s) and take advantage of useful developer resources like blogs, publications and videos about Qt, C++, Rust, 3D technologies like OpenGL and Vulkan, the KDAB developer tools and more.
The KDAB Youtube channel has become a go-to source for developers looking for high-quality tutorial and information material around software development with Qt/QML, C++, Rust and other technologies.
Click to navigate the all KDAB videos directly on this website.
In over 25 years KDAB has served hundreds of customers from various industries, many of them having become long-term customers who value our unique expertise and dedication.
Learn more about KDAB as a company, understand why we are considered a trusted partner by many and explore project examples in which we have proven to be the right supplier.
The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications.
Read more about the history, the values, the team and the founder of the company.
When working with KDAB you can expect quality software and the desired business outcomes thanks to decades of experience gathered in hundreds of projects of different sizes in various industries.
Have a look at selected examples where KDAB has helped customers to succeed with their projects.
KDAB is committed to developing high-quality and high-performance software, and helping other developers deliver to the same high standards.
We create software with pride to improve your engineering and your business, making your products more resilient and maintainable with better performance.
KDAB has been the first certified Qt consulting and software development company in the world, and continues to deliver quality processes that meet or exceed the highest expectations.
In KDAB we value practical software development experience and skills higher than academic degrees. We strive to ensure equal treatment of all our employees regardless of age, ethnicity, gender, sexual orientation, nationality.
Interested? Read more about working at KDAB and how to apply for a job in software engineering or business administration.
This blog will give you a brief overview of profiling C and C++ applications. Additionally, it will lay before you all of the tools available, with the purpose of aiding you in choosing the right tools at the right times.
The Steps for Profiling
Before we look at the actual tools, let's go over the steps to profiling. It's quite important to have a technique for doing this properly, to avoid the trap of changing something hoping it's better, committing it, and going home without making sure that you've actually improved things. So the way to do that is by, first, assessing what is important in terms of performance in your project. Is it the CPU usage? Is it the off CPU time, when your application is sleeping or waiting for something to happen? Is it memory allocations? Is it the battery usage that is the problem? Do you want to improve the frame rate? It can be many, many different things, not just one. It's a whole set of measures.
First, you'll want to assess what is important for your project. What do you want to measure?
Then, you'll decide which tools you can use to do these measurements. There are many different tools and they all cover a number of possible things to measure.
After you select your tools, you should write a benchmark. That means a reliable way of measuring something in your application. If you have to start the application, click here, click there, load a file, wait for something to be downloaded and so on and so on, you won't be able to do so three times in a row and get the same measurements. It's much better if you write some sort of automated test, like a unit test but for benchmarking instead of correctness, which means measuring the performance of a specific task. You decide what to measure, how to measure, and write a benchmark to actually be able to measure that reliably.
Use one of the tools to run the benchmark and establish a baseline by measuring the benchmark, before you make any changes to the code.
At step five, you can finally change the code. Keep in mind that you do not change the code until step 5. After you change it, measure the result, compare it to the baseline, and decide whether or not the change is an improvement. That can be a bit tricky if it's better on one measure than it is on another. You need to decide if that's good enough or if you should refine the solution.
Then, you would measure it again with the changes, repeat up to step 4, profile, repeat step 5, make the changes again, and so on.
The Tools to Use
In order to choose the best tools for the job, it's important to be aware of all the tools that are available and when to use them.
For Measuring Performance
Let's talk first about measurements of performance, specifically, CPU and off CPU performance.
VTune
To measure performance, you can use VTune, which is made by Intel. It's a very powerful tool for this with a very nice user interface. VTune is available for both Linux and Windows and is free if you download it as part of Intel System Studio. Don't look for it separately as VTune, but as part of the Intel System Studio suite of tools. It's actually free for use -- even for commercial use. VTune does, however, have one limitation -- it requires Intel hardware, which means you can't use it on AMD CPUs or ARM, if you have embedded boards. Apart from that one limitation, it's a very good tool.
Perf
Another tool you can use to measure performance is perf, which is part of the Linux kernel. That means it supports all of the architectures of the Linux kernel, including x86, ARM, PPC, and so on. Unfortunately, perf has no user interface. It's a command line tool that is pretty difficult to use. So, we at KDAB wrote a tool called Hotspot, which is a graphical interface for the measurements made by perf.
You can find Hotspot on GitHub. It's an open source application that you can use for free. Its goal is to be easy to use and it covers most of the common use cases, including watching the CPU time used by the application and finding out who is using that time. It also supports measuring off CPU time, meaning the time when the application is sleeping or waiting for something to happen. Click here to watch a full demo of Hotspot.
For Measuring Memory Allocations
Another thing you might want to measure, as previously mentioned, is memory allocations -- not just memory leaks but also the use of memory while the application is running.
Valgrind Massif
If your application is cleaning up everything on the end, heavy memory usage will not show up as a leak. So, the leak-checking tools will not help. But if your application is using too much memory while it's running, you might want to use different tools that can pinpoint where those allocations happen. One tool that does that is Valgrind Massif. It does the job quite well, but is really slow.
Heaptrack
Another approach is to use Heaptrack, an open source tool that's part of KDE. It was developed by one of my colleagues, Milian Wolff. Heaptrack is able to locate and recall all of the memory allocations done while the application is running. Then it will show you graphs of the allocations, including temporary allocations, which is when an area of memory is allocated and then freed right away afterwards.
This could be wanted, of course, but can also be something to optimize. It can show you, for different memory sizes, whether you often allocate small memory sizes or large ones. And of course if shows you a backtrace for every allocation, so you can relate the application's software memory to your code to help you find out which piece of code is doing it. It is a lot faster than Valgrind Massif. You almost don't see that during Heaptrack.
Another feature that Heaptrack has over Valgrind is that you can attach Heaptrack to a running program. This is quite useful if you want to measure only one operation, as opposed to the whole setup of the application. It can also show you the difference between tool runs, which is extremely useful if you apply the process that was mentioned earlier. You can measure the baseline, measure with the changes, and Heaptrack will show you only the difference between the two so you can figure out by how much you've improved things when making changes.
Trusted software excellence across embedded and desktop platforms
The KDAB Group is a globally recognized provider for software consulting, development and training, specializing in embedded devices and complex cross-platform desktop applications. In addition to being leading experts in Qt, C++ and 3D technologies for over two decades, KDAB provides deep expertise across the stack, including Linux, Rust and modern UI frameworks. With 100+ employees from 20 countries and offices in Sweden, Germany, USA, France and UK, we serve clients around the world.
For performance measurement, you can also use valgrind --tool=callgrind and the graphical tool kcachegrind for analyzing.
20 - Dec - 2022
David Faure
Hi Martin! Indeed, this is another option. I have however stopped using it because it's very very slow (acceptable on benchmarks, but unusable on real-world applications). perf+hotspot gets results much faster. The only thing callgrind/kcachegrind can give us that perf+hotspot can't, is call counts (how many times a given function was called). But the primary questions we're usually asking ourselves is which functions are the ones we spend most time in, which both can do, but hotspot can do much faster; it's often clear (or easy to find out) whether that's because the function takes a very long time or is called too many times.
5 - Jan - 2023
Jorge
The thing I miss the most with perf is tracing and/or being able to easily delimit what part of the application you want to analyse.
Perf is great in the sense that it can collect a ton of information, but as a developer you already know what parts of your software need improvement. Collecting the whole execution can create huge perf.data files that take a while to load. I've found that sending a SIGUSR2 signal you can direct the sampling process to move on to a new dump file but I've always found that cumbersome to use.
On another hand, Intel VTune can open (or at least it used to) perf files! For some reason the GUI does not find them under the default filename "perf.data" but it expects a ".perf" extension, so if you rename your files it will open them correctly. The reports are obviously lackluster compared to the ones you can generate with Intel's own sampling kernel module.
5 - Jan - 2023
David Faure
Hello Jorge,
I agree that collecting the whole execution leads to too much information. This is why I usually only sample 5 seconds of the intense activity (moment of high CPU usage) I'm interested in.
I do this with something like: perf record -z --call-graph dwarf -p pidof MyApp
and then press Ctrl+C after 5 seconds.
You're completely right. The text in this blog is based on a YouTube video I recorded some time ago, and since then VTune is indeed available separately, I forgot to update this bit in the blog. Thanks for pointing it out for our readers!
26 - Apr - 2023
Qiao
Great thanks for the continuous effort on Hotspot and Heaptrack. They're really useful and friendly.
David Faure
Senior Software Engineer
Senior software engineer and Managing Director of KDAB’s French office, David is a Qt user since its beginning. He has made numerous contributions to Qt, including new classes for QtCore in Qt 5. David is well known in the KDE project for his work on the web browser and especially on KDE Frameworks. He has become a specialist in multithreading with Qt, as well as performance optimizations. David holds an MSc in Computer Science.
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
7 Comments
20 - Dec - 2022
Martin Koller
For performance measurement, you can also use valgrind --tool=callgrind and the graphical tool kcachegrind for analyzing.
20 - Dec - 2022
David Faure
Hi Martin! Indeed, this is another option. I have however stopped using it because it's very very slow (acceptable on benchmarks, but unusable on real-world applications). perf+hotspot gets results much faster. The only thing callgrind/kcachegrind can give us that perf+hotspot can't, is call counts (how many times a given function was called). But the primary questions we're usually asking ourselves is which functions are the ones we spend most time in, which both can do, but hotspot can do much faster; it's often clear (or easy to find out) whether that's because the function takes a very long time or is called too many times.
5 - Jan - 2023
Jorge
The thing I miss the most with perf is tracing and/or being able to easily delimit what part of the application you want to analyse.
Perf is great in the sense that it can collect a ton of information, but as a developer you already know what parts of your software need improvement. Collecting the whole execution can create huge perf.data files that take a while to load. I've found that sending a SIGUSR2 signal you can direct the sampling process to move on to a new dump file but I've always found that cumbersome to use.
On another hand, Intel VTune can open (or at least it used to) perf files! For some reason the GUI does not find them under the default filename "perf.data" but it expects a ".perf" extension, so if you rename your files it will open them correctly. The reports are obviously lackluster compared to the ones you can generate with Intel's own sampling kernel module.
5 - Jan - 2023
David Faure
Hello Jorge,
I agree that collecting the whole execution leads to too much information. This is why I usually only sample 5 seconds of the intense activity (moment of high CPU usage) I'm interested in. I do this with something like: perf record -z --call-graph dwarf -p
pidof MyApp
and then press Ctrl+C after 5 seconds.6 - Jan - 2023
David
VTune is actually available as a standalone download: https://www.intel.com/content/www/us/en/developer/tools/oneapi/vtune-profiler-download.html ;)
6 - Jan - 2023
David Faure
You're completely right. The text in this blog is based on a YouTube video I recorded some time ago, and since then VTune is indeed available separately, I forgot to update this bit in the blog. Thanks for pointing it out for our readers!
26 - Apr - 2023
Qiao
Great thanks for the continuous effort on Hotspot and Heaptrack. They're really useful and friendly.