2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @author Lukasz Wrzosek (l.wrzosek@samsung.com)
20 * @brief This is header file for profiling function.
23 #ifndef WRT_ENGINE_SRC_PROFILING_PROFILING_UTIL_H
24 #define WRT_ENGINE_SRC_PROFILING_PROFILING_UTIL_H
26 #ifdef PROFILING_ENABLED
30 void AddProfilingMeasurment(const char* name,
31 const char* prefix = 0,
32 const char* description = 0);
33 #define ADD_PROFILING_POINT(name, ...) AddProfilingMeasurment(name, \
36 void AddProfilingMeasurment(const char* name,
38 const char* description);
39 #define ADD_PROFILING_POINT(name, prefix, desc) AddProfilingMeasurment(name, \
44 void AddStdoutProfilingMeasurment(const char* name, bool start);
45 // profiling script additional proceeds stdout output
46 #define LOG_PROFILE_START(x) AddStdoutProfilingMeasurment(x, true)
47 #define LOG_PROFILE_STOP(x) AddStdoutProfilingMeasurment(x, false)
48 #else //PROFILING_ENABLED
50 #define ADD_PROFILING_POINT(name, ...) (void)1
51 #define LOG_PROFILE_START(x) (void)1
52 #define LOG_PROFILE_STOP(x) (void)1
54 #endif //PROFILING_ENABLED
56 #endif /* WRT_ENGINE_SRC_PROFILING_PROFILING_UTIL_H */