tp: create prelude directory and move functions and operators
This CL creates the "prelude" directory for holding all the stuff which
is built into trace processor by default without needing to be imported.
Bug: 261195778
Change-Id: I79e8cfd02818512dd26a38c7a40d8896836fe5ab
diff --git a/Android.bp b/Android.bp
index 94246a2..18259c7 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1995,8 +1995,9 @@
":perfetto_src_trace_processor_lib",
":perfetto_src_trace_processor_metatrace",
":perfetto_src_trace_processor_metrics_metrics",
+ ":perfetto_src_trace_processor_prelude_functions_functions",
+ ":perfetto_src_trace_processor_prelude_operators_operators",
":perfetto_src_trace_processor_sorter_sorter",
- ":perfetto_src_trace_processor_sqlite_functions_functions",
":perfetto_src_trace_processor_sqlite_sqlite",
":perfetto_src_trace_processor_sqlite_sqlite_minimal",
":perfetto_src_trace_processor_storage_minimal",
@@ -9789,6 +9790,45 @@
],
}
+// GN: //src/trace_processor/prelude/functions:functions
+filegroup {
+ name: "perfetto_src_trace_processor_prelude_functions_functions",
+ srcs: [
+ "src/trace_processor/prelude/functions/create_function.cc",
+ "src/trace_processor/prelude/functions/create_function_internal.cc",
+ "src/trace_processor/prelude/functions/create_view_function.cc",
+ "src/trace_processor/prelude/functions/import.cc",
+ "src/trace_processor/prelude/functions/pprof_functions.cc",
+ "src/trace_processor/prelude/functions/register_function.cc",
+ "src/trace_processor/prelude/functions/sqlite3_str_split.cc",
+ ],
+}
+
+// GN: //src/trace_processor/prelude/functions:unittests
+filegroup {
+ name: "perfetto_src_trace_processor_prelude_functions_unittests",
+ srcs: [
+ "src/trace_processor/prelude/functions/sqlite3_str_split_unittest.cc",
+ ],
+}
+
+// GN: //src/trace_processor/prelude/operators:operators
+filegroup {
+ name: "perfetto_src_trace_processor_prelude_operators_operators",
+ srcs: [
+ "src/trace_processor/prelude/operators/span_join_operator.cc",
+ "src/trace_processor/prelude/operators/window_operator.cc",
+ ],
+}
+
+// GN: //src/trace_processor/prelude/operators:unittests
+filegroup {
+ name: "perfetto_src_trace_processor_prelude_operators_unittests",
+ srcs: [
+ "src/trace_processor/prelude/operators/span_join_operator_unittest.cc",
+ ],
+}
+
// GN: //src/trace_processor/rpc:httpd
filegroup {
name: "perfetto_src_trace_processor_rpc_httpd",
@@ -9831,39 +9871,15 @@
],
}
-// GN: //src/trace_processor/sqlite/functions:functions
-filegroup {
- name: "perfetto_src_trace_processor_sqlite_functions_functions",
- srcs: [
- "src/trace_processor/sqlite/functions/create_function.cc",
- "src/trace_processor/sqlite/functions/create_function_internal.cc",
- "src/trace_processor/sqlite/functions/create_view_function.cc",
- "src/trace_processor/sqlite/functions/import.cc",
- "src/trace_processor/sqlite/functions/pprof_functions.cc",
- "src/trace_processor/sqlite/functions/register_function.cc",
- "src/trace_processor/sqlite/functions/sqlite3_str_split.cc",
- ],
-}
-
-// GN: //src/trace_processor/sqlite/functions:unittests
-filegroup {
- name: "perfetto_src_trace_processor_sqlite_functions_unittests",
- srcs: [
- "src/trace_processor/sqlite/functions/sqlite3_str_split_unittest.cc",
- ],
-}
-
// GN: //src/trace_processor/sqlite:sqlite
filegroup {
name: "perfetto_src_trace_processor_sqlite_sqlite",
srcs: [
"src/trace_processor/sqlite/db_sqlite_table.cc",
- "src/trace_processor/sqlite/span_join_operator_table.cc",
"src/trace_processor/sqlite/sql_stats_table.cc",
"src/trace_processor/sqlite/sqlite_raw_table.cc",
"src/trace_processor/sqlite/sqlite_utils.cc",
"src/trace_processor/sqlite/stats_table.cc",
- "src/trace_processor/sqlite/window_operator_table.cc",
],
}
@@ -9882,7 +9898,6 @@
srcs: [
"src/trace_processor/sqlite/db_sqlite_table_unittest.cc",
"src/trace_processor/sqlite/query_constraints_unittest.cc",
- "src/trace_processor/sqlite/span_join_operator_table_unittest.cc",
"src/trace_processor/sqlite/sqlite_utils_unittest.cc",
],
}
@@ -11441,12 +11456,14 @@
":perfetto_src_trace_processor_metatrace",
":perfetto_src_trace_processor_metrics_metrics",
":perfetto_src_trace_processor_metrics_unittests",
+ ":perfetto_src_trace_processor_prelude_functions_functions",
+ ":perfetto_src_trace_processor_prelude_functions_unittests",
+ ":perfetto_src_trace_processor_prelude_operators_operators",
+ ":perfetto_src_trace_processor_prelude_operators_unittests",
":perfetto_src_trace_processor_rpc_rpc",
":perfetto_src_trace_processor_rpc_unittests",
":perfetto_src_trace_processor_sorter_sorter",
":perfetto_src_trace_processor_sorter_unittests",
- ":perfetto_src_trace_processor_sqlite_functions_functions",
- ":perfetto_src_trace_processor_sqlite_functions_unittests",
":perfetto_src_trace_processor_sqlite_sqlite",
":perfetto_src_trace_processor_sqlite_sqlite_minimal",
":perfetto_src_trace_processor_sqlite_unittests",
@@ -12100,10 +12117,11 @@
":perfetto_src_trace_processor_lib",
":perfetto_src_trace_processor_metatrace",
":perfetto_src_trace_processor_metrics_metrics",
+ ":perfetto_src_trace_processor_prelude_functions_functions",
+ ":perfetto_src_trace_processor_prelude_operators_operators",
":perfetto_src_trace_processor_rpc_httpd",
":perfetto_src_trace_processor_rpc_rpc",
":perfetto_src_trace_processor_sorter_sorter",
- ":perfetto_src_trace_processor_sqlite_functions_functions",
":perfetto_src_trace_processor_sqlite_sqlite",
":perfetto_src_trace_processor_sqlite_sqlite_minimal",
":perfetto_src_trace_processor_storage_minimal",
@@ -12311,8 +12329,9 @@
":perfetto_src_trace_processor_lib",
":perfetto_src_trace_processor_metatrace",
":perfetto_src_trace_processor_metrics_metrics",
+ ":perfetto_src_trace_processor_prelude_functions_functions",
+ ":perfetto_src_trace_processor_prelude_operators_operators",
":perfetto_src_trace_processor_sorter_sorter",
- ":perfetto_src_trace_processor_sqlite_functions_functions",
":perfetto_src_trace_processor_sqlite_sqlite",
":perfetto_src_trace_processor_sqlite_sqlite_minimal",
":perfetto_src_trace_processor_storage_minimal",
diff --git a/BUILD b/BUILD
index 7a3a3b7..881a337 100644
--- a/BUILD
+++ b/BUILD
@@ -1734,6 +1734,40 @@
],
)
+# GN target: //src/trace_processor/prelude/functions:functions
+perfetto_filegroup(
+ name = "src_trace_processor_prelude_functions_functions",
+ srcs = [
+ "src/trace_processor/prelude/functions/create_function.cc",
+ "src/trace_processor/prelude/functions/create_function.h",
+ "src/trace_processor/prelude/functions/create_function_internal.cc",
+ "src/trace_processor/prelude/functions/create_function_internal.h",
+ "src/trace_processor/prelude/functions/create_view_function.cc",
+ "src/trace_processor/prelude/functions/create_view_function.h",
+ "src/trace_processor/prelude/functions/import.cc",
+ "src/trace_processor/prelude/functions/import.h",
+ "src/trace_processor/prelude/functions/pprof_functions.cc",
+ "src/trace_processor/prelude/functions/pprof_functions.h",
+ "src/trace_processor/prelude/functions/register_function.cc",
+ "src/trace_processor/prelude/functions/register_function.h",
+ "src/trace_processor/prelude/functions/sqlite3_str_split.cc",
+ "src/trace_processor/prelude/functions/sqlite3_str_split.h",
+ "src/trace_processor/prelude/functions/utils.h",
+ "src/trace_processor/prelude/functions/window_functions.h",
+ ],
+)
+
+# GN target: //src/trace_processor/prelude/operators:operators
+perfetto_filegroup(
+ name = "src_trace_processor_prelude_operators_operators",
+ srcs = [
+ "src/trace_processor/prelude/operators/span_join_operator.cc",
+ "src/trace_processor/prelude/operators/span_join_operator.h",
+ "src/trace_processor/prelude/operators/window_operator.cc",
+ "src/trace_processor/prelude/operators/window_operator.h",
+ ],
+)
+
# GN target: //src/trace_processor/rpc:httpd
perfetto_filegroup(
name = "src_trace_processor_rpc_httpd",
@@ -1765,29 +1799,6 @@
],
)
-# GN target: //src/trace_processor/sqlite/functions:functions
-perfetto_filegroup(
- name = "src_trace_processor_sqlite_functions_functions",
- srcs = [
- "src/trace_processor/sqlite/functions/create_function.cc",
- "src/trace_processor/sqlite/functions/create_function.h",
- "src/trace_processor/sqlite/functions/create_function_internal.cc",
- "src/trace_processor/sqlite/functions/create_function_internal.h",
- "src/trace_processor/sqlite/functions/create_view_function.cc",
- "src/trace_processor/sqlite/functions/create_view_function.h",
- "src/trace_processor/sqlite/functions/import.cc",
- "src/trace_processor/sqlite/functions/import.h",
- "src/trace_processor/sqlite/functions/pprof_functions.cc",
- "src/trace_processor/sqlite/functions/pprof_functions.h",
- "src/trace_processor/sqlite/functions/register_function.cc",
- "src/trace_processor/sqlite/functions/register_function.h",
- "src/trace_processor/sqlite/functions/sqlite3_str_split.cc",
- "src/trace_processor/sqlite/functions/sqlite3_str_split.h",
- "src/trace_processor/sqlite/functions/utils.h",
- "src/trace_processor/sqlite/functions/window_functions.h",
- ],
-)
-
# GN target: //src/trace_processor/sqlite:sqlite
perfetto_filegroup(
name = "src_trace_processor_sqlite_sqlite",
@@ -1795,8 +1806,6 @@
"src/trace_processor/sqlite/db_sqlite_table.cc",
"src/trace_processor/sqlite/db_sqlite_table.h",
"src/trace_processor/sqlite/query_cache.h",
- "src/trace_processor/sqlite/span_join_operator_table.cc",
- "src/trace_processor/sqlite/span_join_operator_table.h",
"src/trace_processor/sqlite/sql_stats_table.cc",
"src/trace_processor/sqlite/sql_stats_table.h",
"src/trace_processor/sqlite/sqlite_raw_table.cc",
@@ -1805,8 +1814,6 @@
"src/trace_processor/sqlite/sqlite_utils.h",
"src/trace_processor/sqlite/stats_table.cc",
"src/trace_processor/sqlite/stats_table.h",
- "src/trace_processor/sqlite/window_operator_table.cc",
- "src/trace_processor/sqlite/window_operator_table.h",
],
)
@@ -4525,8 +4532,9 @@
":src_trace_processor_lib",
":src_trace_processor_metatrace",
":src_trace_processor_metrics_metrics",
+ ":src_trace_processor_prelude_functions_functions",
+ ":src_trace_processor_prelude_operators_operators",
":src_trace_processor_sorter_sorter",
- ":src_trace_processor_sqlite_functions_functions",
":src_trace_processor_sqlite_sqlite",
":src_trace_processor_sqlite_sqlite_minimal",
":src_trace_processor_storage_minimal",
@@ -4672,10 +4680,11 @@
":src_trace_processor_lib",
":src_trace_processor_metatrace",
":src_trace_processor_metrics_metrics",
+ ":src_trace_processor_prelude_functions_functions",
+ ":src_trace_processor_prelude_operators_operators",
":src_trace_processor_rpc_httpd",
":src_trace_processor_rpc_rpc",
":src_trace_processor_sorter_sorter",
- ":src_trace_processor_sqlite_functions_functions",
":src_trace_processor_sqlite_sqlite",
":src_trace_processor_sqlite_sqlite_minimal",
":src_trace_processor_storage_minimal",
@@ -4878,8 +4887,9 @@
":src_trace_processor_lib",
":src_trace_processor_metatrace",
":src_trace_processor_metrics_metrics",
+ ":src_trace_processor_prelude_functions_functions",
+ ":src_trace_processor_prelude_operators_operators",
":src_trace_processor_sorter_sorter",
- ":src_trace_processor_sqlite_functions_functions",
":src_trace_processor_sqlite_sqlite",
":src_trace_processor_sqlite_sqlite_minimal",
":src_trace_processor_storage_minimal",
diff --git a/src/trace_processor/BUILD.gn b/src/trace_processor/BUILD.gn
index 0ff508d..02c11ed 100644
--- a/src/trace_processor/BUILD.gn
+++ b/src/trace_processor/BUILD.gn
@@ -170,8 +170,9 @@
"importers/proto:minimal",
"importers/systrace:full",
"metrics",
+ "prelude/functions",
+ "prelude/operators",
"sqlite",
- "sqlite/functions",
"stdlib:gen_amalgamated_stdlib",
"storage",
"tables",
@@ -274,10 +275,8 @@
"importers/systrace:unittests",
"rpc:unittests",
"sorter:unittests",
- "sqlite/functions:unittests",
"tables:unittests",
"types:unittests",
- "util:descriptors",
"util:unittests",
"views:unittests",
]
@@ -287,6 +286,8 @@
if (enable_perfetto_trace_processor_sqlite) {
deps += [
"dynamic:unittests",
+ "prelude/functions:unittests",
+ "prelude/operators:unittests",
"sqlite:unittests",
]
}
diff --git a/src/trace_processor/dynamic/BUILD.gn b/src/trace_processor/dynamic/BUILD.gn
index 869b044..e564f4f 100644
--- a/src/trace_processor/dynamic/BUILD.gn
+++ b/src/trace_processor/dynamic/BUILD.gn
@@ -12,6 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import("../../../gn/perfetto.gni")
+
+assert(enable_perfetto_trace_processor_sqlite)
+
source_set("dynamic") {
sources = [
"ancestor_generator.cc",
diff --git a/src/trace_processor/metrics/BUILD.gn b/src/trace_processor/metrics/BUILD.gn
index 110116d..8ac796e 100644
--- a/src/trace_processor/metrics/BUILD.gn
+++ b/src/trace_processor/metrics/BUILD.gn
@@ -42,8 +42,8 @@
"../../../protos/perfetto/trace_processor:metrics_impl_zero",
"../../base",
"../../protozero:protozero",
+ "../prelude/functions",
"../sqlite",
- "../sqlite/functions",
]
public_deps = [
":gen_cc_all_chrome_metrics_descriptor",
diff --git a/src/trace_processor/metrics/metrics.h b/src/trace_processor/metrics/metrics.h
index 9e3d517..72a10f2 100644
--- a/src/trace_processor/metrics/metrics.h
+++ b/src/trace_processor/metrics/metrics.h
@@ -27,7 +27,7 @@
#include "perfetto/protozero/message.h"
#include "perfetto/protozero/scattered_heap_buffer.h"
#include "perfetto/trace_processor/trace_processor.h"
-#include "src/trace_processor/sqlite/functions/register_function.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
#include "src/trace_processor/util/descriptors.h"
#include "protos/perfetto/trace_processor/metrics_impl.pbzero.h"
diff --git a/src/trace_processor/prelude/functions/BUILD.gn b/src/trace_processor/prelude/functions/BUILD.gn
new file mode 100644
index 0000000..069c996
--- /dev/null
+++ b/src/trace_processor/prelude/functions/BUILD.gn
@@ -0,0 +1,73 @@
+# 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.
+
+import("../../../../gn/test.gni")
+
+assert(enable_perfetto_trace_processor_sqlite)
+
+source_set("functions") {
+ sources = [
+ "create_function.cc",
+ "create_function.h",
+ "create_function_internal.cc",
+ "create_function_internal.h",
+ "create_view_function.cc",
+ "create_view_function.h",
+ "import.cc",
+ "import.h",
+ "pprof_functions.cc",
+ "pprof_functions.h",
+ "register_function.cc",
+ "register_function.h",
+ "sqlite3_str_split.cc",
+ "sqlite3_str_split.h",
+ "utils.h",
+ "window_functions.h",
+ ]
+ deps = [
+ "../..:demangle",
+ "../..:export_json",
+ "../..:metatrace",
+ "../../../../gn:default_deps",
+ "../../../../gn:sqlite",
+ "../../../../protos/perfetto/common:zero",
+ "../../../../protos/perfetto/trace/ftrace:zero",
+ "../../../base",
+ "../../containers",
+ "../../db",
+ "../../dynamic",
+ "../../importers/common",
+ "../../importers/ftrace:ftrace_descriptors",
+ "../../sqlite:sqlite_minimal",
+ "../../storage",
+ "../../types",
+ "../../util",
+ "../../util:profile_builder",
+ "../../util:sql_argument",
+ "../../util:stdlib",
+ ]
+}
+
+perfetto_unittest_source_set("unittests") {
+ testonly = true
+ sources = [ "sqlite3_str_split_unittest.cc" ]
+ deps = [
+ ":functions",
+ "../../../../gn:default_deps",
+ "../../../../gn:gtest_and_gmock",
+ "../../../../gn:sqlite",
+ "../../../base",
+ "../../sqlite:sqlite_minimal",
+ ]
+}
diff --git a/src/trace_processor/sqlite/functions/create_function.cc b/src/trace_processor/prelude/functions/create_function.cc
similarity index 98%
rename from src/trace_processor/sqlite/functions/create_function.cc
rename to src/trace_processor/prelude/functions/create_function.cc
index 594a639..ee2e733 100644
--- a/src/trace_processor/sqlite/functions/create_function.cc
+++ b/src/trace_processor/prelude/functions/create_function.cc
@@ -14,11 +14,11 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/functions/create_function.h"
+#include "src/trace_processor/prelude/functions/create_function.h"
#include "perfetto/base/status.h"
#include "perfetto/trace_processor/basic_types.h"
-#include "src/trace_processor/sqlite/functions/create_function_internal.h"
+#include "src/trace_processor/prelude/functions/create_function_internal.h"
#include "src/trace_processor/sqlite/scoped_db.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
#include "src/trace_processor/tp_metatrace.h"
diff --git a/src/trace_processor/sqlite/functions/create_function.h b/src/trace_processor/prelude/functions/create_function.h
similarity index 87%
rename from src/trace_processor/sqlite/functions/create_function.h
rename to src/trace_processor/prelude/functions/create_function.h
index f6985b4..258c4bb 100644
--- a/src/trace_processor/sqlite/functions/create_function.h
+++ b/src/trace_processor/prelude/functions/create_function.h
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_FUNCTION_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_FUNCTION_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_FUNCTION_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_FUNCTION_H_
#include <sqlite3.h>
#include <unordered_map>
-#include "src/trace_processor/sqlite/functions/register_function.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
namespace perfetto {
namespace trace_processor {
@@ -66,4 +66,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_FUNCTION_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_FUNCTION_H_
diff --git a/src/trace_processor/sqlite/functions/create_function_internal.cc b/src/trace_processor/prelude/functions/create_function_internal.cc
similarity index 97%
rename from src/trace_processor/sqlite/functions/create_function_internal.cc
rename to src/trace_processor/prelude/functions/create_function_internal.cc
index e7c8c2d..730d89a 100644
--- a/src/trace_processor/sqlite/functions/create_function_internal.cc
+++ b/src/trace_processor/prelude/functions/create_function_internal.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/functions/create_function_internal.h"
+#include "src/trace_processor/prelude/functions/create_function_internal.h"
#include "perfetto/base/status.h"
#include "perfetto/ext/base/string_view.h"
diff --git a/src/trace_processor/sqlite/functions/create_function_internal.h b/src/trace_processor/prelude/functions/create_function_internal.h
similarity index 89%
rename from src/trace_processor/sqlite/functions/create_function_internal.h
rename to src/trace_processor/prelude/functions/create_function_internal.h
index caabd08..83c0723 100644
--- a/src/trace_processor/sqlite/functions/create_function_internal.h
+++ b/src/trace_processor/prelude/functions/create_function_internal.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_FUNCTION_INTERNAL_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_FUNCTION_INTERNAL_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_FUNCTION_INTERNAL_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_FUNCTION_INTERNAL_H_
#include <sqlite3.h>
#include <string>
@@ -56,4 +56,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_FUNCTION_INTERNAL_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_FUNCTION_INTERNAL_H_
diff --git a/src/trace_processor/sqlite/functions/create_view_function.cc b/src/trace_processor/prelude/functions/create_view_function.cc
similarity index 98%
rename from src/trace_processor/sqlite/functions/create_view_function.cc
rename to src/trace_processor/prelude/functions/create_view_function.cc
index 9a1df24..e93e8c7 100644
--- a/src/trace_processor/sqlite/functions/create_view_function.cc
+++ b/src/trace_processor/prelude/functions/create_view_function.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/functions/create_view_function.h"
+#include "src/trace_processor/prelude/functions/create_view_function.h"
#include <numeric>
@@ -22,7 +22,7 @@
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/string_view.h"
#include "perfetto/trace_processor/basic_types.h"
-#include "src/trace_processor/sqlite/functions/create_function_internal.h"
+#include "src/trace_processor/prelude/functions/create_function_internal.h"
#include "src/trace_processor/sqlite/scoped_db.h"
#include "src/trace_processor/sqlite/sqlite_table.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
@@ -256,7 +256,8 @@
size_t seen_argument_constraints = 0;
for (size_t i = 0; i < qc.constraints().size(); ++i) {
const auto& cs = qc.constraints()[i];
- seen_argument_constraints += IsArgumentColumn(static_cast<size_t>(cs.column));
+ seen_argument_constraints +=
+ IsArgumentColumn(static_cast<size_t>(cs.column));
}
if (seen_argument_constraints < prototype_.arguments.size())
return SQLITE_CONSTRAINT;
@@ -293,8 +294,8 @@
for (size_t i = 0; i < qc.constraints().size(); ++i) {
const auto& cs = qc.constraints()[i];
- // Only consider argument columns (i.e. input parameters) as we're delegating
- // the rest to SQLite.
+ // Only consider argument columns (i.e. input parameters) as we're
+ // delegating the rest to SQLite.
if (!table_->IsArgumentColumn(static_cast<size_t>(cs.column)))
continue;
diff --git a/src/trace_processor/sqlite/functions/create_view_function.h b/src/trace_processor/prelude/functions/create_view_function.h
similarity index 82%
rename from src/trace_processor/sqlite/functions/create_view_function.h
rename to src/trace_processor/prelude/functions/create_view_function.h
index 7b8cff6..c91817a 100644
--- a/src/trace_processor/sqlite/functions/create_view_function.h
+++ b/src/trace_processor/prelude/functions/create_view_function.h
@@ -14,13 +14,13 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_VIEW_FUNCTION_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_VIEW_FUNCTION_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_VIEW_FUNCTION_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_VIEW_FUNCTION_H_
#include <sqlite3.h>
#include <unordered_map>
-#include "src/trace_processor/sqlite/functions/register_function.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
namespace perfetto {
namespace trace_processor {
@@ -47,4 +47,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_CREATE_VIEW_FUNCTION_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_CREATE_VIEW_FUNCTION_H_
diff --git a/src/trace_processor/sqlite/functions/import.cc b/src/trace_processor/prelude/functions/import.cc
similarity index 95%
rename from src/trace_processor/sqlite/functions/import.cc
rename to src/trace_processor/prelude/functions/import.cc
index edb781a..7657969 100644
--- a/src/trace_processor/sqlite/functions/import.cc
+++ b/src/trace_processor/prelude/functions/import.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/functions/import.h"
+#include "src/trace_processor/prelude/functions/import.h"
#include <numeric>
@@ -22,7 +22,7 @@
#include "perfetto/ext/base/string_utils.h"
#include "perfetto/ext/base/string_view.h"
#include "perfetto/trace_processor/basic_types.h"
-#include "src/trace_processor/sqlite/functions/create_function_internal.h"
+#include "src/trace_processor/prelude/functions/create_function_internal.h"
#include "src/trace_processor/sqlite/scoped_db.h"
#include "src/trace_processor/sqlite/sqlite_table.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
diff --git a/src/trace_processor/sqlite/functions/import.h b/src/trace_processor/prelude/functions/import.h
similarity index 85%
rename from src/trace_processor/sqlite/functions/import.h
rename to src/trace_processor/prelude/functions/import.h
index a3b44e6..9773b5f 100644
--- a/src/trace_processor/sqlite/functions/import.h
+++ b/src/trace_processor/prelude/functions/import.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_IMPORT_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_IMPORT_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_IMPORT_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_IMPORT_H_
#include <sqlite3.h>
#include <string>
@@ -23,7 +23,7 @@
#include "perfetto/ext/base/flat_hash_map.h"
#include "perfetto/trace_processor/trace_processor.h"
-#include "src/trace_processor/sqlite/functions/register_function.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
#include "src/trace_processor/util/sql_modules.h"
namespace perfetto {
@@ -48,4 +48,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_IMPORT_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_IMPORT_H_
diff --git a/src/trace_processor/sqlite/functions/pprof_functions.cc b/src/trace_processor/prelude/functions/pprof_functions.cc
similarity index 99%
rename from src/trace_processor/sqlite/functions/pprof_functions.cc
rename to src/trace_processor/prelude/functions/pprof_functions.cc
index f2d7744..e0e595d 100644
--- a/src/trace_processor/sqlite/functions/pprof_functions.cc
+++ b/src/trace_processor/prelude/functions/pprof_functions.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/functions/pprof_functions.h"
+#include "src/trace_processor/prelude/functions/pprof_functions.h"
#include "perfetto/base/logging.h"
#include "perfetto/base/status.h"
diff --git a/src/trace_processor/sqlite/functions/pprof_functions.h b/src/trace_processor/prelude/functions/pprof_functions.h
similarity index 82%
rename from src/trace_processor/sqlite/functions/pprof_functions.h
rename to src/trace_processor/prelude/functions/pprof_functions.h
index b6ed3a1..f088970 100644
--- a/src/trace_processor/sqlite/functions/pprof_functions.h
+++ b/src/trace_processor/prelude/functions/pprof_functions.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_PPROF_FUNCTIONS_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_PPROF_FUNCTIONS_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_PPROF_FUNCTIONS_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_PPROF_FUNCTIONS_H_
#include <sqlite3.h>
@@ -33,4 +33,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_PPROF_FUNCTIONS_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_PPROF_FUNCTIONS_H_
diff --git a/src/trace_processor/sqlite/functions/register_function.cc b/src/trace_processor/prelude/functions/register_function.cc
similarity index 92%
rename from src/trace_processor/sqlite/functions/register_function.cc
rename to src/trace_processor/prelude/functions/register_function.cc
index 39ba589..ef41f1d 100644
--- a/src/trace_processor/sqlite/functions/register_function.cc
+++ b/src/trace_processor/prelude/functions/register_function.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/functions/register_function.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
#include "sqlite3.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
diff --git a/src/trace_processor/sqlite/functions/register_function.h b/src/trace_processor/prelude/functions/register_function.h
similarity index 97%
rename from src/trace_processor/sqlite/functions/register_function.h
rename to src/trace_processor/prelude/functions/register_function.h
index 3d954b7..acca3e6 100644
--- a/src/trace_processor/sqlite/functions/register_function.h
+++ b/src/trace_processor/prelude/functions/register_function.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_REGISTER_FUNCTION_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_REGISTER_FUNCTION_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_REGISTER_FUNCTION_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_REGISTER_FUNCTION_H_
#include <sqlite3.h>
#include <memory>
@@ -230,4 +230,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_REGISTER_FUNCTION_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_REGISTER_FUNCTION_H_
diff --git a/src/trace_processor/sqlite/functions/sqlite3_str_split.cc b/src/trace_processor/prelude/functions/sqlite3_str_split.cc
similarity index 97%
rename from src/trace_processor/sqlite/functions/sqlite3_str_split.cc
rename to src/trace_processor/prelude/functions/sqlite3_str_split.cc
index a0b9cf4..57508f3 100644
--- a/src/trace_processor/sqlite/functions/sqlite3_str_split.cc
+++ b/src/trace_processor/prelude/functions/sqlite3_str_split.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/functions/sqlite3_str_split.h"
+#include "src/trace_processor/prelude/functions/sqlite3_str_split.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
diff --git a/src/trace_processor/sqlite/functions/sqlite3_str_split.h b/src/trace_processor/prelude/functions/sqlite3_str_split.h
similarity index 79%
rename from src/trace_processor/sqlite/functions/sqlite3_str_split.h
rename to src/trace_processor/prelude/functions/sqlite3_str_split.h
index 9bf411d..e6a6783 100644
--- a/src/trace_processor/sqlite/functions/sqlite3_str_split.h
+++ b/src/trace_processor/prelude/functions/sqlite3_str_split.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_SQLITE3_STR_SPLIT_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_SQLITE3_STR_SPLIT_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_SQLITE3_STR_SPLIT_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_SQLITE3_STR_SPLIT_H_
struct sqlite3;
@@ -27,4 +27,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_SQLITE3_STR_SPLIT_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_SQLITE3_STR_SPLIT_H_
diff --git a/src/trace_processor/sqlite/functions/sqlite3_str_split_unittest.cc b/src/trace_processor/prelude/functions/sqlite3_str_split_unittest.cc
similarity index 97%
rename from src/trace_processor/sqlite/functions/sqlite3_str_split_unittest.cc
rename to src/trace_processor/prelude/functions/sqlite3_str_split_unittest.cc
index a858e2e..f5f6b15 100644
--- a/src/trace_processor/sqlite/functions/sqlite3_str_split_unittest.cc
+++ b/src/trace_processor/prelude/functions/sqlite3_str_split_unittest.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/functions/sqlite3_str_split.h"
+#include "src/trace_processor/prelude/functions/sqlite3_str_split.h"
#include <sqlite3.h>
#include <string>
diff --git a/src/trace_processor/sqlite/functions/utils.h b/src/trace_processor/prelude/functions/utils.h
similarity index 97%
rename from src/trace_processor/sqlite/functions/utils.h
rename to src/trace_processor/prelude/functions/utils.h
index a8ce2c0..2fa4189 100644
--- a/src/trace_processor/sqlite/functions/utils.h
+++ b/src/trace_processor/prelude/functions/utils.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_UTILS_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_UTILS_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_UTILS_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_UTILS_H_
#include <sqlite3.h>
#include <unordered_map>
@@ -25,10 +25,10 @@
#include "protos/perfetto/common/builtin_clock.pbzero.h"
#include "src/trace_processor/export_json.h"
#include "src/trace_processor/importers/common/clock_tracker.h"
-#include "src/trace_processor/sqlite/functions/create_function_internal.h"
+#include "src/trace_processor/prelude/functions/create_function_internal.h"
#include "src/trace_processor/util/status_macros.h"
-#include "src/trace_processor/sqlite/functions/register_function.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
namespace perfetto {
namespace trace_processor {
@@ -405,4 +405,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_UTILS_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_UTILS_H_
diff --git a/src/trace_processor/sqlite/functions/window_functions.h b/src/trace_processor/prelude/functions/window_functions.h
similarity index 93%
rename from src/trace_processor/sqlite/functions/window_functions.h
rename to src/trace_processor/prelude/functions/window_functions.h
index 68f486f..3a76fce 100644
--- a/src/trace_processor/sqlite/functions/window_functions.h
+++ b/src/trace_processor/prelude/functions/window_functions.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_WINDOW_FUNCTIONS_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_WINDOW_FUNCTIONS_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_WINDOW_FUNCTIONS_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_WINDOW_FUNCTIONS_H_
#include <sqlite3.h>
#include <unordered_map>
@@ -25,10 +25,10 @@
#include "protos/perfetto/common/builtin_clock.pbzero.h"
#include "src/trace_processor/export_json.h"
#include "src/trace_processor/importers/common/clock_tracker.h"
-#include "src/trace_processor/sqlite/functions/create_function_internal.h"
+#include "src/trace_processor/prelude/functions/create_function_internal.h"
#include "src/trace_processor/util/status_macros.h"
-#include "src/trace_processor/sqlite/functions/register_function.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
namespace perfetto {
namespace trace_processor {
@@ -153,4 +153,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_FUNCTIONS_WINDOW_FUNCTIONS_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_FUNCTIONS_WINDOW_FUNCTIONS_H_
diff --git a/src/trace_processor/prelude/operators/BUILD.gn b/src/trace_processor/prelude/operators/BUILD.gn
new file mode 100644
index 0000000..2a3daa6
--- /dev/null
+++ b/src/trace_processor/prelude/operators/BUILD.gn
@@ -0,0 +1,46 @@
+# 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.
+
+import("../../../../gn/test.gni")
+
+assert(enable_perfetto_trace_processor_sqlite)
+
+source_set("operators") {
+ sources = [
+ "span_join_operator.cc",
+ "span_join_operator.h",
+ "window_operator.cc",
+ "window_operator.h",
+ ]
+ deps = [
+ "../..:metatrace",
+ "../../../../gn:default_deps",
+ "../../../../gn:sqlite",
+ "../../../../include/perfetto/trace_processor",
+ "../../../base",
+ "../../sqlite",
+ "../../util",
+ ]
+}
+
+perfetto_unittest_source_set("unittests") {
+ testonly = true
+ sources = [ "span_join_operator_unittest.cc" ]
+ deps = [
+ ":operators",
+ "../../../../gn:default_deps",
+ "../../../../gn:gtest_and_gmock",
+ "../../../../gn:sqlite",
+ ]
+}
diff --git a/src/trace_processor/sqlite/span_join_operator_table.cc b/src/trace_processor/prelude/operators/span_join_operator.cc
similarity index 98%
rename from src/trace_processor/sqlite/span_join_operator_table.cc
rename to src/trace_processor/prelude/operators/span_join_operator.cc
index 5967c17..61aa3b6 100644
--- a/src/trace_processor/sqlite/span_join_operator_table.cc
+++ b/src/trace_processor/prelude/operators/span_join_operator.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/span_join_operator_table.h"
+#include "src/trace_processor/prelude/operators/span_join_operator.h"
#include <sqlite3.h>
#include <string.h>
diff --git a/src/trace_processor/sqlite/span_join_operator_table.h b/src/trace_processor/prelude/operators/span_join_operator.h
similarity index 97%
rename from src/trace_processor/sqlite/span_join_operator_table.h
rename to src/trace_processor/prelude/operators/span_join_operator.h
index 34befc3..f150a75 100644
--- a/src/trace_processor/sqlite/span_join_operator_table.h
+++ b/src/trace_processor/prelude/operators/span_join_operator.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_SPAN_JOIN_OPERATOR_TABLE_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_SPAN_JOIN_OPERATOR_TABLE_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_OPERATORS_SPAN_JOIN_OPERATOR_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_OPERATORS_SPAN_JOIN_OPERATOR_H_
#include <sqlite3.h>
@@ -456,4 +456,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_SPAN_JOIN_OPERATOR_TABLE_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_OPERATORS_SPAN_JOIN_OPERATOR_H_
diff --git a/src/trace_processor/sqlite/span_join_operator_table_unittest.cc b/src/trace_processor/prelude/operators/span_join_operator_unittest.cc
similarity index 98%
rename from src/trace_processor/sqlite/span_join_operator_table_unittest.cc
rename to src/trace_processor/prelude/operators/span_join_operator_unittest.cc
index 8e5e2fc..737e828 100644
--- a/src/trace_processor/sqlite/span_join_operator_table_unittest.cc
+++ b/src/trace_processor/prelude/operators/span_join_operator_unittest.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/span_join_operator_table.h"
+#include "src/trace_processor/prelude/operators/span_join_operator.h"
#include "test/gtest_and_gmock.h"
diff --git a/src/trace_processor/sqlite/window_operator_table.cc b/src/trace_processor/prelude/operators/window_operator.cc
similarity index 98%
rename from src/trace_processor/sqlite/window_operator_table.cc
rename to src/trace_processor/prelude/operators/window_operator.cc
index c1a9631..b308c53 100644
--- a/src/trace_processor/sqlite/window_operator_table.cc
+++ b/src/trace_processor/prelude/operators/window_operator.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "src/trace_processor/sqlite/window_operator_table.h"
+#include "src/trace_processor/prelude/operators/window_operator.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
diff --git a/src/trace_processor/sqlite/window_operator_table.h b/src/trace_processor/prelude/operators/window_operator.h
similarity index 90%
rename from src/trace_processor/sqlite/window_operator_table.h
rename to src/trace_processor/prelude/operators/window_operator.h
index 5bd8e99..d10b81b 100644
--- a/src/trace_processor/sqlite/window_operator_table.h
+++ b/src/trace_processor/prelude/operators/window_operator.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef SRC_TRACE_PROCESSOR_SQLITE_WINDOW_OPERATOR_TABLE_H_
-#define SRC_TRACE_PROCESSOR_SQLITE_WINDOW_OPERATOR_TABLE_H_
+#ifndef SRC_TRACE_PROCESSOR_PRELUDE_OPERATORS_WINDOW_OPERATOR_H_
+#define SRC_TRACE_PROCESSOR_PRELUDE_OPERATORS_WINDOW_OPERATOR_H_
#include <limits>
#include <memory>
@@ -40,7 +40,7 @@
};
class Cursor : public SqliteTable::Cursor {
public:
- Cursor(WindowOperatorTable*);
+ explicit Cursor(WindowOperatorTable*);
// Implementation of SqliteTable::Cursor.
int Filter(const QueryConstraints& qc,
@@ -94,4 +94,4 @@
} // namespace trace_processor
} // namespace perfetto
-#endif // SRC_TRACE_PROCESSOR_SQLITE_WINDOW_OPERATOR_TABLE_H_
+#endif // SRC_TRACE_PROCESSOR_PRELUDE_OPERATORS_WINDOW_OPERATOR_H_
diff --git a/src/trace_processor/sqlite/BUILD.gn b/src/trace_processor/sqlite/BUILD.gn
index 773d39c..976db0f 100644
--- a/src/trace_processor/sqlite/BUILD.gn
+++ b/src/trace_processor/sqlite/BUILD.gn
@@ -21,8 +21,6 @@
"db_sqlite_table.cc",
"db_sqlite_table.h",
"query_cache.h",
- "span_join_operator_table.cc",
- "span_join_operator_table.h",
"sql_stats_table.cc",
"sql_stats_table.h",
"sqlite_raw_table.cc",
@@ -31,8 +29,6 @@
"sqlite_utils.h",
"stats_table.cc",
"stats_table.h",
- "window_operator_table.cc",
- "window_operator_table.h",
]
deps = [
"..:metatrace",
@@ -76,7 +72,6 @@
sources = [
"db_sqlite_table_unittest.cc",
"query_constraints_unittest.cc",
- "span_join_operator_table_unittest.cc",
"sqlite_utils_unittest.cc",
]
deps = [
diff --git a/src/trace_processor/sqlite/functions/BUILD.gn b/src/trace_processor/sqlite/functions/BUILD.gn
deleted file mode 100644
index 0aa04da..0000000
--- a/src/trace_processor/sqlite/functions/BUILD.gn
+++ /dev/null
@@ -1,72 +0,0 @@
-# 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.
-
-import("../../../../gn/test.gni")
-
-if (enable_perfetto_trace_processor_sqlite) {
- source_set("functions") {
- sources = [
- "create_function.cc",
- "create_function.h",
- "create_function_internal.cc",
- "create_function_internal.h",
- "create_view_function.cc",
- "create_view_function.h",
- "import.cc",
- "import.h",
- "pprof_functions.cc",
- "pprof_functions.h",
- "register_function.cc",
- "register_function.h",
- "sqlite3_str_split.cc",
- "sqlite3_str_split.h",
- "utils.h",
- "window_functions.h",
- ]
- deps = [
- "../..:demangle",
- "../..:export_json",
- "../..:metatrace",
- "../../../../gn:default_deps",
- "../../../../gn:sqlite",
- "../../../../protos/perfetto/common:zero",
- "../../../../protos/perfetto/trace/ftrace:zero",
- "../../../base",
- "../../containers",
- "../../db",
- "../../dynamic",
- "../../importers/common",
- "../../importers/ftrace:ftrace_descriptors",
- "../../storage",
- "../../types",
- "../../util",
- "../../util:profile_builder",
- "../../util:sql_argument",
- "../../util:stdlib",
- ]
- public_deps = [ "..:sqlite_minimal" ]
- }
-
- perfetto_unittest_source_set("unittests") {
- testonly = true
- sources = [ "sqlite3_str_split_unittest.cc" ]
- deps = [
- ":functions",
- "../../../../gn:default_deps",
- "../../../../gn:gtest_and_gmock",
- "../../../../gn:sqlite",
- "../../../base",
- ]
- }
-}
diff --git a/src/trace_processor/trace_processor_impl.cc b/src/trace_processor/trace_processor_impl.cc
index 689963a..09b7611 100644
--- a/src/trace_processor/trace_processor_impl.cc
+++ b/src/trace_processor/trace_processor_impl.cc
@@ -55,22 +55,22 @@
#include "src/trace_processor/importers/proto/metadata_tracker.h"
#include "src/trace_processor/importers/systrace/systrace_trace_parser.h"
#include "src/trace_processor/iterator_impl.h"
-#include "src/trace_processor/sqlite/functions/create_function.h"
-#include "src/trace_processor/sqlite/functions/create_view_function.h"
-#include "src/trace_processor/sqlite/functions/import.h"
-#include "src/trace_processor/sqlite/functions/pprof_functions.h"
-#include "src/trace_processor/sqlite/functions/register_function.h"
-#include "src/trace_processor/sqlite/functions/sqlite3_str_split.h"
-#include "src/trace_processor/sqlite/functions/utils.h"
-#include "src/trace_processor/sqlite/functions/window_functions.h"
+#include "src/trace_processor/prelude/functions/create_function.h"
+#include "src/trace_processor/prelude/functions/create_view_function.h"
+#include "src/trace_processor/prelude/functions/import.h"
+#include "src/trace_processor/prelude/functions/pprof_functions.h"
+#include "src/trace_processor/prelude/functions/register_function.h"
+#include "src/trace_processor/prelude/functions/sqlite3_str_split.h"
+#include "src/trace_processor/prelude/functions/utils.h"
+#include "src/trace_processor/prelude/functions/window_functions.h"
+#include "src/trace_processor/prelude/operators/span_join_operator.h"
+#include "src/trace_processor/prelude/operators/window_operator.h"
#include "src/trace_processor/sqlite/scoped_db.h"
-#include "src/trace_processor/sqlite/span_join_operator_table.h"
#include "src/trace_processor/sqlite/sql_stats_table.h"
#include "src/trace_processor/sqlite/sqlite_raw_table.h"
#include "src/trace_processor/sqlite/sqlite_table.h"
#include "src/trace_processor/sqlite/sqlite_utils.h"
#include "src/trace_processor/sqlite/stats_table.h"
-#include "src/trace_processor/sqlite/window_operator_table.h"
#include "src/trace_processor/tp_metatrace.h"
#include "src/trace_processor/types/variadic.h"
#include "src/trace_processor/util/protozero_to_text.h"
diff --git a/src/trace_processor/trace_processor_impl.h b/src/trace_processor/trace_processor_impl.h
index 59f677c..60c390d 100644
--- a/src/trace_processor/trace_processor_impl.h
+++ b/src/trace_processor/trace_processor_impl.h
@@ -30,10 +30,10 @@
#include "perfetto/trace_processor/basic_types.h"
#include "perfetto/trace_processor/status.h"
#include "perfetto/trace_processor/trace_processor.h"
+#include "src/trace_processor/prelude/functions/create_function.h"
+#include "src/trace_processor/prelude/functions/create_view_function.h"
+#include "src/trace_processor/prelude/functions/import.h"
#include "src/trace_processor/sqlite/db_sqlite_table.h"
-#include "src/trace_processor/sqlite/functions/create_function.h"
-#include "src/trace_processor/sqlite/functions/create_view_function.h"
-#include "src/trace_processor/sqlite/functions/import.h"
#include "src/trace_processor/sqlite/query_cache.h"
#include "src/trace_processor/sqlite/scoped_db.h"
#include "src/trace_processor/trace_processor_storage_impl.h"