Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
trim instr_msg code
[simgrid.git] / src / msg / instr_msg_task.cpp
1 /* Copyright (c) 2010-2019. The SimGrid Team.
2  * All rights reserved.                                                     */
3
4 /* This program is free software; you can redistribute it and/or modify it
5  * under the terms of the license (GNU LGPL) which comes with this package. */
6
7 #include "mc/mc.h"
8 #include "src/instr/instr_private.hpp"
9 #include "src/msg/msg_private.hpp"
10
11 #include <atomic>
12
13 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_msg, instr, "MSG instrumentation");
14
15 /* MSG_task_put related functions */
16 void TRACE_msg_task_put_start(msg_task_t task)
17 {
18   XBT_DEBUG("PUT,in %p, %lld, %s", task, task->counter, task->category);
19
20   if (TRACE_actor_is_enabled()) {
21     container_t process_container = simgrid::instr::Container::by_name(instr_pid(MSG_process_self()));
22     std::string key = std::string("p") + std::to_string(task->counter);
23     simgrid::instr::Container::get_root()->get_link("ACTOR_TASK_LINK")->start_event(process_container, "SR", key);
24   }
25 }