MCPcopy Create free account
hub / github.com/KDAB/hotspot / stackCollapsedExport

Function stackCollapsedExport

src/resultsbottomuppage.cpp:24–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23namespace {
24void stackCollapsedExport(QTextStream& file, int type, const Data::Costs& costs, const Data::BottomUp& node)
25{
26 if (!node.children.isEmpty()) {
27 for (const auto& child : node.children)
28 stackCollapsedExport(file, type, costs, child);
29 return;
30 }
31
32 auto entry = &node;
33 while (entry) {
34 if (entry->symbol.symbol.isEmpty())
35 file << '[' << entry->symbol.binary << ']';
36 else
37 file << Util::formatSymbol(entry->symbol);
38 entry = entry->parent;
39 if (entry)
40 file << ';';
41 }
42
43 // leaf node, actually generate a line and write it to the file
44 file << ' ';
45 file << costs.cost(type, node.id);
46 file << '\n';
47}
48
49void stackCollapsedExport(QFile& file, int type, const Data::BottomUpResults& results)
50{

Callers 1

ResultsBottomUpPageMethod · 0.85

Calls 2

isEmptyMethod · 0.80
costMethod · 0.45

Tested by

no test coverage detected