Tips For Investigating Performance Issues
Performance and profiling do go together but it helps to execute a few steps and to setup some processes in a development cycle that quickly and accurately help in narrowing down the source of the problem.
Performance and profiling do go together but it helps to execute a few steps and to setup some processes in a development cycle that quickly and accurately help in narrowing down the source of the problem.
Introduction The build and debug cycle can be tedious especially when you are unsure whether the change you have in mind solves your problem or not. Sometimes it is good to be able to tweak the logic of your code during a debugging session. This article explains how to make minor adjustments to code without [...]
Debugging in assembly is not an optional skill to have. Every developer encounters a situation where there is no other alternative other than cracking open the assembly code. Here are a few reasons why a developer should get their hands dirty with this skill -
If you work on multiple platforms and use different debuggers, you are expected to know the debugger’s user interfaces well enough. At times this gets confusing especially if you have one primary platform and you work on other platforms rather infrequently. I have compiled a list of my favorite features in a debugger and [...]
Data breakpoints are now becoming a part of common breakpoint vocabulary. They help in detecting heap corruption, inadvertent data overwrites and writing past buffer boundaries. Most programmer’s restrict the definition of data breakpoints to breakpoints that help halting the execution of code in the debugger when memory is written to. This is the kind of [...]
It is very useful to be able to break execution of code at a line number of your choice. Breakpoints are provided in debuggers to do exactly that. It is fun getting to the root of the problem by setting breakpoints in a debug session. It is even more fun to know how do breakpoints work in the first place.
While running your program in memory intensive workflows, you may often run into a situation where the low memory condition starts to thrash the system. Such a program usually exhibits a performance problem as it has consumed most of its available virtual memory. Developers often use their favorite profilers to figure out the performance bottlenecks [...]
strace is a great tool on Linux that every developer should be aware of. It helps trace system APIs – the APIs used, parameters passed and the error value returned. It does not require root permissions to run. You can generate a system call trace on a command that is executed or you can trace [...]
Have you faced the problem of breakpoint clutter where breakpoints keep piling up only to hinder the debugging session? It is then that one realizes that there are some breakpoints that can be deleted and others disabled. A useful feature in a debugger is a temporary breakpoint that automagically gets deleted when hit thereby reducing the clutter of unnecessary breakpoints. These [...]
If you haven’t debugged in assembly yet, you haven’t debugged enough Debugging assembly in gdb can be tricky at times. A normal debugging session involving assembly language consists of the following steps – Launch the program in gdb and set the required breakpoint(s). When the breakpoint is hit, use the disassemble command to view [...]