Phosphor
phosphor-internal.h File Reference
#include <atomic>

Go to the source code of this file.

Macros

#define PHOSPHOR_INTERNAL_UID3(a, b)   phosphor_internal_ ##a##_##b
 
#define PHOSPHOR_INTERNAL_UID2(a, b)   PHOSPHOR_INTERNAL_UID3(a, b)
 
#define PHOSPHOR_INTERNAL_UID(prefix)   PHOSPHOR_INTERNAL_UID2(prefix, __LINE__)
 
#define PHOSPHOR_INTERNAL_CATEGORY_INFO
 
#define PHOSPHOR_INTERNAL_INITIALIZE_TPI(tpi_name, category, name, argA, argB)
 
#define PHOSPHOR_INTERNAL_INITIALIZE_TRACEPOINT(category, name, argA, argB)
 
#define PHOSPHOR_INTERNAL_TRACE_EVENT(category, name, argA, argB, type, ...)
 
#define PHOSPHOR_INTERNAL_TRACE_EVENT0(category, name, type)
 
#define PHOSPHOR_INTERNAL_ADDITIONAL_TRACE_EVENT0(tpi_name, category, name, type)
 

Detailed Description

This file is internal to the inner workings of Phosphor and is not intended for public consumption.

Macro Definition Documentation

#define PHOSPHOR_INTERNAL_ADDITIONAL_TRACE_EVENT0 (   tpi_name,
  category,
  name,
  type 
)
Value:
PHOSPHOR_INTERNAL_INITIALIZE_TPI(tpi_name, category, name, "arg1", "arg2") \
if (PHOSPHOR_INTERNAL_UID(category_enabled_temp)->load(std::memory_order_relaxed) \
!= phosphor::CategoryStatus::Disabled) { \
PHOSPHOR_INSTANCE.logEvent(&PHOSPHOR_INTERNAL_UID(tpi_name), type); \
}
#define PHOSPHOR_INTERNAL_CATEGORY_INFO
Value:
static std::atomic<const phosphor::AtomicCategoryStatus*> \
PHOSPHOR_INTERNAL_UID(category_enabled); \
const phosphor::AtomicCategoryStatus* PHOSPHOR_INTERNAL_UID(category_enabled_temp) \
= PHOSPHOR_INTERNAL_UID(category_enabled).load(std::memory_order_acquire); \
#define PHOSPHOR_INTERNAL_INITIALIZE_TPI (   tpi_name,
  category,
  name,
  argA,
  argB 
)
Value:
constexpr static phosphor::tracepoint_info PHOSPHOR_INTERNAL_UID(tpi_name) = { \
category, \
name, \
{{argA, argB}} \
}; \
Definition: tracepoint_info.h:31
#define PHOSPHOR_INTERNAL_INITIALIZE_TRACEPOINT (   category,
  name,
  argA,
  argB 
)
Value:
PHOSPHOR_INTERNAL_INITIALIZE_TPI(tpi, category, name, argA, argB); \
if (unlikely(!PHOSPHOR_INTERNAL_UID(category_enabled_temp))) { \
PHOSPHOR_INTERNAL_UID(category_enabled_temp) = &PHOSPHOR_INSTANCE.getCategoryStatus(category); \
PHOSPHOR_INTERNAL_UID(category_enabled).store( \
PHOSPHOR_INTERNAL_UID(category_enabled_temp), std::memory_order_release); \
} \
#define PHOSPHOR_INSTANCE
Definition: phosphor.h:73
#define PHOSPHOR_INTERNAL_TRACE_EVENT (   category,
  name,
  argA,
  argB,
  type,
  ... 
)
Value:
PHOSPHOR_INTERNAL_CATEGORY_INFO \
PHOSPHOR_INTERNAL_INITIALIZE_TRACEPOINT(category, name, argA, argB) \
if (PHOSPHOR_INTERNAL_UID(category_enabled_temp)->load(std::memory_order_acquire) \
!= phosphor::CategoryStatus::Disabled) { \
PHOSPHOR_INSTANCE.logEvent(&PHOSPHOR_INTERNAL_UID(tpi), type, __VA_ARGS__); \
}
#define PHOSPHOR_INTERNAL_TRACE_EVENT0 (   category,
  name,
  type 
)
Value:
PHOSPHOR_INTERNAL_CATEGORY_INFO \
PHOSPHOR_INTERNAL_INITIALIZE_TRACEPOINT(category, name, "arg1", "arg2") \
if (PHOSPHOR_INTERNAL_UID(category_enabled_temp)->load(std::memory_order_relaxed) \
!= phosphor::CategoryStatus::Disabled) { \
PHOSPHOR_INSTANCE.logEvent(&PHOSPHOR_INTERNAL_UID(tpi), type); \
}