#include "src/trace_processor/perfetto_sql/intrinsics/functions/pprof_functions.h"
#include <stdlib.h>
#include <cinttypes>
#include <cstddef>
#include <cstdint>
#include <limits>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/status_or.h"
#include "perfetto/ext/base/utils.h"
#include "perfetto/protozero/packed_repeated_fields.h"
#include "perfetto/trace_processor/basic_types.h"
#include "perfetto/trace_processor/status.h"
#include "protos/perfetto/trace_processor/stack.pbzero.h"
#include "src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
#include "src/trace_processor/types/trace_processor_context.h"
#include "src/trace_processor/util/profile_builder.h"
#include "src/trace_processor/util/status_macros.h"
namespace perfetto::trace_processor {
namespace {
Stack;
template <typename T>
std::unique_ptr<T> WrapUnique(T* ptr) { … }
class AggregateContext { … };
base::Status StepStatus(sqlite3_context* ctx,
size_t argc,
sqlite3_value** argv) { … }
struct ProfileBuilder { … };
}
base::Status PprofFunctions::Register(PerfettoSqlEngine& engine,
TraceProcessorContext* context) {
return engine.RegisterSqliteAggregateFunction<ProfileBuilder>(context);
}
}