diff --git a/cache_utils/analyse_results.sh b/cache_utils/analyse_results.sh index acd7c92..5156ad9 100755 --- a/cache_utils/analyse_results.sh +++ b/cache_utils/analyse_results.sh @@ -15,5 +15,5 @@ NAME="${1%%.*}" bash 2T/analyse.sh $1 . venv/bin/activate -python analyse_csv.py $NAME -python analyse_medians.py $NAME +python analyse_csv.py $NAME ${@:2} +python analyse_medians.py $NAME ${@:2} diff --git a/cache_utils/generate_cores.py b/cache_utils/generate_cores.py index e0b9514..e053862 100644 --- a/cache_utils/generate_cores.py +++ b/cache_utils/generate_cores.py @@ -35,6 +35,8 @@ machine = get_element(root, "Machine") core_count = 0 sockets = [] +previous_cores = 0 # nb of cores seen in previous NUMA Node +seen_cores = {} for pack in get_elements(machine, "Package"): socket = [] # Each L3Cache corresponds to 1 socket l3 = get_element(pack, "L3Cache") @@ -48,8 +50,22 @@ for pack in get_elements(machine, "Package"): core.append(int(PU.attrib["os_index"])) core_count += 1 - socket.append((int(l2.attrib["os_index"]), core)) + cpu_index = None + if "os_index" in l2.attrib: + core_index = int(l2.attrib["os_index"]) # L2Cache indexing is global and is not affected by NUMA Node + elif "os_index" in core_obj.attrib: + core_index = int(core_obj.attrib["os_index"]) + previous_cores # core indexing start at 0 in a each NUMA Node + else: + print("No os index for this core", file=sys.stderr) + sys.exit(1) + + if core_index in seen_cores: + print("Core collision, you may need to reindex cores", file=sys.stderr) + seen_cores[core_index] = True + + socket.append((core_index, core)) sockets.append(socket) + previous_cores += len(socket) # socket, core, hyper-thread out_data = [