INCLUDE(FindPkgConfig)
-# Options
-OPTION(DPL_LOG "DPL logs status" ON)
-IF(DPL_LOG)
- MESSAGE(STATUS "Logging enabled for DPL")
- ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
-ELSE(DPL_LOG)
- MESSAGE(STATUS "Logging disabled for DPL")
-ENDIF(DPL_LOG)
-
STRING(REGEX MATCH "([^.]*)" PROJECT_API_VERSION "${PROJECT_VERSION}")
ADD_DEFINITIONS("-DPROJECT_API_VERSION=\"$(PROJECT_API_VERSION)\"")
MESSAGE(STATUS "Version from changelog: ${PROJECT_VERSION}")
SET(CMAKE_BUILD_TYPE "Release")
ENDIF(NOT CMAKE_BUILD_TYPE)
+OPTION(DPL_LOG "DPL logs status" ON)
+
+IF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
+ MESSAGE(STATUS "Logging enabled for DPL")
+ ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
+ELSE(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
+ MESSAGE(STATUS "Logging disabled for DPL")
+ENDIF(DPL_LOG AND NOT CMAKE_BUILD_TYPE MATCHES "profiling")
+
# Compiler flags
-SET(CMAKE_C_FLAGS_PROFILING "-O0 -g -pg")
-SET(CMAKE_CXX_FLAGS_PROFILING "-O0 -std=c++0x -g -pg")
+SET(CMAKE_C_FLAGS_PROFILING "-O2")
+SET(CMAKE_CXX_FLAGS_PROFILING "-O2 -std=c++0x")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -std=c++0x -g")
SET(CMAKE_C_FLAGS_RELEASE "-O2 -g")
AddProfilingMeasurment("Profiling_Started");
return 1;
}
+
+std::string GetFormattedTime()
+{
+ timeval tv;
+ tm localNowTime;
+
+ gettimeofday(&tv, NULL);
+ localtime_r(&tv.tv_sec, &localNowTime);
+
+ char format[64];
+ snprintf(format, sizeof(format), "%02i:%02i:%02i.%03i", localNowTime.tm_hour, localNowTime.tm_min, localNowTime.tm_sec, static_cast<int>(tv.tv_usec / 1000));
+ return format;
+}
+
} // namespace anonymous
+void AddStdoutProfilingMeasurment(const char* name, bool start)
+{
+ std::ostringstream output;
+ output << "[" << GetFormattedTime() << "] [](): " << name << " ";
+ output << (start ? "profiling##start" : "profiling##stop");
+ fprintf(stdout, "%s\n", output.str().c_str());
+}
+
extern "C"
void AddProfilingMeasurment(const char* name,
const char* prefix,
desc)
#endif //__cplusplus
-// profiling script additional proceeds debug output if console debug is enabled
-//and if output is logged then addiional points will be added to graphs
-#define LOG_PROFILE_START(x) LogDebug(x << " " << "profiling##start");
-#define LOG_PROFILE_STOP(x) LogDebug(x << " " << "profiling##stop");
-
+void AddStdoutProfilingMeasurment(const char* name, bool start);
+// profiling script additional proceeds stdout output
+#define LOG_PROFILE_START(x) AddStdoutProfilingMeasurment(x, true)
+#define LOG_PROFILE_STOP(x) AddStdoutProfilingMeasurment(x, false)
#else //PROFILING_ENABLED
#define ADD_PROFILING_POINT(name, ...) (void)1
}
my @out = `$WRT_CLIENT_QUERY`;
for my $line (@out) {
- if (my ($name, $tizenId) = $line =~ /^\s*\d+\s+(([^ ]| [^ ])+)\s+.*\s+([A-Za-z0-9]+)$/) {
+ if (my ($name, $trash, $tizenId) = $line =~ /^\s*\d+\s+(([^ ]| [^ ])+)\s+.*\s+([A-Za-z0-9]{10})$/) {
print " found $name (tizenId $tizenId)\n";
$widgetMap{$name} = $tizenId;
}
${BUNDLES_DEP_LIBRARIES}
${TARGET_PLUGIN_MODULE_LIB}
${TARGET_CORE_MODULE_LIB}
+ ${PROF_LIB}
)
SET_TARGET_PROPERTIES(${TARGET_BUNDLES_LIB} PROPERTIES