blob: 18e1117ae220195b6a05ded409a0f817589c1f42 [file] [log] [blame]
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <vector>
#include "base/memory/ref_counted.h"
#include "chrome/common/profiling/memlog_stream.h"
#include "chrome/profiling/address.h"
namespace profiling {
// A log receiver is a sink for parsed allocation events. See also
// MemlogStreamReceiver which is for the unparsed data blocks.
class MemlogReceiver {
virtual ~MemlogReceiver() {}
virtual void OnHeader(const StreamHeader& header) = 0;
virtual void OnAlloc(const AllocPacket& alloc_packet,
std::vector<Address>&& stack,
std::string&& context) = 0;
virtual void OnFree(const FreePacket& free_packet) = 0;
virtual void OnBarrier(const BarrierPacket& barrier_packet) = 0;
virtual void OnStringMapping(const StringMappingPacket& string_mapping_packet,
const std::string& str) = 0;
virtual void OnComplete() = 0;
} // namespace profiling