#include <cstdint>
#include <functional>
#include <memory>
#include "perfetto/ext/base/hash.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/protozero/field.h"
#include "src/trace_processor/importers/common/args_tracker.h"
#include "src/trace_processor/importers/common/async_track_set_tracker.h"
#include "src/trace_processor/importers/common/slice_tracker.h"
#include "src/trace_processor/importers/ftrace/virtio_video_tracker.h"
#include "protos/perfetto/trace/ftrace/ftrace_event.pbzero.h"
#include "protos/perfetto/trace/ftrace/virtio_video.pbzero.h"
#include "src/trace_processor/storage/trace_storage.h"
namespace perfetto {
namespace trace_processor {
namespace {
FtraceEvent;
VirtioVideoCmdDoneFtraceEvent;
VirtioVideoCmdFtraceEvent;
VirtioVideoResourceQueueDoneFtraceEvent;
VirtioVideoResourceQueueFtraceEvent;
ConstBytes;
TrackSetId;
constexpr uint64_t kVirtioVideoQueueTypeInput = …;
constexpr uint64_t kVirtioVideoQueueTypeOutput = …;
constexpr int64_t kVirtioVideoCmdDuration = …;
}
VirtioVideoTracker::VirtioVideoTracker(TraceProcessorContext* context)
: … { … }
VirtioVideoTracker::~VirtioVideoTracker() = default;
void VirtioVideoTracker::ParseVirtioVideoEvent(uint64_t fld_id,
int64_t timestamp,
const ConstBytes& blob) { … }
VirtioVideoTracker::FieldsStringIds::FieldsStringIds(TraceStorage& storage)
: … { … }
TrackSetId VirtioVideoTracker::InternOrCreateBufferTrack(int32_t stream_id,
uint32_t queue_type) { … }
void VirtioVideoTracker::AddCommandSlice(int64_t timestamp,
uint32_t stream_id,
uint64_t type,
bool response) { … }
void VirtioVideoTracker::AddCommandSliceArgs(
protos::pbzero::VirtioVideoResourceQueueDoneFtraceEvent::Decoder* pb_evt,
ArgsTracker::BoundInserter* args) { … }
}
}