#include "perfetto/ext/trace_processor/importers/memory_tracker/graph_processor.h"
#include <list>
namespace perfetto {
namespace trace_processor {
Edge;
Node;
Process;
namespace {
const char kSharedMemoryRootNode[] = …;
const char kSizeEntryName[] = …;
const char kEffectiveSizeEntryName[] = …;
Node::Entry::ScalarUnits EntryUnitsFromString(const std::string& units) { … }
std::optional<uint64_t> GetSizeEntryOfNode(Node* node) { … }
}
std::unique_ptr<GlobalNodeGraph> GraphProcessor::CreateMemoryGraph(
const GraphProcessor::RawMemoryNodeMap& process_nodes) { … }
void GraphProcessor::RemoveWeakNodesFromGraph(GlobalNodeGraph* global_graph) { … }
void GraphProcessor::AddOverheadsAndPropagateEntries(
GlobalNodeGraph* global_graph) { … }
void GraphProcessor::CalculateSizesForGraph(GlobalNodeGraph* global_graph) { … }
std::map<base::PlatformProcessId, uint64_t>
GraphProcessor::ComputeSharedFootprintFromGraph(
const GlobalNodeGraph& global_graph) { … }
void GraphProcessor::CollectAllocatorNodes(const RawProcessMemoryNode& source,
GlobalNodeGraph* global_graph,
Process* process_graph) { … }
void GraphProcessor::AddEdges(const RawProcessMemoryNode& source,
GlobalNodeGraph* global_graph) { … }
void GraphProcessor::MarkImplicitWeakParentsRecursively(Node* node) { … }
void GraphProcessor::MarkWeakOwnersAndChildrenRecursively(
Node* node,
std::set<const Node*>* visited) { … }
void GraphProcessor::RemoveWeakNodesRecursively(Node* node) { … }
void GraphProcessor::AssignTracingOverhead(const std::string& allocator,
GlobalNodeGraph* global_graph,
Process* process) { … }
Node::Entry GraphProcessor::AggregateNumericWithNameForNode(
Node* node,
const std::string& name) { … }
void GraphProcessor::AggregateNumericsRecursively(Node* node) { … }
void GraphProcessor::PropagateNumericsAndDiagnosticsRecursively(Node* node) { … }
std::optional<uint64_t> GraphProcessor::AggregateSizeForDescendantNode(
Node* root,
Node* descendant) { … }
void GraphProcessor::CalculateSizeForNode(Node* node) { … }
void GraphProcessor::CalculateNodeSubSizes(Node* node) { … }
void GraphProcessor::CalculateNodeOwnershipCoefficient(Node* node) { … }
void GraphProcessor::CalculateNodeCumulativeOwnershipCoefficient(Node* node) { … }
void GraphProcessor::CalculateNodeEffectiveSize(Node* node) { … }
}
}