From 523f4a465bc8c83e19c908eb7415f66a86119fad Mon Sep 17 00:00:00 2001 From: Bjoern Doebel Date: Mon, 21 Oct 2013 14:49:31 +0200 Subject: [PATCH] add injection address to results Change-Id: I7966f97b8c09bbd6510ca6066dd40be398b54de3 --- scripts/l4sys/l4sys-prepare.sh | 2 +- src/experiments/l4-sys/l4sys.proto | 5 +++-- tools/import-trace/AdvancedMemoryImporter.cc | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/l4sys/l4sys-prepare.sh b/scripts/l4sys/l4sys-prepare.sh index 2d94acb2..94364e36 100755 --- a/scripts/l4sys/l4sys-prepare.sh +++ b/scripts/l4sys/l4sys-prepare.sh @@ -15,7 +15,7 @@ BAK=experimentInfo.hpp.bak CFG=experimentInfo.hpp FAIL_CMD="fail-client -q" # -rc bochs-dbg.rc" FAILDIR=/home/doebel/src/fail -DBNAME=fiasco +DBNAME=fail if [ -n "$1" ] ; then if [ "$1" = "mem" ]; then diff --git a/src/experiments/l4-sys/l4sys.proto b/src/experiments/l4-sys/l4sys.proto index 83cf3685..e2eced49 100644 --- a/src/experiments/l4-sys/l4sys.proto +++ b/src/experiments/l4-sys/l4sys.proto @@ -44,14 +44,15 @@ message L4SysProtoMsg { optional RegisterType register_offset = 3; // instruction pointer where injection was done - optional uint32 injection_ip = 4; + optional int32 injection_ip = 4; // result type, see above optional ResultType resulttype = 5; // result data, depending on resulttype (see source code) - optional uint32 resultdata = 6; + optional int32 resultdata = 6; // generated output optional string output = 7; // optional textual description of what happened optional string details = 8; + optional int32 injection_address = 9; } } diff --git a/tools/import-trace/AdvancedMemoryImporter.cc b/tools/import-trace/AdvancedMemoryImporter.cc index cd5d55cc..47c36ce7 100644 --- a/tools/import-trace/AdvancedMemoryImporter.cc +++ b/tools/import-trace/AdvancedMemoryImporter.cc @@ -68,8 +68,7 @@ void AdvancedMemoryImporter::insert_delayed_entries(bool finalizing) if (it->branches_before != last_branches_before) { branchmask = 0; int pos = std::max(-(signed)BRANCH_WINDOW_SIZE, - (signed) it->branches_before); - int maxpos = std::min((signed)BRANCH_WINDOW_SIZE, - (signed)branches_taken.size() - (signed)it->branches_before); + int maxpos = std::min((signed)BRANCH_WINDOW_SIZE, (signed)(branches_taken.size() - it->branches_before)); for (; pos < maxpos; ++pos) { branchmask |= ((unsigned) branches_taken[it->branches_before + pos])