Skip to content

Commit

Permalink
benchmark: config opt. name to enable log buffer
Browse files Browse the repository at this point in the history
The latest code updates introduced CONFIG_ENABLE_KERNEL_LOG_BUFFER
meanwhile other code and config.cmake keeps using
CONFIG_KERNEL_LOG_BUFFER

Signed-off-by: Nataliya Korovkina <[email protected]>
  • Loading branch information
malus-brandywine authored and kent-mcleod committed Mar 30, 2022
1 parent 646bf87 commit 756a37b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions include/benchmark/benchmark.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
exception_t handle_SysBenchmarkFlushCaches(void);
exception_t handle_SysBenchmarkResetLog(void);
exception_t handle_SysBenchmarkFinalizeLog(void);
#ifdef CONFIG_ENABLE_KERNEL_LOG_BUFFER
#ifdef CONFIG_KERNEL_LOG_BUFFER
exception_t handle_SysBenchmarkSetLogBuffer(void);
#endif /* CONFIG_ENABLE_KERNEL_LOG_BUFFER */
#endif /* CONFIG_KERNEL_LOG_BUFFER */
#ifdef CONFIG_BENCHMARK_TRACK_UTILISATION
exception_t handle_SysBenchmarkGetThreadUtilisation(void);
exception_t handle_SysBenchmarkResetThreadUtilisation(void);
Expand Down
4 changes: 2 additions & 2 deletions src/api/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,10 @@ exception_t handleUnknownSyscall(word_t w)
return handle_SysBenchmarkResetLog();
case SysBenchmarkFinalizeLog:
return handle_SysBenchmarkFinalizeLog();
#ifdef CONFIG_ENABLE_KERNEL_LOG_BUFFER
#ifdef CONFIG_KERNEL_LOG_BUFFER
case SysBenchmarkSetLogBuffer:
return handle_SysBenchmarkSetLogBuffer();
#endif /* CONFIG_ENABLE_KERNEL_LOG_BUFFER */
#endif /* CONFIG_KERNEL_LOG_BUFFER */
#ifdef CONFIG_BENCHMARK_TRACK_UTILISATION
case SysBenchmarkGetThreadUtilisation:
return handle_SysBenchmarkGetThreadUtilisation();
Expand Down
12 changes: 6 additions & 6 deletions src/benchmark/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ exception_t handle_SysBenchmarkFlushCaches(void)

exception_t handle_SysBenchmarkResetLog(void)
{
#ifdef CONFIG_ENABLE_KERNEL_LOG_BUFFER
#ifdef CONFIG_KERNEL_LOG_BUFFER
if (ksUserLogBuffer == 0) {
userError("A user-level buffer has to be set before resetting benchmark.\
Use seL4_BenchmarkSetLogBuffer\n");
Expand All @@ -40,7 +40,7 @@ exception_t handle_SysBenchmarkResetLog(void)
}

ksLogIndex = 0;
#endif /* CONFIG_ENABLE_KERNEL_LOG_BUFFER */
#endif /* CONFIG_KERNEL_LOG_BUFFER */

#ifdef CONFIG_BENCHMARK_TRACK_UTILISATION
NODE_STATE(benchmark_log_utilisation_enabled) = true;
Expand All @@ -60,10 +60,10 @@ exception_t handle_SysBenchmarkResetLog(void)

exception_t handle_SysBenchmarkFinalizeLog(void)
{
#ifdef CONFIG_ENABLE_KERNEL_LOG_BUFFER
#ifdef CONFIG_KERNEL_LOG_BUFFER
ksLogIndexFinalized = ksLogIndex;
setRegister(NODE_STATE(ksCurThread), capRegister, ksLogIndexFinalized);
#endif /* CONFIG_ENABLE_KERNEL_LOG_BUFFER */
#endif /* CONFIG_KERNEL_LOG_BUFFER */

#ifdef CONFIG_BENCHMARK_TRACK_UTILISATION
benchmark_utilisation_finalise();
Expand All @@ -72,7 +72,7 @@ exception_t handle_SysBenchmarkFinalizeLog(void)
return EXCEPTION_NONE;
}

#ifdef CONFIG_ENABLE_KERNEL_LOG_BUFFER
#ifdef CONFIG_KERNEL_LOG_BUFFER
exception_t handle_SysBenchmarkSetLogBuffer(void)
{
word_t cptr_userFrame = getRegister(NODE_STATE(ksCurThread), capRegister);
Expand All @@ -84,7 +84,7 @@ exception_t handle_SysBenchmarkSetLogBuffer(void)
setRegister(NODE_STATE(ksCurThread), capRegister, seL4_NoError);
return EXCEPTION_NONE;
}
#endif /* CONFIG_ENABLE_KERNEL_LOG_BUFFER */
#endif /* CONFIG_KERNEL_LOG_BUFFER */

#ifdef CONFIG_BENCHMARK_TRACK_UTILISATION

Expand Down

0 comments on commit 756a37b

Please sign in to comment.