# Inferring TLB Configuration with Performance Tools
## 2 Materials and Methods
### Data Collection Method  
The data for this study were gathered from computer systems operating under the Linux OS. This OS is particularly advantageous as it provides a system facility to aggregate data from multiple HPC reads, which are crucial for our analysis. Utilizing the perf tool, we were able to monitor and record events related to the TLBs.  
To capture the data, we employed a combination of C programs and shell scripts. These scripts were specifically designed to extract precise values from the TLB events monitored by the perf tool. We placed emphasis on collecting a broad spectrum of TLB event counts for a variety of candidate 'ways' and'sets'. This comprehensive approach ensures that our dataset is robust and diverse, providing us with a large amount of information. Such a dataset provides insights into the system's performance and behavior under various configurations of 'ways' and'sets'. This level of detailed data collection paves the way for a more detailed understanding and analysis of the TLB's functioning in Linux-operated computer systems.  
In this study, HPCs played a key role in the collection of the heatmap dataset. These HPCs enable the precise collection and utilization of the dataset. The heatmap plot, which is generated from the data, serves as a crucial visualization tool. It illustrates how the values of specific events fluctuate as we vary the'sets' and 'ways' parameters. This visual representation is not just an analytical convenience but an instrument for identifying patterns, discerning differences, and understanding relationships within the data.  
Gradient plots are generated as an alternative methodology for determining the TLB configuration. These plots are analyzed to identify patterns indicating how gradient values correlate with an increase in events, directly linked to the TLB's 'ways' and'sets' combination. Alternatively, the gradient plot could also serve to complement the heatmap analysis, offering a multifaceted view of the data.  
To ensure comprehensive data collection and analysis, we integrated several tools and platforms. The Linux operating system provided the necessary environment to access and effectively utilize the HPCs. The perf tool was employed to monitor relevant TLB events, capturing the data required for our analysis. Furthermore, Visual Studio Code (VSCode) served as the development platform for our C, Shell, and Python scripts. These scripts were crucial in both collecting and analyzing the data, ensuring that our methodology was rigorous and precise.  
We replicated these methodologies on different CPU platforms, specifically the Intel Xeon, the Core i9, and the IBM Power9. By applying the same tools and techniques to collect and analyze data on these CPUs, we aim to test the transferability of the methodologies across different CPU architectures. This step is crucial to ensure whether our findings and insights are specific to a particular CPU model or if they hold broader applicability.  
The final phase of our study involves a comparative analysis between the results obtained from the Intel Xeon and Intel Core i9 CPUs. This comparison provides insights into the differences and similarities in TLB configurations across these CPUs but also enhances our understanding of how these configurations influence system performance. By contrasting the findings from two distinct CPU models, we aim to draw more comprehensive conclusions that can inform future research and practical applications.