hpx/tracing/tracing.hpp#

Defined in header hpx/tracing/tracing.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

namespace hpx
namespace threads
namespace tracing

Functions

template<typename ThreadData>
constexpr void task_created([[maybe_unused]] ThreadData *thrdptr, [[maybe_unused]] void const *parent_task_id = nullptr) noexcept#
template<typename ThreadData>
constexpr void task_executing([[maybe_unused]] ThreadData *thrdptr) noexcept#
template<typename ThreadId>
constexpr void task_yielded([[maybe_unused]] ThreadId const &id) noexcept#
template<typename ThreadId, typename String>
constexpr void task_suspended([[maybe_unused]] ThreadId const &id, [[maybe_unused]] String const &reason) noexcept#
template<typename ThreadId, typename StateX>
constexpr void task_resumed([[maybe_unused]] ThreadId const &id, [[maybe_unused]] StateX statex) noexcept#
template<typename ThreadData>
constexpr void task_completed([[maybe_unused]] ThreadData *thrdptr) noexcept#
struct lock_context
#include <tracing.hpp>

Context for annotating lock acquisitions and releases.

This struct is used to provide tracing annotations for synchronization primitives such as spinlocks and mutexes. It registers the creation, acquisition, and release of locks to the active tracing backend.

Public Functions

explicit lock_context(char const *name = nullptr, void const *addr = nullptr) noexcept#

Constructs a lock context.

Parameters
  • name – The name or description of the lock.

  • addr – The memory address of the lock, used to track it uniquely.

explicit lock_context(char const *prefix, char const *suffix, void const *addr = nullptr) noexcept#

Constructs a lock context with a dynamic name.

Parameters
  • prefix – The prefix for the lock name.

  • suffix – The suffix for the lock name.

  • addr – The memory address of the lock, used to track it uniquely.

bool before_lock() const noexcept#

Called immediately before attempting to acquire the lock.

Returns

true if the prepare event was recorded and after_lock should be called.

void after_lock() const noexcept#

Called immediately after the lock is successfully acquired.

void after_try_lock(bool success) const noexcept#

Called after a try-lock operation completes.

Parameters

success – true if the lock was acquired, false if it failed.

void before_unlock() const noexcept#

Called immediately before releasing the lock.

void after_unlock() const noexcept#

Called immediately after releasing the lock.

namespace util
namespace external_timer#