#include <category_registry.h>
|
static CategoryStatus | calculateEnabled (const std::string &category_group, const std::vector< std::string > &enabled, const std::vector< std::string > &disabled) |
|
|
std::mutex | mutex |
|
std::array< std::string, registry_size > | groups |
|
std::array< AtomicCategoryStatus, registry_size > | group_statuses |
|
std::atomic< size_t > | group_count |
|
std::vector< std::string > | enabled_categories |
|
std::vector< std::string > | disabled_categories |
|
|
static constexpr int | index_category_limit = 1 |
|
static constexpr int | index_metadata = 2 |
|
static constexpr int | index_non_default_categories = 3 |
|
CategoryRegistry encapsulates the logic for enabling/disabling of various tracing categories
phosphor::CategoryRegistry::CategoryRegistry |
( |
| ) |
|
CategoryStatus phosphor::CategoryRegistry::calculateEnabled |
( |
const std::string & |
category_group, |
|
|
const std::vector< std::string > & |
enabled, |
|
|
const std::vector< std::string > & |
disabled |
|
) |
| |
|
static |
Calculates whether or not a given category group string be enabled based on the supplied categories.
- Parameters
-
category_group | The category_group to get the status of |
enabled | The enabled groups |
disabled | The disabled groups |
- Returns
- The calculated status of the group based on the currently enabled/disabled categories.
CategoryStatus phosphor::CategoryRegistry::calculateEnabled |
( |
size_t |
index | ) |
|
|
protected |
Calculates whether or not a given group index should be enabled based on the currently enabled categories.
- Parameters
-
index | The index of the group to calculate |
- Returns
- The calculated status of the group based on the currently enabled/disabled categories.
void phosphor::CategoryRegistry::disableAll |
( |
| ) |
|
Disables all category groups
Equivalent to:
CategoryRegistry::updateEnabled({{}}, {{}});
Except a bit more efficient as it doesn't bother with calculations
void phosphor::CategoryRegistry::getStats |
( |
StatsCallback & |
addStats | ) |
const |
Invokes methods on the callback to supply various stats about the category registry.
const AtomicCategoryStatus & phosphor::CategoryRegistry::getStatus |
( |
const char * |
category_group | ) |
|
Used to get a reference to a reusable CategoryStatus. This should generally be held in a block-scope static at a given trace point to verify if the category for that trace point is presently enabled.
- Parameters
-
category_group | The category group to check |
- Returns
- const reference to the CategoryStatus atomic that holds that status for the given category group
void phosphor::CategoryRegistry::updateEnabled |
( |
const std::vector< std::string > & |
enabled, |
|
|
const std::vector< std::string > & |
disabled |
|
) |
| |
Enable a list of categories for tracing (and disable all others)
- Parameters
-
enabled | Vector of categories to mark as enabled |
disabled | Vector of categories to mark as disabled |
constexpr int phosphor::CategoryRegistry::registry_size = 250 |
|
static |
Number of unique category permutations that a registry supports
The documentation for this class was generated from the following files: