Trisha Shetty (Editor)

MTuner

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

MTuner is a free application for profiling memory usage in C/C++ applications for 32 and 64-bit platforms. It is a postmortem profiler, gathering data during application execution and analyzing it once the application execution is finished. Through its instrumentation API it provides support for multiple platforms, supporting Windows, PlayStation 4 and PlayStation 3 out of the box, with ability to support any platform targeted by a Windows based cross compiler. It has both GUI and command line interfaces. The client is currently available for Microsoft Windows operating system. MTuner was created by Milos Tosic.

Contents

Memory profiling

MTuner works by intercepting all memory operations and collecting all related information (call stack, time, size, etc.). Depending on the operating system and/or compiler of choice this is done in three ways:

Hooking low level operating system routines
this is, at the moment, a feature that works only for Microsoft Windows applications. For applications compiled with Visual C++ the Program database will be used to read symbol information.
Link time redirection of memory routines
this approach is taking advantage of function wrapping supported by GCC compilers to intercept libc memory allocation routines.
Manual instrumentation using MTuner SDK
this is a method of choice for power users who require additional information during the capture. Manual instrumentation allows for classification of memory operations through timed events and operation tags.

Features

Time based history of memory activity
MTuner keeps in memory the data about all the memory operations performed and their mutual relationship. Each allocation is captured with complete information about it (call stack, size, alignment, thread ID, etc.).
Allocation histogram
memory operations are binned according to their size allowing to visualize the distribution of memory allocation sizes.
MTuner SDK
manual instrumentation of applications adds timed events and memory tags. Timed events help distinguish different phases of application execution.
Memory tag trees
allocations can be categorized through manual instrumentation and a breakdown of memory usage per tag/category is displayed in a hierarchical tree structure.
Continuous integration support
using command line support, MTuner can be integrated into server side build process generating automated memory reports.
Filtering
different views can be combined to create filters narrowing down lists of memory operations. Using filtering it is possible to create complex queries to list only memory operations of interest.

References

MTuner Wikipedia