Skip to content

Commit

Permalink
Remove fatal error when callback and buffer tracing API in one contex…
Browse files Browse the repository at this point in the history
…t (#952)

- one context for callback and buffer tracing of same API produces erroneous fatal error -- this is a valid use case
  • Loading branch information
jrmadsen authored Jun 25, 2024
1 parent af2f85c commit b62ba5f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 97 deletions.
3 changes: 0 additions & 3 deletions source/lib/rocprofiler-sdk/hip/hip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,6 @@ hip_api_impl<TableIdx, OpIdx>::functor(Args... args)
return;
}

ROCP_FATAL_IF(external_corr_ids.size() < (callback_contexts.size() + buffered_contexts.size()))
<< "missing external correlation ids";

auto buffer_record = common::init_public_api_struct(buffered_api_data_t{});
auto tracer_data = common::init_public_api_struct(callback_api_data_t{});
auto* corr_id = tracing::correlation_service::construct(ref_count);
Expand Down
3 changes: 0 additions & 3 deletions source/lib/rocprofiler-sdk/hsa/hsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,6 @@ hsa_api_impl<TableIdx, OpIdx>::functor(Args... args)
return;
}

ROCP_FATAL_IF(external_corr_ids.size() < (callback_contexts.size() + buffered_contexts.size()))
<< "missing external correlation ids";

auto buffer_record = common::init_public_api_struct(buffer_hsa_api_record_t{});
auto tracer_data = common::init_public_api_struct(callback_hsa_api_data_t{});
auto* corr_id = tracing::correlation_service::construct(ref_count);
Expand Down
3 changes: 0 additions & 3 deletions source/lib/rocprofiler-sdk/marker/marker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,6 @@ roctx_api_impl<TableIdx, OpIdx>::functor(Args... args)
return;
}

ROCP_FATAL_IF(external_corr_ids.size() < (callback_contexts.size() + buffered_contexts.size()))
<< "missing external correlation ids";

auto ref_count = 2;
auto buffer_record = common::init_public_api_struct(buffered_api_data_t{});
auto tracer_data = common::init_public_api_struct(callback_api_data_t{});
Expand Down
88 changes: 0 additions & 88 deletions source/lib/rocprofiler-sdk/tracing/tracing.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,94 +37,6 @@ namespace rocprofiler
{
namespace tracing
{
// template <typename DomainT, typename... Args>
// bool
// context_filter(const context::context* ctx, DomainT domain, Args... args);

// template <typename ClearContainersT = std::false_type>
// void
// populate_contexts(rocprofiler_callback_tracing_kind_t callback_domain_idx,
// rocprofiler_buffer_tracing_kind_t buffered_domain_idx,
// rocprofiler_tracing_operation_t operation_idx,
// callback_context_data_vec_t& callback_contexts,
// buffered_context_data_vec_t& buffered_contexts,
// external_correlation_id_map_t& extern_corr_ids,
// ClearContainersT = ClearContainersT{});

// template <typename ClearContainersT = std::false_type>
// void
// populate_contexts(rocprofiler_callback_tracing_kind_t callback_domain_idx,
// rocprofiler_buffer_tracing_kind_t buffered_domain_idx,
// callback_context_data_vec_t& callback_contexts,
// buffered_context_data_vec_t& buffered_contexts,
// external_correlation_id_map_t& extern_corr_ids,
// ClearContainersT = ClearContainersT{});

// template <typename ClearContainersT = std::false_type>
// void
// populate_contexts(rocprofiler_callback_tracing_kind_t callback_domain_idx,
// rocprofiler_buffer_tracing_kind_t buffered_domain_idx,
// rocprofiler_tracing_operation_t operation_idx,
// tracing_data& data,
// ClearContainersT = ClearContainersT{});

// template <typename ClearContainersT = std::false_type>
// void
// populate_contexts(rocprofiler_callback_tracing_kind_t callback_domain_idx,
// rocprofiler_buffer_tracing_kind_t buffered_domain_idx,
// tracing_data& data,
// ClearContainersT = ClearContainersT{});

// void
// populate_external_correlation_ids(external_correlation_id_map_t& external_corr_ids,
// rocprofiler_thread_id_t thr_id,
// rocprofiler_external_correlation_id_request_kind_t kind,
// rocprofiler_tracing_operation_t operation,
// uint64_t internal_corr_id);

// void
// update_external_correlation_ids(external_correlation_id_map_t& external_corr_ids,
// rocprofiler_thread_id_t thr_id,
// rocprofiler_external_correlation_id_request_kind_t kind);

// template <typename TracerDataT>
// void
// execute_phase_none_callbacks(callback_context_data_vec_t& callback_contexts,
// rocprofiler_thread_id_t thr_id,
// uint64_t internal_corr_id,
// external_correlation_id_map_t& external_corr_ids,
// rocprofiler_callback_tracing_kind_t domain,
// rocprofiler_tracing_operation_t operation,
// TracerDataT& tracer_data);

// template <typename TracerDataT>
// void
// execute_phase_enter_callbacks(callback_context_data_vec_t& callback_contexts,
// rocprofiler_thread_id_t thr_id,
// uint64_t internal_corr_id,
// external_correlation_id_map_t& external_corr_ids,
// rocprofiler_callback_tracing_kind_t domain,
// rocprofiler_tracing_operation_t operation,
// TracerDataT& tracer_data);

// template <typename TracerDataT>
// void
// execute_phase_exit_callbacks(callback_context_data_vec_t& callback_contexts,
// external_correlation_id_map_t& external_corr_ids,
// rocprofiler_callback_tracing_kind_t domain,
// rocprofiler_tracing_operation_t operation,
// TracerDataT& tracer_data);

// template <typename BufferRecordT, typename OperationT = rocprofiler_tracing_operation_t>
// void
// execute_buffer_record_emplace(buffered_context_data_vec_t& buffered_contexts,
// rocprofiler_thread_id_t thr_id,
// uint64_t internal_corr_id,
// external_correlation_id_map_t& external_corr_ids,
// rocprofiler_buffer_tracing_kind_t domain,
// OperationT operation,
// BufferRecordT&& base_record);

template <typename DomainT, typename... Args>
inline bool
context_filter(const context::context* ctx, DomainT domain, Args... args)
Expand Down

0 comments on commit b62ba5f

Please sign in to comment.