chromium/third_party/perfetto/src/trace_processor/importers/ftrace/drm_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 "src/trace_processor/importers/ftrace/drm_tracker.h"
#include "perfetto/ext/base/string_utils.h"
#include "protos/perfetto/trace/ftrace/dma_fence.pbzero.h"
#include "protos/perfetto/trace/ftrace/drm.pbzero.h"
#include "protos/perfetto/trace/ftrace/ftrace_event.pbzero.h"
#include "protos/perfetto/trace/ftrace/gpu_scheduler.pbzero.h"
#include "src/trace_processor/importers/common/flow_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/common/track_tracker.h"

namespace perfetto {
namespace trace_processor {

namespace {

// There are meta-fences such as fence arrays or fence chains where a fence is
// a container of other fences.  These fences are on "unbound" timelines which
// are often dynamically created.  We want to ignore these timelines to avoid
// having tons of tracks for them.
constexpr char kUnboundFenceTimeline[] =;

}  // namespace

DrmTracker::DrmTracker(TraceProcessorContext* context)
    :{}

void DrmTracker::ParseDrm(int64_t timestamp,
                          uint32_t field_id,
                          uint32_t pid,
                          protozero::ConstBytes blob) {}

TrackId DrmTracker::InternVblankTrack(int32_t crtc) {}

void DrmTracker::DrmVblankEvent(int64_t timestamp,
                                int32_t crtc,
                                uint32_t seqno) {}

void DrmTracker::DrmVblankEventDelivered(int64_t timestamp,
                                         int32_t crtc,
                                         uint32_t seqno) {}

DrmTracker::SchedRing& DrmTracker::GetSchedRingByName(base::StringView name) {}

void DrmTracker::BeginSchedRingSlice(int64_t timestamp, SchedRing& ring) {}

void DrmTracker::DrmSchedJob(int64_t timestamp,
                             uint32_t pid,
                             base::StringView name,
                             uint64_t job_id) {}

void DrmTracker::DrmRunJob(int64_t timestamp,
                           base::StringView name,
                           uint64_t job_id,
                           uint64_t fence_id) {}

void DrmTracker::DrmSchedProcessJob(int64_t timestamp, uint64_t fence_id) {}

DrmTracker::FenceTimeline& DrmTracker::GetFenceTimelineByContext(
    uint32_t context,
    base::StringView name) {}

void DrmTracker::BeginFenceTimelineSlice(int64_t timestamp,
                                         const FenceTimeline& timeline) {}

void DrmTracker::DmaFenceInit(int64_t timestamp,
                              base::StringView name,
                              uint32_t context,
                              uint32_t seqno) {}

void DrmTracker::DmaFenceEmit(int64_t timestamp,
                              base::StringView name,
                              uint32_t context,
                              uint32_t seqno) {}

void DrmTracker::DmaFenceSignaled(int64_t timestamp,
                                  base::StringView name,
                                  uint32_t context,
                                  uint32_t seqno) {}

void DrmTracker::DmaFenceWaitStart(int64_t timestamp,
                                   uint32_t pid,
                                   uint32_t context,
                                   uint32_t seqno) {}

void DrmTracker::DmaFenceWaitEnd(int64_t timestamp, uint32_t pid) {}

}  // namespace trace_processor
}  // namespace perfetto