tp: Fix naming in PerfettoSqlEngine

Change-Id: Id30f544e62c845963db4087028ba55f2e280e9f0
diff --git a/src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.cc b/src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.cc
index 2f163a0..b0e8544 100644
--- a/src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.cc
+++ b/src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.cc
@@ -322,7 +322,7 @@
   return ExecutionResult{std::move(*res), stats};
 }
 
-base::Status PerfettoSqlEngine::RegisterSqlFunction(
+base::Status PerfettoSqlEngine::RegisterRuntimeFunction(
     bool replace,
     const FunctionPrototype& prototype,
     std::string return_type_str,
@@ -348,7 +348,7 @@
     std::unique_ptr<CreatedFunction::Context> created_fn_ctx =
         CreatedFunction::MakeContext(this);
     ctx = created_fn_ctx.get();
-    RETURN_IF_ERROR(RegisterCppFunction<CreatedFunction>(
+    RETURN_IF_ERROR(RegisterStaticFunction<CreatedFunction>(
         prototype.function_name.c_str(), created_argc,
         std::move(created_fn_ctx)));
   }
@@ -487,7 +487,7 @@
     const PerfettoSqlParser& parser) {
   if (!cf.is_table) {
     RETURN_IF_ERROR(
-        RegisterSqlFunction(cf.replace, cf.prototype, cf.returns, cf.sql));
+        RegisterRuntimeFunction(cf.replace, cf.prototype, cf.returns, cf.sql));
     return RewriteToDummySql(parser.statement_sql());
   }
 
diff --git a/src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.h b/src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.h
index a57a588..993e9c1 100644
--- a/src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.h
+++ b/src/trace_processor/perfetto_sql/engine/perfetto_sql_engine.h
@@ -86,10 +86,10 @@
   // |determistic|: whether this function has deterministic output given the
   //                same set of arguments.
   template <typename Function = SqlFunction>
-  base::Status RegisterCppFunction(const char* name,
-                                   int argc,
-                                   typename Function::Context* ctx,
-                                   bool deterministic = true);
+  base::Status RegisterStaticFunction(const char* name,
+                                      int argc,
+                                      typename Function::Context* ctx,
+                                      bool deterministic = true);
 
   // Registers a trace processor C++ function to be runnable from SQL.
   //
@@ -98,7 +98,7 @@
   // this pointer instead of the essentially static requirement of the context
   // pointer above.
   template <typename Function>
-  base::Status RegisterCppFunction(
+  base::Status RegisterStaticFunction(
       const char* name,
       int argc,
       std::unique_ptr<typename Function::Context> ctx,
@@ -106,10 +106,10 @@
 
   // Registers a function with the prototype |prototype| which returns a value
   // of |return_type| and is implemented by executing the SQL statement |sql|.
-  base::Status RegisterSqlFunction(bool replace,
-                                   const FunctionPrototype& prototype,
-                                   std::string return_type,
-                                   SqlSource sql);
+  base::Status RegisterRuntimeFunction(bool replace,
+                                       const FunctionPrototype& prototype,
+                                       std::string return_type,
+                                       SqlSource sql);
 
   // Enables memoization for the given SQL function.
   base::Status EnableSqlFunctionMemoization(const std::string& name);
@@ -227,7 +227,7 @@
 }  // namespace perfetto_sql_internal
 
 template <typename Function>
-base::Status PerfettoSqlEngine::RegisterCppFunction(
+base::Status PerfettoSqlEngine::RegisterStaticFunction(
     const char* name,
     int argc,
     typename Function::Context* ctx,
@@ -238,7 +238,7 @@
 }
 
 template <typename Function>
-base::Status PerfettoSqlEngine::RegisterCppFunction(
+base::Status PerfettoSqlEngine::RegisterStaticFunction(
     const char* name,
     int argc,
     std::unique_ptr<typename Function::Context> user_data,
diff --git a/src/trace_processor/perfetto_sql/intrinsics/functions/create_function.cc b/src/trace_processor/perfetto_sql/intrinsics/functions/create_function.cc
index 2bada91..42a6a21 100644
--- a/src/trace_processor/perfetto_sql/intrinsics/functions/create_function.cc
+++ b/src/trace_processor/perfetto_sql/intrinsics/functions/create_function.cc
@@ -76,7 +76,7 @@
   FunctionPrototype prototype;
   RETURN_IF_ERROR(ParsePrototype(base::StringView(prototype_str), prototype));
 
-  return engine->RegisterSqlFunction(
+  return engine->RegisterRuntimeFunction(
       false, prototype, return_type_str,
       SqlSource::FromTraceProcessorImplementation(std::move(sql_defn_str)));
 }
diff --git a/src/trace_processor/perfetto_sql/intrinsics/functions/math.cc b/src/trace_processor/perfetto_sql/intrinsics/functions/math.cc
index f014fd9..1c3a20a 100644
--- a/src/trace_processor/perfetto_sql/intrinsics/functions/math.cc
+++ b/src/trace_processor/perfetto_sql/intrinsics/functions/math.cc
@@ -101,9 +101,9 @@
 }  // namespace
 
 base::Status RegisterMathFunctions(PerfettoSqlEngine& engine) {
-  RETURN_IF_ERROR(engine.RegisterCppFunction<Ln>("ln", 1, nullptr, true));
-  RETURN_IF_ERROR(engine.RegisterCppFunction<Exp>("exp", 1, nullptr, true));
-  return engine.RegisterCppFunction<Sqrt>("sqrt", 1, nullptr, true);
+  RETURN_IF_ERROR(engine.RegisterStaticFunction<Ln>("ln", 1, nullptr, true));
+  RETURN_IF_ERROR(engine.RegisterStaticFunction<Exp>("exp", 1, nullptr, true));
+  return engine.RegisterStaticFunction<Sqrt>("sqrt", 1, nullptr, true);
 }
 
 }  // namespace perfetto::trace_processor
diff --git a/src/trace_processor/perfetto_sql/intrinsics/functions/stack_functions.cc b/src/trace_processor/perfetto_sql/intrinsics/functions/stack_functions.cc
index c78e6c9..3fa7bd0 100644
--- a/src/trace_processor/perfetto_sql/intrinsics/functions/stack_functions.cc
+++ b/src/trace_processor/perfetto_sql/intrinsics/functions/stack_functions.cc
@@ -246,13 +246,13 @@
 
 base::Status RegisterStackFunctions(PerfettoSqlEngine* engine,
                                     TraceProcessorContext* context) {
-  RETURN_IF_ERROR(engine->RegisterCppFunction<CatStacksFunction>(
+  RETURN_IF_ERROR(engine->RegisterStaticFunction<CatStacksFunction>(
       CatStacksFunction::kFunctionName, -1, context->storage.get()));
   RETURN_IF_ERROR(
-      engine->RegisterCppFunction<StackFromStackProfileFrameFunction>(
+      engine->RegisterStaticFunction<StackFromStackProfileFrameFunction>(
           StackFromStackProfileFrameFunction::kFunctionName, 1,
           context->storage.get()));
-  return engine->RegisterCppFunction<StackFromStackProfileCallsiteFunction>(
+  return engine->RegisterStaticFunction<StackFromStackProfileCallsiteFunction>(
       StackFromStackProfileCallsiteFunction::kFunctionName, -1,
       context->storage.get());
 }
diff --git a/src/trace_processor/trace_processor_impl.cc b/src/trace_processor/trace_processor_impl.cc
index da31fc4..64fc209 100644
--- a/src/trace_processor/trace_processor_impl.cc
+++ b/src/trace_processor/trace_processor_impl.cc
@@ -115,7 +115,7 @@
                       int argc,
                       Ptr context = nullptr,
                       bool deterministic = true) {
-  auto status = engine->RegisterCppFunction<SqlFunction>(
+  auto status = engine->RegisterStaticFunction<SqlFunction>(
       name, argc, std::move(context), deterministic);
   if (!status.ok())
     PERFETTO_ELOG("%s", status.c_message());