OPTION(ENABLE_PKG_CONFIGURE "Use pkgconfig" ON)
OPTION(ENABLE_LINK_TEST "Enable the link test" ON)
OPTION(ENABLE_ATSPI "Enable AT-SPI accessibility" ON)
+OPTION(ENABLE_TRACE "Enable Trace" OFF)
# Include additional macros
INCLUDE( common.cmake )
SET( ENABLE_ATSPI OFF )
ENDIF()
+IF( ENABLE_TRACE )
+ ADD_DEFINITIONS("-DTRACE_ENABLED")
+ENDIF()
+
# Set up compiler flags and warnings
IF( UNIX )
ADD_COMPILE_OPTIONS( -Wall ${DALI_CFLAGS} )# -Wextra -Wno-unused-parameter )# -Wfloat-equal )
MESSAGE( STATUS "Use pkg configure: ${ENABLE_PKG_CONFIGURE}" )
MESSAGE( STATUS "Enable link test: ${ENABLE_LINK_TEST}" )
MESSAGE( STATUS "Enable AT-SPI: ${ENABLE_ATSPI}" )
+MESSAGE( STATUS "Enable Trace: ${ENABLE_TRACE}" )
MESSAGE( STATUS "Tizen Platform Config supported ${TIZEN_PLATFORM_CONFIG_SUPPORTED_LOGMSG}")
MESSAGE( STATUS "Compile flags: ${CMAKE_CXX_FLAGS}")
MESSAGE( STATUS "Compile flags: ${CMAKE_C_FLAGS}")
// EXTERNAL INCLUDES
#include <dali/devel-api/common/singleton-service.h>
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
#include <dali/public-api/object/object-registry.h>
// INTERNAL INCLUDES
{
namespace Adaptor
{
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_APPLICATION, true);
+
ApplicationPtr Application::gPreInitializedApplication(NULL);
ApplicationPtr Application::New(
}
// Run the adaptor
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_APP_ADAPTOR_START");
mAdaptor->Start();
+ DALI_TRACE_END(gTraceFilter, "DALI_APP_ADAPTOR_START");
Accessibility::Accessible::SetObjectRegistry(mAdaptor->GetObjectRegistry());
if(!mStylesheet.empty())
LanguageChangedSignal().Connect(&GetImplementation(lifecycleController), &LifecycleController::OnLanguageChanged);
Dali::Application application(this);
+
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_APP_EMIT_INIT_SIGNAL");
mInitSignal.Emit(application);
+ DALI_TRACE_END(gTraceFilter, "DALI_APP_EMIT_INIT_SIGNAL");
mAdaptor->NotifySceneCreated();
}
#define DALI_INTERNAL_COMBINED_UPDATE_RENDER_CONTROLLER_DEBUG_H
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
namespace Dali
{
#define LOG_EVENT_TRACE_FMT(format, ...)
#endif
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_COMBINED, false);
+#define TRACE_UPDATE_RENDER_BEGIN(tag) DALI_TRACE_BEGIN(gTraceFilter, tag)
+#define TRACE_UPDATE_RENDER_END(tag) DALI_TRACE_END(gTraceFilter, tag)
+
} // unnamed namespace
} // namespace Adaptor
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
Integration::UpdateStatus updateStatus;
AddPerformanceMarker(PerformanceInterface::UPDATE_START);
+ TRACE_UPDATE_RENDER_BEGIN("DALI_UPDATE");
mCore.Update(frameDelta,
currentTime,
nextFrameTime,
updateStatus,
renderToFboEnabled,
isRenderingToFbo);
+ TRACE_UPDATE_RENDER_END("DALI_UPDATE");
AddPerformanceMarker(PerformanceInterface::UPDATE_END);
unsigned int keepUpdatingStatus = updateStatus.KeepUpdating();
Integration::RenderStatus renderStatus;
AddPerformanceMarker(PerformanceInterface::RENDER_START);
+ TRACE_UPDATE_RENDER_BEGIN("DALI_RENDER");
// Upload shared resources
mCore.PreRender(renderStatus, mForceClear, mUploadWithoutRendering);
SurfaceDeleted();
}
+ TRACE_UPDATE_RENDER_END("DALI_RENDER");
AddPerformanceMarker(PerformanceInterface::RENDER_END);
mForceClear = false;
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
#endif
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
// INTERNAL INCLUDES
#include <dali/internal/system/common/callback-manager.h>
#if defined(DEBUG_ENABLED)
Integration::Log::Filter* gDBusLogging = Integration::Log::Filter::New(Debug::NoLogging, false, "LOG_ADAPTOR_EVENTS_DBUS");
#endif
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_FRAMEWORK, true);
bool IsWidgetFeatureEnabled()
{
mRunning = true;
int ret;
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_APPMAIN");
ret = mImpl->AppMain();
+ DALI_TRACE_END(gTraceFilter, "DALI_APPMAIN");
if(ret != APP_ERROR_NONE)
{
DALI_LOG_ERROR("Framework::Run(), ui_app_main() is failed. err = %d\n", ret);
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
// EXTERNAL INCLUDES
#include <dali/integration-api/debug.h>
+#include <dali/integration-api/trace.h>
#include <dali/public-api/common/dali-vector.h>
#include <sstream>
const std::string EGL_KHR_PARTIAL_UPDATE = "EGL_KHR_partial_update";
const std::string EGL_KHR_SWAP_BUFFERS_WITH_DAMAGE = "EGL_KHR_swap_buffers_with_damage";
+DALI_INIT_TRACE_FILTER(gTraceFilter, DALI_TRACE_EGL, true);
} // namespace
namespace Dali
if(mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT)
{
DALI_LOG_RELEASE_INFO("EglImplementation::eglSwapBuffers started. eglSurface(%p)\n", eglSurface);
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_EGL_SWAP_BUFFERS");
}
#endif //DALI_PROFILE_UBUNTU
#ifndef DALI_PROFILE_UBUNTU
if(mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT)
{
+ DALI_TRACE_END(gTraceFilter, "DALI_EGL_SWAP_BUFFERS");
DALI_LOG_RELEASE_INFO("EglImplementation::eglSwapBuffers finished.\n");
mSwapBufferCountAfterResume++;
}
if(mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT)
{
DALI_LOG_RELEASE_INFO("EglImplementation::eglSwapBuffersWithDamageKHR started. eglSurface(%p)\n", eglSurface);
+ DALI_TRACE_BEGIN(gTraceFilter, "DALI_EGL_SWAP_BUFFERS_KHR");
}
#endif //DALI_PROFILE_UBUNTU
#ifndef DALI_PROFILE_UBUNTU
if(mSwapBufferCountAfterResume < THRESHOLD_SWAPBUFFER_COUNT)
{
+ DALI_TRACE_END(gTraceFilter, "DALI_EGL_SWAP_BUFFERS_KHR");
DALI_LOG_RELEASE_INFO("EglImplementation::eglSwapBuffersWithDamageKHR finished.\n");
mSwapBufferCountAfterResume++;
}
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
void TraceManagerAndroid::LogContext(bool start, const char* tag)
{
- if(start)
+ if(traceManagerAndroid && traceManagerAndroid->mPerformanceInterface)
{
- unsigned short contextId = traceManagerAndroid->mPerformanceInterface->AddContext(tag);
- traceManagerAndroid->mPerformanceInterface->AddMarker(PerformanceInterface::START, contextId);
- }
- else
- {
- unsigned short contextId = traceManagerAndroid->mPerformanceInterface->AddContext(tag);
- traceManagerAndroid->mPerformanceInterface->AddMarker(PerformanceInterface::END, contextId);
+ if(start)
+ {
+ unsigned short contextId = traceManagerAndroid->mPerformanceInterface->AddContext(tag);
+ traceManagerAndroid->mPerformanceInterface->AddMarker(PerformanceInterface::START, contextId);
+ }
+ else
+ {
+ unsigned short contextId = traceManagerAndroid->mPerformanceInterface->AddContext(tag);
+ traceManagerAndroid->mPerformanceInterface->AddMarker(PerformanceInterface::END, contextId);
+ }
}
}
/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
void TraceManagerGeneric::LogContext(bool start, const char* tag)
{
- if(start)
+ if(traceManagerGeneric && traceManagerGeneric->mPerformanceInterface)
{
- unsigned short contextId = traceManagerGeneric->mPerformanceInterface->AddContext(tag);
- traceManagerGeneric->mPerformanceInterface->AddMarker(PerformanceInterface::START, contextId);
- }
- else
- {
- unsigned short contextId = traceManagerGeneric->mPerformanceInterface->AddContext(tag);
- traceManagerGeneric->mPerformanceInterface->AddMarker(PerformanceInterface::END, contextId);
+ if(start)
+ {
+ unsigned short contextId = traceManagerGeneric->mPerformanceInterface->AddContext(tag);
+ traceManagerGeneric->mPerformanceInterface->AddMarker(PerformanceInterface::START, contextId);
+ }
+ else
+ {
+ unsigned short contextId = traceManagerGeneric->mPerformanceInterface->AddContext(tag);
+ traceManagerGeneric->mPerformanceInterface->AddMarker(PerformanceInterface::END, contextId);
+ }
}
}
CFLAGS+=" -DWAYLAND"
CXXFLAGS+=" -DWAYLAND"
-cmake_flags=" -DENABLE_WAYLAND=ON -DENABLE_ATSPI=ON"
+cmake_flags=" -DENABLE_WAYLAND=ON -DENABLE_ATSPI=ON -DENABLE_TRACE=ON"
# Use this conditional when Tizen version is 5.x or greater
%if 0%{?tizen_version_major} >= 5
cmake_flags+=" -DCMAKE_BUILD_TYPE=Debug"
%endif
-%if 0%{?enable_trace}
-cmake_flags+=" -DENABLE_TRACE=ON"
-%endif
-
%if 0%{?enable_logging}
cmake_flags+=" -DENABLE_NETWORK_LOGGING=ON"
%endif