A sampling-based approach for automatic generation of microbenchmarks with a representative memory state
Visualitza/Obre
Estadístiques de LA Referencia / Recolecta
Inclou dades d'ús des de 2022
Cita com:
hdl:2117/353734
Tipus de documentTreball Final de Grau
Data2021-06-28
Condicions d'accésAccés obert
Tots els drets reservats. Aquesta obra està protegida pels drets de propietat intel·lectual i
industrial corresponents. Sense perjudici de les exempcions legals existents, queda prohibida la seva
reproducció, distribució, comunicació pública o transformació sense l'autorització del titular dels drets
Abstract
A mesura que els processadors han esdevingut més complexos, i així ho ha fet també la tecnologia en què es fabriquen, el temps de simulació del processador físic ha incrementat considerablement. Per reduir el temps de simulació, els enginyers, des de fa temps, han utilitzat programes de benchmarking miniaturitzats anomenats microbenchmarks. Normalment aquests microbenchmarks són sintètics, fragments de codi fets a mà dissenyats per estressar una part en concret de la microarquitectura del processador. Amb tot, això sol resultar en la sobreenginyeria del disseny final del processador, ja que aquests microbenchmarks fets a mà no són representatius del codi que estroba en aplicacions del món real. En aquest projecte presento una metodologia nova per a la generació automàtica de microbenchmarks que garanteix que el codi i les dades del microbenchmark siguin els mateixos que el de l'aplicació objectiu. Amb aquesta finalitat, la metodologia proposada primer utilitza sampling per identificar les funcions que consumeixen més temps d'execució de l'aplicació. Llavors, un pas de pre-trace recull el conjunt de pàgines de memòria a les quals s'accedeixen durant cada invocació a aquestes funcions. Aquesta informació dels accessos a memòria és processada per un algorisme de clustering, que determina quines són les invocacions més representatives d'aquestes funcions. En un altre pas de traceig es capturen els continguts inicials de la memòria d'aquestes invocacions representatives, i llavors són finalment disposades per un script de linker en diferents formats compatibles amb sistemes Linux RISC-V i infraestructures de simulació per FPGA. Implemento i avaluo la metodologia de generació automàtica de microbenchmarks proposada en una placa HiFive Unleashed amb una CPU RISC-V Freedom U540 de SiFive. Per validar la metodologia, genero microbenchmarks derivats de la suite de benchmarks NAS, i comparo el seu rendiment. Els resultats mostren que la metodologia proposada és capaç de produir microbenchmarks molt acurats, amb un error relatiu del 5% en l'IPC mitjà comparat amb els benchmarks originals. As processors have become more complex, and so has the technology they are fabricated in, the simulation time of the physical processor has increased considerably. To reduce the simulation time, for a long time engineers have used miniaturized benchmarking programs called microbenchmarks. Usually these microbenchmarks are synthetic, hand-crafted pieces of code designed specifically to stress some part of the processor microarchitecture. However, this often leads to over-engineering the final processor design because such hand-crafted microbenchmarks are not representative of the code found in real-world applications. In this work I present a novel automated microbenchmark generation methodology that guarantees that the microbenchmark code and data is the same as the target application. To this end,the proposed methodology first uses sampling to identify the most time-consuming functions of the application. Then, a pre-trace step gathers the set of memory pages that are accessed in all the invocations of those functions. This memory access information is processed by a clustering algorithm that determines which are the most representative invocations of the functions. In another tracing step, the initial memory contents of these representative invocations is captured, and the recorded data and code pages are finally arranged by a linker script into different formats compatible with Linux RISC-V systems and FPGA simulation infrastructures. I implement and evaluate the proposed automated microbenchmark generation methodology on a HiFIVE Unleashed board with a SiFive Freedom U540 RISC-V CPU. To validate the methodology, I generate microbenchmarks derived from the NAS benchmark suite and compare their performance. The results shows that the proposed methodology is able to produce very accurate microbenchmarks, with a relative error of 5% in average IPC compared to the original benchmarks.
TitulacióGRAU EN ENGINYERIA INFORMÀTICA (Pla 2010)
Col·leccions
Fitxers | Descripció | Mida | Format | Visualitza |
---|---|---|---|---|
158932.pdf | 10,20Mb | Visualitza/Obre |