chromium/services/resource_coordinator/memory_instrumentation/memory_dump_map_converter.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_MEMORY_DUMP_MAP_CONVERTER_H_
#define SERVICES_RESOURCE_COORDINATOR_MEMORY_INSTRUMENTATION_MEMORY_DUMP_MAP_CONVERTER_H_

#include <map>
#include <memory>
#include <vector>

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

namespace memory_instrumentation {

// Converts the Chromium MemoryDumpMap to the corresponding defined in Perfetto
// type RawMemoryNodeMap.
//
// Example usage:
//
// {
//   base::trace_event::ProcessMemoryDump pmd;
//
//   MemoryDumpMapConverter converter;
//   perfetto::trace_processor::GraphProcessor::RawMemoryNodeMap
//       perfettoNodeMap = converter.Convert(pmd);
// }
class MemoryDumpMapConverter {};

}  // namespace memory_instrumentation

#endif  // SERVICES_RESOURCE_COORDINATOR_MEMORY_INSTRUMENTATION_MEMORY_DUMP_MAP_CONVERTER_H_