#include "src/trace_processor/importers/fuchsia/fuchsia_trace_tokenizer.h"
#include <cinttypes>
#include <limits>
#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/string_view.h"
#include "perfetto/trace_processor/trace_blob.h"
#include "src/trace_processor/importers/common/cpu_tracker.h"
#include "src/trace_processor/importers/common/process_tracker.h"
#include "src/trace_processor/importers/common/slice_tracker.h"
#include "src/trace_processor/importers/fuchsia/fuchsia_record.h"
#include "src/trace_processor/importers/fuchsia/fuchsia_trace_parser.h"
#include "src/trace_processor/importers/proto/proto_trace_reader.h"
#include "src/trace_processor/sorter/trace_sorter.h"
#include "src/trace_processor/types/task_state.h"
#include "src/trace_processor/types/trace_processor_context.h"
namespace perfetto {
namespace trace_processor {
namespace {
ArgValue;
constexpr uint32_t kMetadata = …;
constexpr uint32_t kInitialization = …;
constexpr uint32_t kString = …;
constexpr uint32_t kThread = …;
constexpr uint32_t kEvent = …;
constexpr uint32_t kBlob = …;
constexpr uint32_t kKernelObject = …;
constexpr uint32_t kSchedulerEvent = …;
constexpr uint32_t kSchedulerEventLegacyContextSwitch = …;
constexpr uint32_t kSchedulerEventContextSwitch = …;
constexpr uint32_t kSchedulerEventThreadWakeup = …;
constexpr uint32_t kProviderInfo = …;
constexpr uint32_t kProviderSection = …;
constexpr uint32_t kProviderEvent = …;
constexpr uint32_t kThreadNew = …;
constexpr uint32_t kThreadRunning = …;
constexpr uint32_t kThreadSuspended = …;
constexpr uint32_t kThreadBlocked = …;
constexpr uint32_t kThreadDying = …;
constexpr uint32_t kThreadDead = …;
constexpr uint32_t kZxObjTypeProcess = …;
constexpr uint32_t kZxObjTypeThread = …;
constexpr int32_t kIdleWeight = …;
}
FuchsiaTraceTokenizer::FuchsiaTraceTokenizer(TraceProcessorContext* context)
: … { … }
FuchsiaTraceTokenizer::~FuchsiaTraceTokenizer() = default;
util::Status FuchsiaTraceTokenizer::Parse(TraceBlobView blob) { … }
StringId FuchsiaTraceTokenizer::IdForOutgoingThreadState(uint32_t state) { … }
void FuchsiaTraceTokenizer::SwitchFrom(Thread* thread,
int64_t ts,
uint32_t cpu,
uint32_t thread_state) { … }
void FuchsiaTraceTokenizer::SwitchTo(Thread* thread,
int64_t ts,
uint32_t cpu,
int32_t weight) { … }
void FuchsiaTraceTokenizer::Wake(Thread* thread, int64_t ts, uint32_t cpu) { … }
void FuchsiaTraceTokenizer::ParseRecord(TraceBlobView tbv) { … }
void FuchsiaTraceTokenizer::RegisterProvider(uint32_t provider_id,
std::string name) { … }
base::Status FuchsiaTraceTokenizer::NotifyEndOfFile() { … }
}
}