#include "services/tracing/public/cpp/perfetto/perfetto_producer.h"
#include "base/command_line.h"
#include "base/strings/string_number_conversions.h"
#include "components/tracing/common/tracing_switches.h"
#include "third_party/perfetto/include/perfetto/ext/tracing/core/shared_memory_arbiter.h"
#include "third_party/perfetto/include/perfetto/ext/tracing/core/trace_writer.h"
namespace tracing {
constexpr size_t PerfettoProducer::kSMBPageSizeBytes;
constexpr size_t PerfettoProducer::kDefaultSMBSizeBytes;
PerfettoProducer::PerfettoProducer(
base::tracing::PerfettoTaskRunner* task_runner)
: … { … }
PerfettoProducer::~PerfettoProducer() = default;
bool PerfettoProducer::SetupStartupTracing(
const base::trace_event::TraceConfig& trace_config,
bool privacy_filtering_enabled) { … }
void PerfettoProducer::OnThreadPoolAvailable() { … }
void PerfettoProducer::MaybeScheduleStartupTracingTimeout() { … }
void PerfettoProducer::OnStartupTracingTimeout() { … }
void PerfettoProducer::OnStartupTracingComplete() { … }
bool PerfettoProducer::IsStartupTracingActive() { … }
std::unique_ptr<perfetto::TraceWriter>
PerfettoProducer::CreateStartupTraceWriter(
uint16_t target_buffer_reservation_id) { … }
void PerfettoProducer::BindStartupTargetBuffer(
uint16_t target_buffer_reservation_id,
perfetto::BufferID startup_target_buffer) { … }
void PerfettoProducer::AbortStartupTracingForReservation(
uint16_t target_buffer_reservation_id) { … }
std::unique_ptr<perfetto::TraceWriter> PerfettoProducer::CreateTraceWriter(
perfetto::BufferID target_buffer,
perfetto::BufferExhaustedPolicy buffer_exhausted_policy) { … }
void PerfettoProducer::DeleteSoonForTesting(
std::unique_ptr<PerfettoProducer> perfetto_producer) { … }
void PerfettoProducer::ResetSequenceForTesting() { … }
base::tracing::PerfettoTaskRunner* PerfettoProducer::task_runner() { … }
size_t PerfettoProducer::GetPreferredSmbSizeBytes() { … }
}