chromium/third_party/perfetto/src/trace_processor/importers/perf/perf_session.cc

/*
 * Copyright (C) 2024 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/perf/perf_session.h"

#include <cinttypes>
#include <cstddef>
#include <cstdint>
#include <cstring>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/flat_hash_map.h"
#include "perfetto/ext/base/status_or.h"
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/string_view.h"
#include "perfetto/trace_processor/ref_counted.h"
#include "perfetto/trace_processor/trace_blob_view.h"
#include "src/trace_processor/importers/perf/perf_event.h"
#include "src/trace_processor/importers/perf/perf_event_attr.h"
#include "src/trace_processor/importers/perf/reader.h"
#include "src/trace_processor/storage/trace_storage.h"  // IWYU pragma: keep
#include "src/trace_processor/types/trace_processor_context.h"
#include "src/trace_processor/util/build_id.h"

namespace perfetto::trace_processor::perf_importer {
namespace {
bool OffsetsMatch(const PerfEventAttr& attr, const PerfEventAttr& other) {}
}  // namespace

base::StatusOr<RefPtr<PerfSession>> PerfSession::Builder::Build() {}

base::StatusOr<RefPtr<PerfEventAttr>> PerfSession::FindAttrForRecord(
    const perf_event_header& header,
    const TraceBlobView& payload) const {}

bool PerfSession::ReadEventId(const perf_event_header& header,
                              const TraceBlobView& payload,
                              uint64_t& id) const {}

RefPtr<PerfEventAttr> PerfSession::FindAttrForEventId(uint64_t id) const {}

void PerfSession::SetEventName(uint64_t event_id, std::string name) {}

void PerfSession::SetEventName(uint32_t type,
                               uint64_t config,
                               const std::string& name) {}

void PerfSession::AddBuildId(int32_t pid,
                             std::string filename,
                             BuildId build_id) {}

std::optional<BuildId> PerfSession::LookupBuildId(
    uint32_t pid,
    const std::string& filename) const {}

void PerfSession::SetCmdline(const std::vector<std::string>& args) {}

}  // namespace perfetto::trace_processor::perf_importer