Skip to content

Commit f6105cf

Browse files
Merge pull request #4 from xlab-uiuc/OSDI-AE-Fix
Fix Bugs for AE
2 parents 39808f2 + 311ab0c commit f6105cf

File tree

3 files changed

+47
-4
lines changed

3 files changed

+47
-4
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ else (EXISTS "${PROJECT_SOURCE_DIR}/.svn")
446446
ERROR_VARIABLE git_err
447447
OUTPUT_VARIABLE git_out)
448448
if (git_result OR git_err)
449-
message("*** ${GIT} log failed: ***\n${git_err}")
449+
# message("*** ${GIT} log failed: ***\n${git_err}")
450450
else (git_result OR git_err)
451451
math(EXPR daycount "${git_out} / (60*60*24)")
452452
endif (git_result OR git_err)

install.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
mkdir -p build && pushd build
22
# Generate makefiles with CMake. Pass in the path to your source directory.
3-
CFLAGS=-g CXXFLAGS=-g cmake -DDEBUG=ON ..
3+
CFLAGS=-g CXXFLAGS=-g cmake -DDEBUG=ON -DBUILD_DOCS=OFF ..
44
# Build.
55
make -j
66
popd

ipc_with_inst_fpt.py

+45-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
# "INST": 0.25,
5858
# }
5959

60-
FPT_FLAVOR = "L4L3andL2L1"
60+
FPT_FLAVOR = "L4L3_L2L1"
6161

6262
detailed_stats_base = {
6363
"bench": "",
@@ -233,7 +233,7 @@ def get_page_walk_latency_fpt(pgwk_str: str, freq, stats) -> float:
233233

234234

235235
# cur_latency += LATENCY[accesses[0]] + LATENCY[accesses[2]] + LATENCY[accesses[3]]
236-
if FPT_FLAVOR == "L4L3andL2L1":
236+
if FPT_FLAVOR == "L4L3_L2L1":
237237
step1 = 0
238238
step2 = 0
239239
if accesses[1] == "ZERO" or accesses[2] == "PWC":
@@ -480,6 +480,27 @@ def scp_from_remote(host, remote_path, local_path):
480480
except Exception as e:
481481
print(f"An unexpected error occurred: {e}")
482482

483+
def process_one_file_ipc_single(input_name, arch, flavor, output_name):
484+
lines = readAllLines(input_name)
485+
stats = detailed_stats_base.copy()
486+
487+
for line in lines:
488+
parseOneLine(line, stats, arch)
489+
490+
stats["kernel_inst"], stats["user_inst"] = get_inst_num(file_name)
491+
492+
post_parsing_process(stats)
493+
494+
# stats["flavor"] = args.flavor
495+
stats["path"] = file_name
496+
stats["bench"] = file_name
497+
498+
df = pd.DataFrame([stats])
499+
df.insert(0, 'arch', [arch])
500+
df.insert(1, 'flavor', [flavor])
501+
502+
with open(output_name, 'w') as f:
503+
df.to_csv(f, index=False)
483504

484505
def process_one_file_ipc(bench, machine, path, arch):
485506

@@ -838,11 +859,33 @@ def save_all_files_into_csv(all_files, out_dest):
838859
import argparse
839860
parser = argparse.ArgumentParser()
840861
parser.add_argument('--flavor', help='description for option1')
862+
parser.add_argument('--single', help='add this to get single result, no comparation')
863+
parser.add_argument('--arch')
864+
parser.add_argument('--out')
865+
# parser.add_argument('--')
841866
args = parser.parse_args()
842867

843868
if args.flavor is not None:
844869
FPT_FLAVOR = args.flavor
845870

871+
if args.single is not None:
872+
if args.arch is None or args.out is None:
873+
assert(False)
874+
875+
if args.arch == "fpt" and args.flavor is None:
876+
assert(False)
877+
878+
arch = args.arch
879+
output_name = args.out
880+
file_name = args.single
881+
882+
process_one_file_ipc_single(file_name, arch, args.flavor, output_name)
883+
884+
print(f'Statistics: {os.path.realpath(output_name)}')
885+
886+
import sys
887+
sys.exit(0)
888+
846889
radix_running, ecpt_running, running_out_file = calc_running_ipc()
847890
radix_loading_end, ecpt_loading_end, loading_end_out_file = calc_loading_end_ipc()
848891

0 commit comments

Comments
 (0)