#include <boost/preprocessor/control/expr_if.hpp>
#include <boost/current_function.hpp>
#include <kanzi/core/cpp/platform.hpp>
#include <kanzi/core/profiling/profiling_category.hpp>
#include <kanzi/core/profiling/function_profiler_source.hpp>
Macros | |
#define | KZ_PROFILE_FUNCTION_INTERNAL(profiler, name, category, sampleBufferSize, description) |
Sets up function profiling objects for a code block (internal). More... | |
#define | KZ_PROFILE_SCOPE_INTERNAL(instance, description) |
Manage function profiler source for a code block (internal). More... | |
#define | KZ_PROFILING_PROFILE_FUNCTION_INTERNAL(profiler, name, category, sampleBufferSize, description) |
Filters a block of code that is being profiled by category (internal), if the block qualifies for profiling, then a function profiler instance is created and function will be profiled. More... | |
#define | KZ_PROFILING_PROFILE_SCOPE_INTERNAL(category, source, description) |
Filters a block of code that is being profiled by category (internal), if the block qualifies for profiling, then given function profiler object is used to profile this code block. More... | |
#define | KZ_PROFILING_EXECUTE_IF_CATEGORY_ENABLED(category, expression) |
#define KZ_PROFILE_FUNCTION_INTERNAL | ( | profiler, | |
name, | |||
category, | |||
sampleBufferSize, | |||
description | |||
) |
Sets up function profiling objects for a code block (internal).
This macro creates a static function profiler source for a code block and registers it to profiler. It also manages the function profiler in the current scope.
profiler | Profiler to be used. |
name | Name of the code block that is being profiled. |
category | Category of the code block that is being profiled. |
sampleBufferSize | Size of the buffer that is used to store per-invocation measurements. |
category | Category of the code. |
#define KZ_PROFILE_SCOPE_INTERNAL | ( | instance, | |
description | |||
) |
Manage function profiler source for a code block (internal).
This macro manages existing function profiler source in the current scope.
instance | Function profiler instance. |
description | Function invocation description, such as arguments. |
#define KZ_PROFILING_PROFILE_FUNCTION_INTERNAL | ( | profiler, | |
name, | |||
category, | |||
sampleBufferSize, | |||
description | |||
) |
Filters a block of code that is being profiled by category (internal), if the block qualifies for profiling, then a function profiler instance is created and function will be profiled.
This macro filters a code block based on enabled category. For code block to pass, given category must be enabled.
profiler | Profiler to be used. |
name | Name of the code block that is being profiled. |
category | Category of the code block that is being profiled. |
sampleBufferSize | Size of the buffer that is used to store per-invocation measurements. |
description | Function invocation description, such as arguments. |
#define KZ_PROFILING_PROFILE_SCOPE_INTERNAL | ( | category, | |
source, | |||
description | |||
) |
Filters a block of code that is being profiled by category (internal), if the block qualifies for profiling, then given function profiler object is used to profile this code block.
This macro filters a code block based on enabled category. For code block to pass, given category must be enabled.
category | Category of the code block that is being profiled. |
source | Function profiler source to be used in profiling. |
#define KZ_PROFILING_EXECUTE_IF_CATEGORY_ENABLED | ( | category, | |
expression | |||
) |