Skip to content

Commit

Permalink
Update controller.cpp (#932)
Browse files Browse the repository at this point in the history
* Update controller.cpp

* Update controller.cpp

* Formatting
  • Loading branch information
ammarwa authored Jun 13, 2024
1 parent ef156c3 commit c6ec8ca
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions source/lib/rocprofiler-sdk/counters/controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,11 @@ CounterController::configure_agent_collection(rocprofiler_context_id_t
}

ctx.agent_counter_collection->agent_data.emplace_back();
ctx.agent_counter_collection->agent_data.back().callback_data = {.ptr = user_data};
ctx.agent_counter_collection->agent_data.back().agent_id = agent_id;
ctx.agent_counter_collection->agent_data.back().cb = cb;
ctx.agent_counter_collection->agent_data.back().buffer = buffer_id;
ctx.agent_counter_collection->agent_data.back().callback_data =
rocprofiler_user_data_t{.ptr = user_data};
ctx.agent_counter_collection->agent_data.back().agent_id = agent_id;
ctx.agent_counter_collection->agent_data.back().cb = cb;
ctx.agent_counter_collection->agent_data.back().buffer = buffer_id;

return ROCPROFILER_STATUS_SUCCESS;
}
Expand Down Expand Up @@ -187,4 +188,4 @@ get_profile_config(rocprofiler_profile_config_id_t id)
}
}
} // namespace counters
} // namespace rocprofiler
} // namespace rocprofiler

0 comments on commit c6ec8ca

Please sign in to comment.