chromium/third_party/perfetto/src/trace_processor/importers/ftrace/virtio_video_tracker.cc


/*
 * Copyright (C) 2022 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#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;

/* VIRTIO_VIDEO_QUEUE_TYPE_INPUT */
constexpr uint64_t kVirtioVideoQueueTypeInput =;

/* VIRTIO_VIDEO_QUEUE_TYPE_OUTPUT */
constexpr uint64_t kVirtioVideoQueueTypeOutput =;

constexpr int64_t kVirtioVideoCmdDuration =;
}  // namespace

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) {}

}  // namespace trace_processor
}  // namespace perfetto