chromium/services/resource_coordinator/memory_instrumentation/chrome_graph_processor.h

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef SERVICES_RESOURCE_COORDINATOR_MEMORY_INSTRUMENTATION_CHROME_GRAPH_PROCESSOR_H_
#define SERVICES_RESOURCE_COORDINATOR_MEMORY_INSTRUMENTATION_CHROME_GRAPH_PROCESSOR_H_

#include <map>
#include <memory>

#include "base/trace_event/process_memory_dump.h"
#include "third_party/perfetto/include/perfetto/ext/trace_processor/importers/memory_tracker/graph.h"

namespace memory_instrumentation {

// ChromeGraphProcessor is a wrapper for a GraphProcessor from Perfetto. This
// class takes care of all required input and output parameter conversions and
// could be used as a replacement for GraphProcessor class from Chromium.
//
// Example usage:
// {
//   std::map<base::ProcessId, uint64_t> shared_footprints;
//   std::unique_ptr<GlobalDumpGraph> global_graph =
//       ChromeGraphProcessor::CreateMemoryGraph(
//           &shared_footprints,
//           pid_to_pmd ChromeGraphProcessor::Operation::kAllOperations);
// }

GlobalNodeGraph;

class ChromeGraphProcessor {};

}  // namespace memory_instrumentation

#endif  // SERVICES_RESOURCE_COORDINATOR_MEMORY_INSTRUMENTATION_CHROME_GRAPH_PROCESSOR_H_