Kanzi  3.9.7
Kanzi Engine API
profiling_category_detail.hpp File Reference
#include <boost/preprocessor/control/expr_if.hpp>
#include <boost/preprocessor/logical/not.hpp>
#include <kanzi/core/core_api.hpp>
#include <kanzi/core/cpp/optional.hpp>
#include <kanzi/core/string/fixed_string.hpp>

Namespaces

 kanzi
 Easing functions that require external dependencies for calculation.
 

Macros

#define KANZI_PROFILING_BUILD
 This macro is defined in the Kanzi Profiling build configuration only. More...
 
#define KZ_DETAIL_CONVERT_CATEGORY_NAME_TO_FIXED_STRING(name)
 Converts category name string literal to fixed string. More...
 
#define KZ_DETAIL_EMPTY_EXPORT_IMPORT_PREFIX
 Empty export/import prefix used as a parameter to KZ_DETAIL_PROFILING_REGISTER_CATEGORY to create regular profiling categories. More...
 
#define KZ_DETAIL_PROFILING_CATEGORY_STATE_FILTER(categoryState)
 Do not use this macro directly. More...
 
#define KZ_DETAIL_PROFILING_EVALUATE_IF_CATEGORY_IS_ENABLED(category, macro)
 Evaluates a macro only when the provided profiling category is enabled. More...
 
#define KZ_DETAIL_PROFILING_GET_CATEGORY_RUNTIME_REFERENCE(uniqueId)
 Gets runtime profiling category object reference associated with category, identified by uniqueId. More...
 
#define KZ_DETAIL_PROFILING_GET_CATEGORY_UNIQUE_TYPE(uniqueId)
 Generates profiling category type using a unique category ID. More...
 
#define KZ_DETAIL_PROFILING_INITIALIZE_CATEGORY(exportImportDirective, category, uniqueId, initialRuntimeState)
 
#define KZ_DETAIL_PROFILING_IS_CATEGORY_ENABLED_AT_RUNTIME(category, uniqueId)
 Implementation of kzProfilingIsCategoryEnabledAtRuntime macro logic. More...
 
#define KZ_DETAIL_PROFILING_REGISTER_CATEGORY(exportImportDirective, category, uniqueId, initialRuntimeState)
 Implementation of kzProfilingRegisterCategory macro logic. More...
 
#define KZ_DETAIL_PROFILING_SET_ALL_CATEGORIES_RUNTIME_STATE(newRuntimeState)
 Implementation of kzProfilingSetAllCategoriesRuntimeState macro logic. More...
 
#define KZ_DETAIL_PROFILING_SET_CATEGORY_RUNTIME_STATE(uniqueId, newRuntimeState)
 Implementation of kzProfilingCategorySetRuntimeState macro logic. More...
 

Macro Definition Documentation

#define KZ_DETAIL_PROFILING_EVALUATE_IF_CATEGORY_IS_ENABLED (   category,
  macro 
)

Evaluates a macro only when the provided profiling category is enabled.

If the profiling category you provide through the category parameter is disabled at compile time, this macro emits no code. If the category is enabled at compile time, the macro is replaced with the macro you provide.

Parameters
categoryThe category macro to check status.
macroThe text that this macro is replaced with when category is enabled at compile time.
#define KZ_DETAIL_PROFILING_GET_CATEGORY_UNIQUE_TYPE (   uniqueId)

Generates profiling category type using a unique category ID.

Parameters
uniqueIdUnique category ID.
#define KZ_DETAIL_PROFILING_GET_CATEGORY_RUNTIME_REFERENCE (   uniqueId)

Gets runtime profiling category object reference associated with category, identified by uniqueId.

Parameters
uniqueIdUnique category ID.
#define KZ_DETAIL_EMPTY_EXPORT_IMPORT_PREFIX

Empty export/import prefix used as a parameter to KZ_DETAIL_PROFILING_REGISTER_CATEGORY to create regular profiling categories.

#define KZ_DETAIL_CONVERT_CATEGORY_NAME_TO_FIXED_STRING (   name)

Converts category name string literal to fixed string.

#define KZ_DETAIL_PROFILING_REGISTER_CATEGORY (   exportImportDirective,
  category,
  uniqueId,
  initialRuntimeState 
)

Implementation of kzProfilingRegisterCategory macro logic.

This macro defines structure which is unique for each profiling category and provides interface for Profiling macros to access profiling category singleton object. The ProfilingCategory singleton object associated with the profiling category is accessible through getProfilingCategorySingleton() function. The singleton controls runtime state of category and is created with ProfilingCategory::create() function which registers the profiling category in a global registry. This registry is used by ProfilingCategory::setFilter() function to apply profiling category filter. It is required that all profiling categories are registered before ProfilingCategory::setFilter() is called, so that the function can find them in the profiling registry by name. To achieve that static instance of ProfilingCategorySingletonInitializer is defined which guarantees that the singleton is created at initialization of static variables, which means all profiling categories are registered before ProfilingCategory::setFilter() is called by Kanzi.

#define KZ_DETAIL_PROFILING_INITIALIZE_CATEGORY (   exportImportDirective,
  category,
  uniqueId,
  initialRuntimeState 
)
#define KZ_DETAIL_PROFILING_IS_CATEGORY_ENABLED_AT_RUNTIME (   category,
  uniqueId 
)

Implementation of kzProfilingIsCategoryEnabledAtRuntime macro logic.

Parameters
categoryThe profiling category macro to fetch runtime state.
uniqueIdUnique profiling category ID.
#define KZ_DETAIL_PROFILING_SET_CATEGORY_RUNTIME_STATE (   uniqueId,
  newRuntimeState 
)

Implementation of kzProfilingCategorySetRuntimeState macro logic.

#define KZ_DETAIL_PROFILING_SET_ALL_CATEGORIES_RUNTIME_STATE (   newRuntimeState)

Implementation of kzProfilingSetAllCategoriesRuntimeState macro logic.

#define KANZI_PROFILING_BUILD

This macro is defined in the Kanzi Profiling build configuration only.

See also
Kanzi profiling build
#define KZ_DETAIL_PROFILING_CATEGORY_STATE_FILTER (   categoryState)

Do not use this macro directly.

This macro is defined in Kanzi profiling builds. It is uses to disable all Kanzi profiling categories in all build types except profiling builds where KANZI_PROFILING_BUILD is defined.