[Tizen] Add some logs to check performance 71/282971/1
authorHeeyong Song <heeyong.song@samsung.com>
Fri, 14 Oct 2022 04:51:49 +0000 (13:51 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Fri, 14 Oct 2022 04:53:34 +0000 (13:53 +0900)
Change-Id: Ie9205714816db6ea456fe8257ef441f4886c8b9a

dali/internal/common/core-impl.cpp
dali/internal/event/common/notification-manager.cpp
dali/internal/event/size-negotiation/relayout-controller-impl.cpp

index c37dd21..9dda5a8 100644 (file)
@@ -365,61 +365,73 @@ void Core::UnregisterProcessor(Integration::Processor& processor, bool postProce
 
 void Core::RunProcessors()
 {
-  // Copy processor pointers to prevent changes to vector affecting loop iterator.
-  Dali::Vector<Integration::Processor*> processors(mProcessors);
+  if(mProcessors.Count() != 0)
+  {
+    DALI_LOG_RELEASE_INFO("Start RunProcessors\n");
 
-  // To prevent accessing processor unregistered during the loop
-  mProcessorUnregistered = false;
+    // Copy processor pointers to prevent changes to vector affecting loop iterator.
+    Dali::Vector<Integration::Processor*> processors(mProcessors);
 
-  for(auto processor : processors)
-  {
-    if(processor)
+    // To prevent accessing processor unregistered during the loop
+    mProcessorUnregistered = false;
+
+    for(auto processor : processors)
     {
-      if(!mProcessorUnregistered)
+      if(processor)
       {
-        processor->Process(false);
-      }
-      else
-      {
-        // Run processor if the processor is still in the list.
-        // It may be removed during the loop.
-        auto iter = std::find(mProcessors.Begin(), mProcessors.End(), processor);
-        if(iter != mProcessors.End())
+        if(!mProcessorUnregistered)
         {
           processor->Process(false);
         }
+        else
+        {
+          // Run processor if the processor is still in the list.
+          // It may be removed during the loop.
+          auto iter = std::find(mProcessors.Begin(), mProcessors.End(), processor);
+          if(iter != mProcessors.End())
+          {
+            processor->Process(false);
+          }
+        }
       }
     }
+    DALI_LOG_RELEASE_INFO("End RunProcessors\n");
   }
 }
 
 void Core::RunPostProcessors()
 {
-  // Copy processor pointers to prevent changes to vector affecting loop iterator.
-  Dali::Vector<Integration::Processor*> processors(mPostProcessors);
+  if(mPostProcessors.Count() != 0)
+  {
+    DALI_LOG_RELEASE_INFO("Start RunPostProcessors\n");
 
-  // To prevent accessing processor unregistered during the loop
-  mPostProcessorUnregistered = false;
+    // Copy processor pointers to prevent changes to vector affecting loop iterator.
+    Dali::Vector<Integration::Processor*> processors(mPostProcessors);
 
-  for(auto processor : processors)
-  {
-    if(processor)
+    // To prevent accessing processor unregistered during the loop
+    mPostProcessorUnregistered = false;
+
+    for(auto processor : processors)
     {
-      if(!mPostProcessorUnregistered)
+      if(processor)
       {
-        processor->Process(true);
-      }
-      else
-      {
-        // Run processor if the processor is still in the list.
-        // It may be removed during the loop.
-        auto iter = std::find(mPostProcessors.Begin(), mPostProcessors.End(), processor);
-        if(iter != mPostProcessors.End())
+        if(!mPostProcessorUnregistered)
         {
           processor->Process(true);
         }
+        else
+        {
+          // Run processor if the processor is still in the list.
+          // It may be removed during the loop.
+          auto iter = std::find(mPostProcessors.Begin(), mPostProcessors.End(), processor);
+          if(iter != mPostProcessors.End())
+          {
+            processor->Process(true);
+          }
+        }
       }
     }
+    DALI_LOG_RELEASE_INFO("End RunPostProcessors\n");
   }
 }
 
index dad673f..c0530cc 100644 (file)
@@ -21,6 +21,7 @@
 // INTERNAL INCLUDES
 #include <dali/devel-api/common/owner-container.h>
 #include <dali/devel-api/threading/mutex.h>
+#include <dali/integration-api/debug.h>
 #include <dali/internal/common/message.h>
 #include <dali/internal/event/common/complete-notification-interface.h>
 #include <dali/internal/event/common/property-notification-impl.h>
@@ -164,9 +165,14 @@ void NotificationManager::ProcessMessages()
 
   MessageContainer::Iterator       iter = mImpl->eventMessageQueue.Begin();
   const MessageContainer::Iterator end  = mImpl->eventMessageQueue.End();
-  for(; iter != end; ++iter)
+  if(iter != end)
   {
-    (*iter)->Process(0u /*ignored*/);
+    DALI_LOG_RELEASE_INFO("Start ProcessMessages\n");
+    for(; iter != end; ++iter)
+    {
+      (*iter)->Process(0u /*ignored*/);
+    }
+    DALI_LOG_RELEASE_INFO("End ProcessMessages\n");
   }
   // release the processed messages from event side queue
   mImpl->eventMessageQueue.Clear();
index 497f515..c3deac4 100644 (file)
@@ -436,8 +436,10 @@ void RelayoutController::Relayout()
     // 2. Iterate through the stack until it's empty.
     if(mRelayoutStack->Size() > 0)
     {
+      DALI_LOG_RELEASE_INFO("Start Relayout\n");
       PRINT_HIERARCHY;
 
+      int count = 0;
       while(mRelayoutStack->Size() > 0)
       {
         Dali::Actor actor;
@@ -445,6 +447,7 @@ void RelayoutController::Relayout()
         mRelayoutStack->Get(mRelayoutStack->Size() - 1, actor, size);
         Actor& actorImpl = GetImplementation(actor);
         mRelayoutStack->PopBack();
+        count++;
 
         if(actorImpl.RelayoutRequired() && actorImpl.OnScene())
         {
@@ -460,6 +463,7 @@ void RelayoutController::Relayout()
       mRelayoutInfoAllocator.ResetMemoryPool();
 
       PRINT_HIERARCHY;
+      DALI_LOG_RELEASE_INFO("End Relayout [%d]\n", count);
     }
 
     mPerformingRelayout = false;