[Tizen] Appendix log for ttrace 97/293297/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 24 May 2023 01:56:32 +0000 (10:56 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Wed, 24 May 2023 04:07:11 +0000 (13:07 +0900)
Print additional logs for ttrace which is not be used by tag.

Currently, we only use this info for tizen

Change-Id: I6c564dec574e6033ec2f63f5ae21ea8c4f3a4249
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.h
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.h
dali/internal/trace/android/trace-manager-impl-android.cpp
dali/internal/trace/android/trace-manager-impl-android.h
dali/internal/trace/generic/trace-manager-impl-generic.cpp
dali/internal/trace/generic/trace-manager-impl-generic.h
dali/internal/trace/tizen/trace-manager-impl-tizen.cpp
dali/internal/trace/tizen/trace-manager-impl-tizen.h

index e4c6078..a8354e8 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -99,15 +99,15 @@ TestApplication::~TestApplication()
   delete mCore;
 }
 
-void TestApplication::LogContext(bool start, const char* tag)
+void TestApplication::LogContext(bool start, const char* tag, const char* message)
 {
   if(start)
   {
-    fprintf(stderr, "INFO: Trace Start: %s\n", tag);
+    fprintf(stderr, "INFO: Trace Start: %s %s\n", tag, message ? message : "");
   }
   else
   {
-    fprintf(stderr, "INFO: Trace End: %s\n", tag);
+    fprintf(stderr, "INFO: Trace End: %s %s\n", tag, message ? message : "");
   }
 }
 
index 1b101c5..ce0e151 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_TEST_APPLICATION_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ public:
   void InitializeCore();
   ~TestApplication() override;
   static void              LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message);
-  static void              LogContext(bool start, const char* tag);
+  static void              LogContext(bool start, const char* tag, const char* message);
   Dali::Integration::Core& GetCore();
   TestPlatformAbstraction& GetPlatform();
   TestRenderController&    GetRenderController();
index 0ad4763..3e8e171 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -102,15 +102,15 @@ TestGraphicsApplication::~TestGraphicsApplication()
   delete mCore;
 }
 
-void TestGraphicsApplication::LogContext(bool start, const char* tag)
+void TestGraphicsApplication::LogContext(bool start, const char* tag, const char* message)
 {
   if(start)
   {
-    fprintf(stderr, "INFO: Trace Start: %s\n", tag);
+    fprintf(stderr, "INFO: Trace Start: %s %s\n", tag, message ? message : "");
   }
   else
   {
-    fprintf(stderr, "INFO: Trace End: %s\n", tag);
+    fprintf(stderr, "INFO: Trace End: %s %s\n", tag, message ? message : "");
   }
 }
 
index fbeecdf..aef657a 100644 (file)
@@ -246,7 +246,7 @@ public:
   void InitializeCore();
   ~TestGraphicsApplication() override;
   static void              LogMessage(Dali::Integration::Log::DebugPriority level, std::string& message);
-  static void              LogContext(bool start, const char* tag);
+  static void              LogContext(bool start, const char* tag, const char* message);
   Dali::Integration::Core& GetCore();
   TestPlatformAbstraction& GetPlatform();
   TestRenderController&    GetRenderController();
index 665a37c..65a35a4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ Dali::Integration::Trace::LogContextFunction TraceManagerAndroid::GetLogContextF
   return LogContext;
 }
 
-void TraceManagerAndroid::LogContext(bool start, const char* tag)
+void TraceManagerAndroid::LogContext(bool start, const char* tag, const char* message)
 {
   if(traceManagerAndroid && traceManagerAndroid->mPerformanceInterface)
   {
index 66703da..45bb8d0 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_TRACE_MANAGER_IMPL_ANDROID_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ private:
   /**
    * LogContext method (Android specific) used for tracing
    */
-  static void LogContext(bool start, const char* tag);
+  static void LogContext(bool start, const char* tag, const char* message);
 };
 
 } // namespace Adaptor
index 57e2fd6..933a4e1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -40,22 +40,22 @@ Dali::Integration::Trace::LogContextFunction TraceManagerGeneric::GetLogContextF
   return LogContext;
 }
 
-void TraceManagerGeneric::LogContext(bool start, const char* tag)
+void TraceManagerGeneric::LogContext(bool start, const char* tag, const char* message)
 {
   if(traceManagerGeneric && traceManagerGeneric->mPerformanceInterface)
   {
     if(start)
     {
-      unsigned short contextId = traceManagerGeneric->mPerformanceInterface->GetContextId( tag );
-      if( !contextId )
+      unsigned short contextId = traceManagerGeneric->mPerformanceInterface->GetContextId(tag);
+      if(!contextId)
       {
-        contextId = traceManagerGeneric->mPerformanceInterface->AddContext( tag );
+        contextId = traceManagerGeneric->mPerformanceInterface->AddContext(tag);
       }
       traceManagerGeneric->mPerformanceInterface->AddMarker(PerformanceInterface::START, contextId);
     }
     else
     {
-      unsigned short contextId = traceManagerGeneric->mPerformanceInterface->GetContextId( tag );
+      unsigned short contextId = traceManagerGeneric->mPerformanceInterface->GetContextId(tag);
       traceManagerGeneric->mPerformanceInterface->AddMarker(PerformanceInterface::END, contextId);
     }
   }
index 99cb917..c802a7c 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_TRACE_MANAGER_IMPL_GENERIC_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,7 +60,7 @@ private:
   /**
    * LogContext method (Generic specific) used for tracing
    */
-  static void LogContext(bool start, const char* tag);
+  static void LogContext(bool start, const char* tag, const char* message);
 };
 
 } // namespace Adaptor
index 3c8ea30..0d2b2bd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@ Dali::Integration::Trace::LogContextFunction TraceManagerTizen::GetLogContextFun
   return LogContext;
 }
 
-void TraceManagerTizen::LogContext(bool start, const char* tag)
+void TraceManagerTizen::LogContext(bool start, const char* tag, const char* message)
 {
   if(start)
   {
@@ -62,7 +62,7 @@ void TraceManagerTizen::LogContext(bool start, const char* tag)
 
     if(gTraceManagerEnablePrintLog)
     {
-      DALI_LOG_DEBUG_INFO("BEGIN: %s\n", tag ? tag : EMPTY_TAG);
+      DALI_LOG_DEBUG_INFO("BEGIN: %s%s%s\n", tag ? tag : EMPTY_TAG, message ? " " : "", message ? message : "");
     }
   }
   else
@@ -71,7 +71,7 @@ void TraceManagerTizen::LogContext(bool start, const char* tag)
 
     if(gTraceManagerEnablePrintLog)
     {
-      DALI_LOG_DEBUG_INFO("END: %s\n", tag ? tag : EMPTY_TAG);
+      DALI_LOG_DEBUG_INFO("END: %s%s%s\n", tag ? tag : EMPTY_TAG, message ? " " : "", message ? message : "");
     }
   }
 }
index c01248c..7a01864 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_TRACE_MANAGER_IMPL_TIZEN_H
 
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,7 +54,7 @@ private:
   /**
    * LogContext method (Tizen specific) used for tracing
    */
-  static void LogContext(bool start, const char* tag);
+  static void LogContext(bool start, const char* tag, const char* message);
 };
 
 } // namespace Adaptor