#include "src/trace_processor/importers/proto/memory_tracker_snapshot_parser.h"
#include "perfetto/ext/base/string_view.h"
#include "protos/perfetto/trace/memory_graph.pbzero.h"
#include "src/trace_processor/containers/string_pool.h"
#include "src/trace_processor/importers/common/args_tracker.h"
#include "src/trace_processor/tables/memory_tables_py.h"
namespace perfetto {
namespace trace_processor {
MemoryTrackerSnapshotParser::MemoryTrackerSnapshotParser(
TraceProcessorContext* context)
: … { … }
void MemoryTrackerSnapshotParser::ParseMemoryTrackerSnapshot(int64_t ts,
ConstBytes blob) { … }
void MemoryTrackerSnapshotParser::NotifyEndOfFile() { … }
void MemoryTrackerSnapshotParser::ReadProtoSnapshot(
ConstBytes blob,
RawMemoryNodeMap& raw_nodes,
LevelOfDetail& level_of_detail) { … }
std::unique_ptr<GlobalNodeGraph> MemoryTrackerSnapshotParser::GenerateGraph(
RawMemoryNodeMap& raw_nodes) { … }
void MemoryTrackerSnapshotParser::EmitRows(int64_t ts,
GlobalNodeGraph& graph,
LevelOfDetail level_of_detail) { … }
void MemoryTrackerSnapshotParser::EmitMemorySnapshotNodeRows(
GlobalNodeGraph::Node& root_node_graph,
ProcessMemorySnapshotId& proc_snapshot_row_id,
IdNodeMap& id_node_map) { … }
void MemoryTrackerSnapshotParser::EmitMemorySnapshotNodeRowsRecursively(
GlobalNodeGraph::Node& node,
const std::string& path,
std::optional<tables::MemorySnapshotNodeTable::Id> parent_node_row_id,
ProcessMemorySnapshotId& proc_snapshot_row_id,
IdNodeMap& id_node_map) { … }
std::optional<tables::MemorySnapshotNodeTable::Id>
MemoryTrackerSnapshotParser::EmitNode(
const GlobalNodeGraph::Node& node,
const std::string& path,
std::optional<tables::MemorySnapshotNodeTable::Id> parent_node_row_id,
ProcessMemorySnapshotId& proc_snapshot_row_id,
IdNodeMap& id_node_map) { … }
void MemoryTrackerSnapshotParser::GenerateGraphFromRawNodesAndEmitRows() { … }
}
}