52 #include <boost/graph/adjacency_list.hpp> 53 #include <boost/graph/filtered_graph.hpp> 80 : bb_executions(_bb_graph), edge_executions(_bb_graph)
154 PathProfilingInformation::const_iterator loop, loop_end =
path_profiling.end();
159 const std::map<CustomOrderedSet<unsigned int>,
long double>& loop_path_profiling = loop->second;
160 std::map<CustomOrderedSet<unsigned int>,
long double>::const_iterator loop_path,
161 loop_path_end = loop_path_profiling.end();
162 for(loop_path = loop_path_profiling.begin(); loop_path != loop_path_end; ++loop_path)
165 std::string cer_path_string;
168 for(cer = cer_path.begin(); cer != cer_end; ++cer)
170 cer_path_string += std::to_string(*cer) +
"#";
178 std::map<unsigned int, long double> ordered_bb_executions;
181 BBExecutions::const_iterator bb_execution, bb_execution_end =
bb_executions.end();
182 for(bb_execution =
bb_executions.begin(); bb_execution != bb_execution_end; ++bb_execution)
184 ordered_bb_executions[fcfg->
CGetBBNodeInfo(bb_execution->first)->block->number] = bb_execution->second;
187 std::map<unsigned int, long double>::const_iterator ordered_bb_execution,
188 ordered_bb_execution_end = ordered_bb_executions.end();
189 for(ordered_bb_execution = ordered_bb_executions.begin(); ordered_bb_execution != ordered_bb_execution_end;
190 ++ordered_bb_execution)
198 std::map<std::pair<unsigned int, unsigned int>,
long double> ordered_edge_executions;
201 BBEdgeExecutions::const_iterator edge_execution, edge_execution_end =
edge_executions.end();
202 for(edge_execution =
edge_executions.begin(); edge_execution != edge_execution_end; ++edge_execution)
204 ordered_edge_executions[std::pair<unsigned int, unsigned int>(
205 fcfg->
CGetBBNodeInfo(boost::source(edge_execution->first, *fcfg))->block->number,
209 std::map<std::pair<unsigned int, unsigned int>,
long double>::const_iterator ordered_edge_execution,
210 ordered_edge_execution_end = ordered_edge_executions.end();
211 for(ordered_edge_execution = ordered_edge_executions.begin(); ordered_edge_execution != ordered_edge_execution_end;
212 ++ordered_edge_execution)
224 AvgIterations::const_iterator avg_iteration, avg_iteration_end =
avg_iterations.end();
225 for(avg_iteration =
avg_iterations.begin(); avg_iteration != avg_iteration_end; ++avg_iteration)
233 Iterations::const_iterator abs_iteration, abs_iteration_end =
abs_iterations.end();
234 for(abs_iteration =
abs_iterations.begin(); abs_iteration != abs_iteration_end; ++abs_iteration)
242 Iterations::const_iterator max_iteration, max_iteration_end =
max_iterations.end();
243 for(max_iteration =
max_iterations.begin(); max_iteration != max_iteration_end; ++max_iteration)
#define STR_XML_host_profiling_max_iteration
The node containing information about max iterations of a loop.
#define STR_XML_host_profiling_paths_loop
The node containing information about path profiling in a loop.
#define STR_XML_host_profiling_avg_iterations
The node containing information about average iterations of loops.
#define STR_XML_host_profiling_cers
The attribute containing the sequence of cers of the path.
#define STR_XML_host_profiling_edge_execution
The node containing information about executions of a basic block.
#define STR_XML_host_profiling_path
The node containing information about a single path.
Definition of hash function for EdgeDescriptor.
Data structure describing a basic block at tree level.
BBEdgeExecutions(const BBGraphConstRef bb_graph)
Constructor.
#define STR_XML_host_profiling_source_id
The attribute containing id of the source vertex of the edge.
#define STR_XML_host_profiling_max_iterations
The node containing information about max iterations of loops.
unsigned map[NUM_VERTICES]
absl::flat_hash_map< T, U, Hash, Eq, Alloc > CustomUnorderedMap
#define STR_XML_host_profiling_paths
The node containing information path profiling.
#define STR_XML_host_profiling_abs_iteration
The node containing information about absolute iterations of loop.
#define STR_XML_host_profiling_executions
The attribute containing the number of executions of a basic block.
#define STR_XML_host_profiling_bb_executions
The node containing information about basic blocks executions.
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
#define STR_XML_host_profiling_target_id
The attribute containing id of the target vertex of the edge.
#define STR_XML_host_profiling_bb_execution
The node containing information about executions of a basic block.
#define WRITE_XNVM2(name, value, node)
WRITE XML Name Value Macro second version. Insert a value in an XML tree given the name of the attrib...
#define STR_XML_host_profiling_abs_iterations
The node containing information about absolute iterations of a loop.
#define STR_XML_host_profiling_frequency
The attribute containing the frequency of a path.
Class specification of the basic_block structure.
const BBNodeInfoConstRef CGetBBNodeInfo(const vertex node) const
Return the info associated with a basic block.
#define STR_XML_host_profiling_avg_iteration
The node containing information about average iterations of a loop.
Some macro used to interface with the XML library.
BBExecutions(const BBGraphConstRef bb_graph)
Constructor.
#define STR_XML_host_profiling_id
The attribute containing the id of a bb, function or loop.
xml nodes of host profiling data
#define STR_XML_host_profiling_iterations
The attribute containing the number of iterations.
#define STR_XML_host_profiling_edge_executions
The node containing information about basic blocks executions.
xml_element * add_child_element(const std::string &name)
Add a child element to this node.
boost::graph_traits< graph >::edge_descriptor EdgeDescriptor
edge definition.