diff --git a/repos/base/include/base/trace/logger.h b/repos/base/include/base/trace/logger.h index eaa4759d8a..f958d9baa0 100644 --- a/repos/base/include/base/trace/logger.h +++ b/repos/base/include/base/trace/logger.h @@ -66,6 +66,7 @@ struct Genode::Trace::Logger * Log event to trace buffer */ template + __attribute__((optimize("-fno-delete-null-pointer-checks"))) void log(EVENT const *event) { if (!this || !_evaluate_control()) return; diff --git a/repos/base/src/lib/base/trace.cc b/repos/base/src/lib/base/trace.cc index a326beb067..675dd2668c 100644 --- a/repos/base/src/lib/base/trace.cc +++ b/repos/base/src/lib/base/trace.cc @@ -122,6 +122,7 @@ bool Trace::Logger::_evaluate_control() } +__attribute__((optimize("-fno-delete-null-pointer-checks"))) void Trace::Logger::log(char const *msg, size_t len) { if (!this || !_evaluate_control()) return;