Lightweight profiling tool-set for embedded platforms

OData support
Supervisor:
Oláh István
Department of Automation and Applied Informatics

The topic of my thesis was to develop a memory profiler tool for C/C++ programs, which can be integrated easily into embedded software systems without effecting the performance significantly. The tool consists of two parts, a shared library which does the data collection and has to be linked together with the user program, and an individual application which interprets the collected data. The library is written in C, while the application is a C++ program which is C++98 compatible to avoid compatibility problems with older compilers. I developed the tool using the GNU C Library with gcc and g++ compilers, during the development process I got a deeper knowledge about the GNU C library and how to create custom GNU makefiles for different applications, shared libraries. I became familiar with the GNU binutils application package which provides useful tools and libraries under Linux for developers. From the package the application actively uses a library called Binary File Descriptor (BFD). This library provides an interface for opening and decoding Executable and Linkable Format (ELF) binary files which is the standard file format for executables under Linux. The BFD is needed, because the profiler application calculates with the symbols from the binary files to figure out the call chain until one of the allocation function (malloc, realloc and calloc) or free is called. These functions are redefined using the concept of weak and global symbols. The communication between the profiler shared library and the profiler application happen through Inter Process Communication (IPC) objects: shared memory, named pipe (FIFO), shared semaphore. After the data collection has finished, the user can configure the profiler application through a CLI for which analyzer and filter algorithms he/she wants to run on the collected information. For creating the CLI I used the LEX (a lexical analyzer generator) and YACC (Yet Another Compiler Compiler) software packages which provides an easy interface for creating command line interfaces.

Downloads

Please sign in to download the files of this thesis.