Dynamic Analysis of Cache Memory Usage
Rantala, Olli (2016)
Rantala, Olli
2016
Sähkötekniikan koulutusohjelma
Tieto- ja sähkötekniikan tiedekunta - Faculty of Computing and Electrical Engineering
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2016-06-08
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tty-201605194012
https://urn.fi/URN:NBN:fi:tty-201605194012
Tiivistelmä
Cache memory in processors is used to store temporary copies of the data and instructions a running program uses. Cache usage increases the program execution performance because reading data from and writing data to the cache is faster than using the system’s main memory. Even though cache memories are too small to hold all the data the program needs, due to the temporal and spatial locality properties of programs they improve the memory access times of the system. A cache hit is an event that happens when the data a program needs is found in the processor’s cache and a cache miss an event where the data is not found in the cache. When a cache miss happens, the processor has to use the system’s main memory and wait for the read or write operation to finish. The processor hardware controls the cache usage but the programmer can improve it with proper design of the source code.
Cachegrind is a tool that is used to perform dynamic cache usage analysis. When a client program is run under Cachegrind’s control, the tool counts the amount of cache misses that take place during the execution of the program. Cachegrind pinpoints the exact places in the program’s source code where cache misses are happening and the programmer can redesign the code based on the results to decrease the amount of misses. The aim of this thesis is to study if Cachegrind can be used to analyze the cache usage of a Long Term Evolution (LTE) base station software.
When Cachegrind was used on the base station device, the client program crashed at startup. This happened because Cachegrind causes changes in the execution of the client. As a result, the analysis was conducted using a host environment that runs the same software on a normal computer. Another tool called Callgrind was also used. Callgrind extends the functionality of Cachegrind by offering many additional features that were helpful in the analysis. The results were used to make changes in the source code and several thousand cache misses were removed from the software.
Cachegrind is a tool that is used to perform dynamic cache usage analysis. When a client program is run under Cachegrind’s control, the tool counts the amount of cache misses that take place during the execution of the program. Cachegrind pinpoints the exact places in the program’s source code where cache misses are happening and the programmer can redesign the code based on the results to decrease the amount of misses. The aim of this thesis is to study if Cachegrind can be used to analyze the cache usage of a Long Term Evolution (LTE) base station software.
When Cachegrind was used on the base station device, the client program crashed at startup. This happened because Cachegrind causes changes in the execution of the client. As a result, the analysis was conducted using a host environment that runs the same software on a normal computer. Another tool called Callgrind was also used. Callgrind extends the functionality of Cachegrind by offering many additional features that were helpful in the analysis. The results were used to make changes in the source code and several thousand cache misses were removed from the software.