import matplotlib.pyplot as plt import numpy as np # ypoints = np.array([19636392729, 9856229208,9445728437,5148906386]) # xpoints = np.array([5,10,15,20]) # ypoints1 = np.array([10062197042, 9873241615,12034929886,5118684853]) # xpoints1 = np.array([5,10,15,20]) ypoints = np.array([int(x) for x in """0 2722 0 0 84290 185921 251521 356452""".replace(' ',',').replace('\n','').split(",")]) xpoints = np.array([(i) for i, x in enumerate(ypoints, 1)]) ypoints1 = np.array([int(x) for x in """1310 1658 86 0 73097 171472 237158 161478""".replace(' ',',').replace('\n','').split(",")]) xpoints1 = np.array([(i) for i, x in enumerate(ypoints1, 1)]) plt.plot(xpoints, ypoints,label='Malloc Physically contigous with bounds') plt.plot(xpoints1, ypoints1,label='System memory allocator') ''' DTLB_WALK The counter counts each access counted by L1D_TLB that causes a refill of a data or unified TLB involving at least one translation table walk access. This includes each complete or partial translation table walk that causes an access to memory, including to data or translation table walk caches. If Armv8.7 is not implemented, it is IMPLEMENTATION DEFINED whether accesses that cause an update of an existing TLB entry involving at least one translation table walk access are counted. If Armv8.7 is implemented, these accesses are counted. ''' # plt.title("Data TLB access, read \n ARM Performance counter: DTLB_WALK \n Data TLB access with at least one translation table walk \n This includes each complete or partial translation table walk that causes an access to memory, including to data or translation table walk caches. \n Matrix multiply size 1000") plt.xlabel("time in seconds") plt.ylabel("DTLB walks") # plt.plot(xpoints1, ypoints1) plt.legend() # plt.show() plt.savefig('dtlb_walk_1000_MatrixMultiply.png')