Automatically generate a view of common performance analysis routines
An analysis agent is a powerful built-in utility in Sourcery Analyzer that enables users to automatically generate a pre-processed view of common performance analysis routines. Out of the box, Sourcery Analyzer includes a library of analysis agents that cover a variety of functionality in Linux systems. In addition, users have the flexibility to add custom analysis agents that are tailored to their application or the immediate problem being debugged.
Analysis Agents in Sourcery Analyzer
You have a lot of cores, and you are worried some of them are not pulling their weight. Exposing more details than a utilization curve, the CPU state enables you to not only see idle time, but to also indicate where that non-idle time is going.
Is your consumer thread starving your producer thread of CPU time? Unfortunately, even a well-tuned scheduler can make some bad decisions. When it does, you will clearly see the problem here, and you can give it some extra guidance in the form of priorities, containers, CPU affinity, or even CPU isolation.
Page Fault Rate
Memory management is a wonderful thing, but it introduces a new source of latency when you first touch memory you only thought you allocated. Whether it is after a fork() or after a malloc(), seeing page faults can help explain otherwise mysterious performance dips and tell you where you need to load and lock your memory.
Function Call Flow
A CPU's monotonous existence consists mostly of calling one function after another. However, precisely which functions are called, in which order, and how long they take, is of keen interest to the software developer. By seeing it on a timeline, uncommon patterns, whether they are call sequences or unusual durations, become readily apparent.
Thread Migration Rate
Schedulers do their best to avoid migrating threads from one core to another because it all but guarantees poor cache behavior. However, sometimes that idle core next to a busy peer just proves too tempting. Once is OK, but thread ping-ponging is trouble. It is a situation you might be able to avoid by re-examining your threading strategy, if only you knew that was the source of your application's slow performance.
Custom Analysis Agents
All these analysis agents give you more visibility into your system more easily than ever, but what about your application? Sourcery Analyzer provides an API enabling you to write powerful analysis agents for your own applications, giving you flexibility and customizability that cannot be matched by tools limited to off-the-shelf functionality. Visualizing your application's state machines, or the usage of application-specific data structures, can be the difference between guessing and knowing why your system is behaving the way it is.