-/* Copyright (c) 2010-2019. The SimGrid Team. All rights reserved. */
+/* Copyright (c) 2010-2020. 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. */
static std::vector<simgrid::instr::NetZoneContainer*> currentContainer; /* push and pop, used only in creation */
-static const char* instr_node_name(xbt_node_t node)
+std::string instr_pid(simgrid::s4u::Actor const& proc)
+{
+ return std::string(proc.get_name()) + "-" + std::to_string(proc.get_pid());
+}
+
+static const char* instr_node_name(const s_xbt_node_t* node)
{
return static_cast<char*>(xbt_graph_node_get_data(node));
}
-static container_t lowestCommonAncestor(container_t a1, container_t a2)
+static container_t lowestCommonAncestor(const simgrid::instr::Container* a1, const simgrid::instr::Container* a2)
{
// this is only an optimization (since most of a1 and a2 share the same parent)
if (a1->father_ == a2->father_)
simgrid::instr::LinkType* link = father->type_->by_name_or_create(link_typename, src->type_, dst->type_);
link->set_calling_container(father);
- // register EDGE types for triva configuration
- trivaEdgeTypes.insert(link->get_name());
-
// create the link
static long long counter = 0;
XBT_DEBUG(" linkContainers %s <-> %s", src->get_cname(), dst->get_cname());
}
-static void recursiveGraphExtraction(simgrid::s4u::NetZone* netzone, container_t container,
+static void recursiveGraphExtraction(const simgrid::s4u::NetZone* netzone, container_t container,
std::set<std::string>* filter)
{
if (not TRACE_platform_topology()) {
#define GRAPHICATOR_SUPPORT_FUNCTIONS
-static void recursiveXBTGraphExtraction(xbt_graph_t graph, std::map<std::string, xbt_node_t>* nodes,
- std::map<std::string, xbt_edge_t>* edges, sg_netzone_t netzone,
+static void recursiveXBTGraphExtraction(const s_xbt_graph_t* graph, std::map<std::string, xbt_node_t>* nodes,
+ std::map<std::string, xbt_edge_t>* edges, const_sg_netzone_t netzone,
container_t container)
{
if (not netzone->get_children().empty()) {
return ret;
}
-void instr_routing_platform_graph_export_graphviz(xbt_graph_t g, const char* filename)
+void instr_routing_platform_graph_export_graphviz(const s_xbt_graph_t* g, const char* filename)
{
unsigned int cursor = 0;
xbt_node_t node = nullptr;