From 6c9f17dc5fe58e23db0ba591302168766b38ab2a Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Thu, 10 Mar 2022 23:13:01 +0000 Subject: IVGCVSW-6843 replace armnn::Logging with arm::pipe::Logging in profiling code Change-Id: I9c3af46ca02c5685e06657b8af0e4658d71891d4 Signed-off-by: Jim Flynn --- profiling/common/include/Logging.hpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'profiling/common/include') diff --git a/profiling/common/include/Logging.hpp b/profiling/common/include/Logging.hpp index a31c2aaa7b..7a265d552d 100644 --- a/profiling/common/include/Logging.hpp +++ b/profiling/common/include/Logging.hpp @@ -16,6 +16,14 @@ namespace arm namespace pipe { +#if defined(__clang__) &&((__clang_major__>=3)||(__clang_major__==3 && __clang_minor__ >= 5)) +# define ARM_PIPE_FALLTHROUGH [[clang::fallthrough]] +#elif defined(__GNUC__) && (__GNUC__ >= 7) +# define ARM_PIPE_FALLTHROUGH __attribute__((fallthrough)) +#else +# define ARM_PIPE_FALLTHROUGH ((void)0) +#endif + enum class LogSeverity { Trace, @@ -47,6 +55,13 @@ inline std::string LevelToString(LogSeverity level) } } +/// Configures the logging behaviour of the ARMNN library. +/// printToStandardOutput: Set to true if log messages should be printed to the standard output. +/// printToDebugOutput: Set to true if log messages be printed to a platform-specific debug output +/// (where supported). +/// severity: All log messages that are at this severity level or higher will be printed, others will be ignored. +void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity); + class LogSink { public: @@ -124,7 +139,7 @@ public: { } - static SimpleLogger& Get() + static SimpleLogger& Get() { static SimpleLogger logger; return logger; -- cgit v1.2.1