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 is the third and last installment of our series about full stack tracing. If you haven’t read them yet, you’ll probably want to check out the introduction and tool setup portions first. In this blog, we’re going to focus on visualizing and interpreting full stack traces.
At this point, we’re going to assume that you’ve already captured a trace file for the problem you’re examining as a common trace format (CTF) file, a structured binary file format that LTTng natively generates. What do you do with this file?
Text output
The first option is to use the babeltrace utility to make the CTF files human readable. Babeltrace converts between trace formats and it has a ton of options. However, the default options and implicit sinks and sources make it trivial to get a text version of a trace:
$ babeltrace2 ./mytracefile.ctf
Nevertheless, the output is quite dense and requires a bit of wading through to make sense of it:
It's not like you couldn’t figure this out, but a bit of visualization and computer-aided assistance could help immensely. This leads us to the next option.
Trace Compass
Provided by the Eclipse foundation, Trace Compass provides a much better way to see what’s in your trace files.
This tool has a lot of options for analyzing kernel and syscall events, as well as sporting a great user interface. While it’s possible to visualize custom trace points in the timeline, it’s very unwieldy to do non-trivial custom analyses within its XML framework. You would need to write a Java plugin for Trace Compass, which I personally don’t feel comfortable doing. (However, if someone else wants to volunteer to add the features that we describe below in ctf2ctf to Trace Compass, I’m sure the community would appreciate having more tools at their disposal!)
Chrome traces
The Chrome browser (using chrome://tracing) can also display traces in Chrome Trace Format, a JSON file format defined by Google. Although Google created Chrome Trace Format for Android and browser tracing, it’s extensible enough to handle other tracing applications. And of course, rather confusingly (but understandably), Google abbreviates this as CTF even though it has nothing to do with the other CTF we’ve been discussing.
How do you get your CTF (Common Trace Format) into CTF (Chrome Trace Format)? Simple! Use ctf2ctf, which is a KDAB-created utility that uses babeltrace to convert from LTTng files to a Chrome-compatible format. It also adds a number of metadata annotations to make the interpretation of your trace files even easier, like adding file names to file descriptors and page faults, showing device names with interrupts, converting string formats as needed, and counting memory page allocations.
After using ctf2ctf and opening the resulting file in Chrome, we get something like this:
Great! The biggest problem with Chrome trace viewing is that JavaScript is limited to 4GB of running memory. That means you are limited in the size of trace files you can view, something to be aware of if you load large files (100MB or larger) and the browser crashes or starts behaving abnormally.
Qt Creator
KDAB also started a project to add trace viewing capability to Qt Creator, which is available in the latest version of Qt. Like the Chrome viewer, this also imports Chrome JSON trace files from our ctf2ctf tool.
Although this feature is available now in the main Qt distribution, we’re still adding features and fixing; if you want to contribute, we would most welcome it.
Kernel areas to focus on
There are several key events that you need to look at to gain essential insights for interpreting a full stack trace. These let you understand the overall execution flow of the system and help you focus on an area of particular interest.
Scheduler trace points (sched_process_fork, sched_switch, sched_process_exec, sched_process_free) These are critical categories of trace points as they delineate application task switches: which process is running, when processes start and stop, and the currently running thread.
Syscalls (openat, close, mmap, read, write, nanosleep, futex, poll, ioctl) These are extremely important as they show when applications make OS calls. Not only do they help you correlate the trace to execution points within your code, they also give you a rough idea of the system interaction and explain various scheduler task switches. (And if you’ve been using ctf2ctf, the file descriptors will be annotated with file names, which is super handy for understanding what those file calls are actually doing.)
Block devices and interrupts Traces on block devices and interrupts are useful to see when the system is I/O bound and to ensure that hardware is operating as expected.
System load
One of the more important uses of a full stack trace is to estimate system load. An unexpectedly heavy load can be very detrimental to the system and it can be quite difficult to identify in any other way.
Examining sched_switch events lets you check the total number of concurrently running threads and processes at any point. CPU frequency can be tracked across the CPU cores, telling you if each core is running flat out (and consuming lots of battery). CPU utilization gives you an estimate as to the overall cycle consumption of the system.
What about RAM? Tracking the kernel memory allocations (kmem_cache_alloc_allocated, kmem_cache_alloc_requested, and mm_page_alloc) shows you how much RAM is in use. If you’re using an x86 processor, watch the page faults. Paging can invalidate all kinds of timing assumptions if not taken into account. (You’ll want to also trace mmap and openat so you can see which file the addresses belong to.)
Interpreting full stack traces with Qt
When it comes to understanding Qt behavior, there are a large number of places that we instrumented useful to interpreting the system’s execution. QCoreApplication initialization, QLibrary loading, QDebug output, event handling, and signal/slot are all traced, as well as QImageReader reading, and QFontDatabase loading.
Note that, as you might expect, all QStrings written into the trace are UTF-16 encoded. That’s not a problem if you’re using ctf2ctf as it converts strings to UTF-8. It is something to be aware of, however, if you’re trying to use babeltrace or TraceCompass as they don’t understand UTF-16 format strings.
For QML applications, we’ve inserted tracepoints for creating QML object instances, QML V4 functions calls, binding execution, QML compilation, and signal handling. This covers a gamut of areas where QML code might need an extra bit of profiling.
And in QtQuick, you have the ability to monitor scene graphs, window and scene rendering, animations, texture uploads, and glyph caching.
With all of these areas traceable, hopefully you’ll be able to extract enough clues from your traces to find out where critical time is going and how to make your application perform better.
What’s next?
Is this the end for visualizing and interpreting full stack traces? There’s lots more we’d like to see. Enhancements we’re considering include better annotation of signals/slots, making the trace APIs public so you can use them in your code, overall improvements to the trace point coverage, and better analysis and visualization tools in Qt Creator. We’d also like to bring this capability to other Linux-like operating systems like Android, macOS, and iOS. Did we mention that if you’re interested in helping, we’re looking for contributors?
We want to help you too! We offer hands-on workshops, as well as a Debugging and Profiling for Linux training class if you’re looking for some help with interpreting your full stack trace project. Leave a comment on this blog if you need a recommendation on what might work best for your team.
About KDAB
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.
Milian Wolff has a long history of creating tools for C++ developers. He’s the main author of Massif-Visualizer, heaptrack, hotspot and ctf2ctf tools now used widely to improve C++ applications performance. He’s a Senior Software Engineer at KDAB where he enjoys solving hard performance problems and teaching developers about debugging and profiling tools. Milian has a Masters Degree in Physics.
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.