# Inferring TLB Configuration with Performance Tools
## 3 Results
### Analysis Results
In Figure (**b**), the red line for 16 ‘sets’ distinctly shows an increase of around 8 ‘ways’. 2. Intel i9 CPU Load-Only: The configuration of the Intel Core i9 CPU does not include a singular DTLB; it incorporates separate TLBs for load-only and store-only operations. This variation exemplifies how ISAs can change, even within the products of a single manufacturer, posing challenges for standardizing experiments. In this scenario, the gradient plot accurately indicates the expected pattern for'sets' 16, as shown in Figure 4(b). However, the data for'sets' 32 and 64 also emerge as potential candidates, highlighting a limitation of the gradient method in this context. It confirms that 'ways' 4 is the minimum where event counts increase, but it does not unequivocally pinpoint'sets' 16 as the corresponding configuration. Nevertheless,'sets' 16 and 'ways' 4 is the lowest configuration. The heatmap results for the event dtlb_load_misses.stlb_hit align with our expectations, as shown in Figure 4(a). It is evident that the lowest number of 'ways' is 4 and'sets' is 16, respectively. Store-only: The gradient plot reveals an increase after 'ways' 12 across all sets, as shown in Figure 5(b). Two key observations emerge: firstly, the presence of an increase at 'ways' 12, and secondly, a deceleration in the gradient at 'ways' 16. Here again, the gradient is one piece of the puzzle and the known size of the TLB is the other piece. By dividing the known size, 16, by the'set', 1, the 'ways' is obtained as 16. 'Set' is selected because all'sets' return similar behavior, so the lowest is'set' 1. Figure 5: Intel i9 load-only heatmaps and gradient plots. In Figure (**a**), the red square highlights the configuration of 16 ’sets’ and 4 ’ways’. In Figure (**b**), the red line for 16 ’sets’ shows an increase at 4 ’ways’; however, ‘32’ and ‘64’ also show increases in the same area. This is an example where the gradient plot supports the heatmap but does not independently provide the exact configuration. Similarly, the heatmap results demonstrate consistency across all sets, as shown in Figure 5(a). Given that 'ways' is consistent for all'sets', it suggests that the number of'sets' is 1. However, the exact number of 'ways' remains unclear from the heatmap; based solely on the data, we might infer it to be 11, 12, or 13. This represents the first instance where the heatmap did not yield a specific'sets'-'ways' combination. Given this ambiguity, this study relies on the specifications listed in Table 2 as correct, and the same'set'-'ways' combination is determined to be 1-16. ITLB: The gradient methodology indicates that'sets' 16 (red), 32 (purple), and 64 (brown) exhibit an increase at around 'ways' 8, as shown in Figure 6(b). The lowest'sets'-'ways' combination is 16-8. Another way to reach the same conclusion is by choosing'sets' 16, since it is the lowest among the possible candidates (16, 32, and 64), and using the size of the TLB from Table 2. Dividing the TLB size by'sets' 16 gives 'ways' 8. Figure 6: The i9 store-only heatmaps and gradient plots. Figures (**a**,**b**) rely on knowing the size of the TLB to infer the configuration, as explained in detail below. The analysis of the heatmap results for itlb_load_misses.stlb_hit shows a discernible pattern, as illustrated in Figure 6(a), which corresponds with the data outlined in Table 2.  
STLB: The gradient plot indicates that significant activity is only observed when the'set' count is 128 under XOR-7 mapping as shown in Figure 7(b). However, it provides no distinct indicators or patterns that would aid in concluding the number of 'ways'. Again from Table 2 the size is known, as 1024, and it was also determined experimentally, and the'sets' from Figure 7(b) is 128, so dividing the TLB size by'sets' 128 returns 'ways' 8. In the heatmap in Figure 7(a), it can be observed that dtlb_load_misses.walk_activate employs an XOR-7 mapping with 128'sets'. Although the precise size of the TLB was not provided, it was determined through testing with an increasing number of'sets' and 'ways'.