Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
taegyunkim committed Oct 14, 2024
1 parent 7bb5f61 commit 81652f8
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ddtrace/internal/datadog/profiling/stack_v2/src/sampler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,20 @@ Sampler::stop()
}

void
track_asyncio_loop(uintptr_t thread_id, PyObject* loop)
Sampler::track_asyncio_loop(uintptr_t thread_id, PyObject* loop)
{
// Holds echion's global lock
std::lock_guard<std::mutex> guard(thread_info_map_lock);
if (thread_info_map.find(thread_id) != thread_info_map.end()) {
thread_info_map.find(thread_id)->second->asyncio_loop = (loop != Py_None) ? reinterpret_cast<uintptr_t>(loop) : 0;
thread_info_map.find(thread_id)->second->asyncio_loop =
(loop != Py_None) ? reinterpret_cast<uintptr_t>(loop) : 0;
}
}

void
init_asyncio(PyObject* _asyncio_current_tasks, PyObject* _asyncio_scheduled_tasks, PyObject* _asyncio_eager_tasks)
Sampler::init_asyncio(PyObject* _asyncio_current_tasks,
PyObject* _asyncio_scheduled_tasks,
PyObject* _asyncio_eager_tasks)
{
asyncio_current_tasks = _asyncio_current_tasks;
asyncio_scheduled_tasks = _asyncio_scheduled_tasks;
Expand All @@ -172,7 +175,7 @@ init_asyncio(PyObject* _asyncio_current_tasks, PyObject* _asyncio_scheduled_task
}

void
link_tasks(PyObject* parent, PyObject* child)
Sampler::link_tasks(PyObject* parent, PyObject* child)
{
std::lock_guard<std::mutex> guard(task_link_map_lock);
task_link_map[child] = parent;
Expand Down

0 comments on commit 81652f8

Please sign in to comment.