Skip to content

Commit

Permalink
sel4utils: update benchmark_track.h
Browse files Browse the repository at this point in the history
Fix errors on 64-bit.
  • Loading branch information
Anna Lyons committed Jul 11, 2019
1 parent b505708 commit e1748c3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions libsel4utils/include/sel4utils/benchmark_track.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ seL4_BenchmarkTrackDumpSummary(benchmark_track_kernel_entry_t *logBuffer, size_t
index++;
}

fprintf(fd, "Number of system call invocations %d\n", syscall_entries);
fprintf(fd, "Number of interrupt invocations %d\n", interrupt_entries);
fprintf(fd, "Number of user-level faults %d\n", userlevelfault_entries);
fprintf(fd, "Number of VM faults %d\n", vmfault_entries);
fprintf(fd, "Number of system call invocations %lu\n", (unsigned long) syscall_entries);
fprintf(fd, "Number of interrupt invocations %lu\n", (unsigned long) interrupt_entries);
fprintf(fd, "Number of user-level faults %lu\n", (unsigned long) userlevelfault_entries);
fprintf(fd, "Number of VM faults %lu\n", (unsigned long) vmfault_entries);
}

/* Print out logged system call invocations */
Expand All @@ -67,14 +67,14 @@ seL4_BenchmarkTrackDumpFullSyscallLog(benchmark_track_kernel_entry_t *logBuffer,

while (logBuffer[index].start_time != 0 && (index * sizeof(benchmark_track_kernel_entry_t)) < logSize) {
if (logBuffer[index].entry.path == Entry_Syscall) {
fprintf(fd, "| %-15d| %-15d| %-15llu| %-15d| %-15d| %-15d| %-15d|\n",
index,
logBuffer[index].entry.syscall_no,
(uint64_t ) logBuffer[index].start_time,
logBuffer[index].duration,
logBuffer[index].entry.cap_type,
logBuffer[index].entry.invocation_tag,
logBuffer[index].entry.is_fastpath);
fprintf(fd, "| %-15lu| %-15lu| %-15"PRIu64"| %-15lu| %-15lu| %-15lu| %-15lu|\n",
(unsigned long) index,
(unsigned long) logBuffer[index].entry.syscall_no,
logBuffer[index].start_time,
(unsigned long) logBuffer[index].duration,
(unsigned long) logBuffer[index].entry.cap_type,
(unsigned long) logBuffer[index].entry.invocation_tag,
(unsigned long) logBuffer[index].entry.is_fastpath);
}
index++;
}
Expand All @@ -95,11 +95,11 @@ seL4_BenchmarkTrackDumpFullInterruptLog(benchmark_track_kernel_entry_t *logBuffe

while (logBuffer[index].start_time != 0 && (index * sizeof(benchmark_track_kernel_entry_t)) < logSize) {
if (logBuffer[index].entry.path == Entry_Interrupt) {
fprintf(fd, "| %-15d| %-15d| %-15llu| %-15d|\n", \
index,
logBuffer[index].entry.word,
fprintf(fd, "| %-15lu| %-15lu| %-15"PRIu64"| %-15lu|\n", \
(unsigned long) index,
(unsigned long) logBuffer[index].entry.word,
logBuffer[index].start_time,
logBuffer[index].duration);
(unsigned long) logBuffer[index].duration);
}
index++;
}
Expand Down

0 comments on commit e1748c3

Please sign in to comment.