From 49f26d5c84f19874a48c06ac0fcb2567eea105c3 Mon Sep 17 00:00:00 2001 From: Anna Lyons Date: Thu, 20 Oct 2016 15:05:17 +1100 Subject: [PATCH] Fix benchmark_debug_syscall_start The lowest syscall number is -8, which doesnt' fit in 3 bits -> change to 4. Also, we were storing the -ve number, which also doesn't fit into 3 bits -> invert it when we store it. --- include/benchmark/benchmark_track.h | 2 +- libsel4/include/sel4/benchmark_track_types.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/benchmark/benchmark_track.h b/include/benchmark/benchmark_track.h index 3f6e91a1a..a61236c8b 100644 --- a/include/benchmark/benchmark_track.h +++ b/include/benchmark/benchmark_track.h @@ -60,7 +60,7 @@ benchmark_debug_syscall_start(word_t cptr, word_t msgInfo, word_t syscall) seL4_MessageInfo_t info = messageInfoFromWord_raw(msgInfo); lookupCapAndSlot_ret_t lu_ret = lookupCapAndSlot(NODE_STATE(ksCurThread), cptr); ksKernelEntry.path = Entry_Syscall; - ksKernelEntry.syscall_no = syscall; + ksKernelEntry.syscall_no = -syscall; ksKernelEntry.cap_type = cap_get_capType(lu_ret.cap); ksKernelEntry.invocation_tag = seL4_MessageInfo_get_label(info); } diff --git a/libsel4/include/sel4/benchmark_track_types.h b/libsel4/include/sel4/benchmark_track_types.h index 54c680613..48db19239 100644 --- a/libsel4/include/sel4/benchmark_track_types.h +++ b/libsel4/include/sel4/benchmark_track_types.h @@ -43,10 +43,10 @@ typedef struct PACKED kernel_entry { }; /* Tracked kernel entry info filled from outside this file */ struct { - seL4_Word syscall_no: 3; + seL4_Word syscall_no: 4; seL4_Word cap_type: 5; seL4_Word is_fastpath: 1; - seL4_Word invocation_tag: 20; + seL4_Word invocation_tag: 19; }; }; } kernel_entry_t;