Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
MC::Region: Also remove the permanent_addr thingy
[simgrid.git] / src / kernel / resource / profile / trace_mgr.cpp
1 /* Copyright (c) 2004-2019. The SimGrid Team. All rights reserved.          */
2
3 /* This program is free software; you can redistribute it and/or modify it
4  * under the terms of the license (GNU LGPL) which comes with this package. */
5
6 #include "xbt/log.h"
7 #include "xbt/sysdep.h"
8
9 #include "src/kernel/resource/profile/trace_mgr.hpp"
10 #include "src/surf/surf_interface.hpp"
11 #include <boost/algorithm/string.hpp>
12 #include <boost/algorithm/string/join.hpp>
13 #include <boost/algorithm/string/split.hpp>
14 #include <cmath>
15 #include <fstream>
16 #include <sstream>
17 #include <unordered_map>
18
19 #include "src/kernel/resource/profile/Profile.cpp"
20
21 /** This file has been splitted into three different files:
22   - Profile, defining the class Profile and functions that allow to use provided profiles;
23   - DatedValue, the class of a DatedValue (a value and a timestamp);
24   - FutureEvtSet, a set of events happening in the future. **/
25
26 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(profile, resource, "Surf profile management");
27 void tmgr_finalize()
28 {
29   for (auto const& kv : trace_list)
30     delete kv.second;
31   trace_list.clear();
32 }
33
34 void tmgr_trace_event_unref(simgrid::kernel::profile::Event** event)
35 {
36   if ((*event)->free_me) {
37     delete *event;
38     *event = nullptr;
39   }
40 }