-/* Copyright (c) 2010, 2012-2015. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2010-2017. The SimGrid Team. All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
#include "src/instr/instr_private.h"
-#include "simgrid/s4u/engine.hpp"
-#include "simgrid/s4u/host.hpp"
-
+#include "simgrid/s4u/Engine.hpp"
+#include "simgrid/s4u/Host.hpp"
#include "src/kernel/routing/NetZoneImpl.hpp"
#include "src/surf/network_interface.hpp"
#include "src/surf/xml/platf_private.hpp"
return;
}
XBT_DEBUG("Graph extraction for NetZone = %s", netzone->name());
- if (!xbt_dict_is_empty(netzone->children())) {
- xbt_dict_cursor_t cursor = nullptr;
- NetZone_t nz_son;
- char *child_name;
+ if (!netzone->children()->empty()) {
//bottom-up recursion
- xbt_dict_foreach (netzone->children(), cursor, child_name, nz_son) {
+ for (auto nz_son : *netzone->children()) {
container_t child_container = static_cast<container_t>(xbt_dict_get(container->children, nz_son->name()));
recursiveGraphExtraction(nz_son, child_container, filter);
}
speed = PJ_type_variable_new ("power", nullptr, container->type);
}
- double current_speed_state = host.getPstateSpeedCurrent();
+ double current_speed_state = host.speed();
new_pajeSetVariable (0, container, speed, current_speed_state);
}
if (TRACE_uncategorized()){
#define GRAPHICATOR_SUPPORT_FUNCTIONS
-static void recursiveXBTGraphExtraction(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, NetZone_t netzone,
+static void recursiveXBTGraphExtraction(xbt_graph_t graph, xbt_dict_t nodes, xbt_dict_t edges, sg_netzone_t netzone,
container_t container)
{
- if (!xbt_dict_is_empty(netzone->children())) {
- xbt_dict_cursor_t cursor = nullptr;
- NetZone_t netzone_child;
- char *child_name;
+ if (!netzone->children()->empty()) {
//bottom-up recursion
- xbt_dict_foreach (netzone->children(), cursor, child_name, netzone_child) {
+ for (auto netzone_child : *netzone->children()) {
container_t child_container = static_cast<container_t>(xbt_dict_get(container->children, netzone_child->name()));
recursiveXBTGraphExtraction(graph, nodes, edges, netzone_child, child_container);
}