Skip to content

Commit

Permalink
wip cleanup utiluzation
Browse files Browse the repository at this point in the history
  • Loading branch information
axel-h committed Jun 20, 2024
1 parent cfc0c91 commit 1592f7b
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/benchmark/benchmark_utilisation.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@

void benchmark_track_utilisation_dump(void)
{
uint64_t *buffer = ((uint64_t *) & (((seL4_IPCBuffer *)lookupIPCBuffer(true, NODE_STATE(ksCurThread)))->msg[0]));
tcb_t *tcb = NULL;
word_t tcb_cptr = getRegister(NODE_STATE(ksCurThread), capRegister);
lookupCap_ret_t lu_ret;
word_t cap_type;

lu_ret = lookupCap(NODE_STATE(ksCurThread), tcb_cptr);
lookupCap_ret_t lu_ret = lookupCap(NODE_STATE(ksCurThread), tcb_cptr);
/* ensure we got a TCB cap */
cap_type = cap_get_capType(lu_ret.cap);
word_t cap_type = cap_get_capType(lu_ret.cap);
if (cap_type != cap_thread_cap) {
userError("SysBenchmarkFinalizeLog: cap is not a TCB, halting");
return;
}

tcb = TCB_PTR(cap_thread_cap_get_capTCBPtr(lu_ret.cap));
tcb_t * tcb = TCB_PTR(cap_thread_cap_get_capTCBPtr(lu_ret.cap));

seL4_IPCBuffer *ipc_buffer = (seL4_IPCBuffer *)lookupIPCBuffer(true, NODE_STATE(ksCurThread))
uint64_t *buffer = (uint64_t *)(ipc_buffer->msg);

/* Selected TCB counters */
buffer[BENCHMARK_TCB_UTILISATION] = tcb->benchmark.utilisation; /* Requested thread utilisation */
Expand Down

0 comments on commit 1592f7b

Please sign in to comment.