chromium/v8/src/tracing/code-data-source.h

// Copyright 2024 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_TRACING_CODE_DATA_SOURCE_H_
#define V8_TRACING_CODE_DATA_SOURCE_H_

#include <cstdint>
#include <string>
#include <unordered_map>

#include "perfetto/protozero/scattered_heap_buffer.h"
#include "perfetto/tracing/data_source.h"
#include "protos/perfetto/config/chrome/v8_config.gen.h"
#include "protos/perfetto/trace/interned_data/interned_data.pbzero.h"
#include "src/base/functional.h"
#include "src/handles/handles.h"
#include "src/objects/function-kind.h"
#include "src/objects/tagged.h"
#include "src/tracing/perfetto-utils.h"

namespace v8 {
namespace internal {

class CodeDataSourceIncrementalState;
class Isolate;
class Script;
class SharedFunctionInfo;

struct CodeDataSourceTraits : public perfetto::DefaultDataSourceTraits {};

class CodeDataSource
    : public perfetto::DataSource<CodeDataSource, CodeDataSourceTraits> {};

class CodeDataSourceIncrementalState {};

}  // namespace internal
}  // namespace v8

PERFETTO_DECLARE_DATA_SOURCE_STATIC_MEMBERS();

#endif  // V8_TRACING_CODE_DATA_SOURCE_H_