diff --git a/Android.bp b/Android.bp index f66c143408..dac668613c 100644 --- a/Android.bp +++ b/Android.bp @@ -1931,9 +1931,9 @@ filegroup { name: "perfetto_include_perfetto_ext_base_version", } -// GN: //include/perfetto/ext/cloud_trace_processor:cloud_trace_processor +// GN: //include/perfetto/ext/bigtrace:bigtrace filegroup { - name: "perfetto_include_perfetto_ext_cloud_trace_processor_cloud_trace_processor", + name: "perfetto_include_perfetto_ext_bigtrace_bigtrace", } // GN: //include/perfetto/ext/ipc:ipc @@ -2482,37 +2482,37 @@ cc_test { test_config: "PerfettoIntegrationTests.xml", } -// GN: //protos/perfetto/cloud_trace_processor:lite +// GN: //protos/perfetto/bigtrace:lite genrule { - name: "perfetto_protos_perfetto_cloud_trace_processor_lite_gen", + name: "perfetto_protos_perfetto_bigtrace_lite_gen", srcs: [ - "protos/perfetto/cloud_trace_processor/orchestrator.proto", - "protos/perfetto/cloud_trace_processor/worker.proto", + "protos/perfetto/bigtrace/orchestrator.proto", + "protos/perfetto/bigtrace/worker.proto", ], tools: [ "aprotoc", ], cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(in)", out: [ - "external/perfetto/protos/perfetto/cloud_trace_processor/orchestrator.pb.cc", - "external/perfetto/protos/perfetto/cloud_trace_processor/worker.pb.cc", + "external/perfetto/protos/perfetto/bigtrace/orchestrator.pb.cc", + "external/perfetto/protos/perfetto/bigtrace/worker.pb.cc", ], } -// GN: //protos/perfetto/cloud_trace_processor:lite +// GN: //protos/perfetto/bigtrace:lite genrule { - name: "perfetto_protos_perfetto_cloud_trace_processor_lite_gen_headers", + name: "perfetto_protos_perfetto_bigtrace_lite_gen_headers", srcs: [ - "protos/perfetto/cloud_trace_processor/orchestrator.proto", - "protos/perfetto/cloud_trace_processor/worker.proto", + "protos/perfetto/bigtrace/orchestrator.proto", + "protos/perfetto/bigtrace/worker.proto", ], tools: [ "aprotoc", ], cmd: "mkdir -p $(genDir)/external/perfetto/ && $(location aprotoc) --proto_path=external/perfetto --cpp_out=lite=true:$(genDir)/external/perfetto/ $(in)", out: [ - "external/perfetto/protos/perfetto/cloud_trace_processor/orchestrator.pb.h", - "external/perfetto/protos/perfetto/cloud_trace_processor/worker.pb.h", + "external/perfetto/protos/perfetto/bigtrace/orchestrator.pb.h", + "external/perfetto/protos/perfetto/bigtrace/worker.pb.h", ], export_include_dirs: [ ".", @@ -8797,21 +8797,21 @@ genrule { ], } -// GN: //src/cloud_trace_processor:sources +// GN: //src/bigtrace:sources filegroup { - name: "perfetto_src_cloud_trace_processor_sources", + name: "perfetto_src_bigtrace_sources", srcs: [ - "src/cloud_trace_processor/orchestrator_impl.cc", - "src/cloud_trace_processor/trace_processor_wrapper.cc", - "src/cloud_trace_processor/worker_impl.cc", + "src/bigtrace/orchestrator_impl.cc", + "src/bigtrace/trace_processor_wrapper.cc", + "src/bigtrace/worker_impl.cc", ], } -// GN: //src/cloud_trace_processor:unittests +// GN: //src/bigtrace:unittests filegroup { - name: "perfetto_src_cloud_trace_processor_unittests", + name: "perfetto_src_bigtrace_unittests", srcs: [ - "src/cloud_trace_processor/trace_processor_wrapper_unittest.cc", + "src/bigtrace/trace_processor_wrapper_unittest.cc", ], } @@ -12322,7 +12322,7 @@ cc_test { ":perfetto_include_perfetto_ext_base_http_http", ":perfetto_include_perfetto_ext_base_threading_threading", ":perfetto_include_perfetto_ext_base_version", - ":perfetto_include_perfetto_ext_cloud_trace_processor_cloud_trace_processor", + ":perfetto_include_perfetto_ext_bigtrace_bigtrace", ":perfetto_include_perfetto_ext_ipc_ipc", ":perfetto_include_perfetto_ext_trace_processor_demangle", ":perfetto_include_perfetto_ext_trace_processor_export_json", @@ -12346,7 +12346,7 @@ cc_test { ":perfetto_include_perfetto_tracing_core_core", ":perfetto_include_perfetto_tracing_core_forward_decls", ":perfetto_include_perfetto_tracing_tracing", - ":perfetto_protos_perfetto_cloud_trace_processor_lite_gen", + ":perfetto_protos_perfetto_bigtrace_lite_gen", ":perfetto_protos_perfetto_common_cpp_gen", ":perfetto_protos_perfetto_common_lite_gen", ":perfetto_protos_perfetto_common_zero_gen", @@ -12461,8 +12461,8 @@ cc_test { ":perfetto_src_base_unittests", ":perfetto_src_base_unix_socket", ":perfetto_src_base_version", - ":perfetto_src_cloud_trace_processor_sources", - ":perfetto_src_cloud_trace_processor_unittests", + ":perfetto_src_bigtrace_sources", + ":perfetto_src_bigtrace_unittests", ":perfetto_src_ipc_client", ":perfetto_src_ipc_common", ":perfetto_src_ipc_host", @@ -12695,7 +12695,7 @@ cc_test { "perfetto_gtest_logcat_printer", ], generated_headers: [ - "perfetto_protos_perfetto_cloud_trace_processor_lite_gen_headers", + "perfetto_protos_perfetto_bigtrace_lite_gen_headers", "perfetto_protos_perfetto_common_cpp_gen_headers", "perfetto_protos_perfetto_common_lite_gen_headers", "perfetto_protos_perfetto_common_zero_gen_headers", diff --git a/BUILD b/BUILD index a6e2834254..afbb6b84ca 100644 --- a/BUILD +++ b/BUILD @@ -65,12 +65,12 @@ perfetto_cc_library( linkstatic = True, ) -# GN target: //src/cloud_trace_processor:cloud_trace_processor +# GN target: //src/bigtrace:bigtrace perfetto_cc_library( - name = "cloud_trace_processor", + name = "bigtrace", srcs = [ ":src_base_threading_threading", - ":src_cloud_trace_processor_sources", + ":src_bigtrace_sources", ":src_kernel_utils_syscall_table", ":src_protozero_proto_ring_buffer", ":src_trace_processor_db_db", @@ -143,7 +143,7 @@ perfetto_cc_library( ":include_perfetto_base_base", ":include_perfetto_ext_base_base", ":include_perfetto_ext_base_threading_threading", - ":include_perfetto_ext_cloud_trace_processor_cloud_trace_processor", + ":include_perfetto_ext_bigtrace_bigtrace", ":include_perfetto_ext_trace_processor_demangle", ":include_perfetto_ext_trace_processor_export_json", ":include_perfetto_ext_trace_processor_importers_memory_tracker_memory_tracker", @@ -157,7 +157,7 @@ perfetto_cc_library( ":include_perfetto_trace_processor_trace_processor", ], deps = [ - ":protos_perfetto_cloud_trace_processor_lite", + ":protos_perfetto_bigtrace_lite", ":protos_perfetto_common_lite", ":protos_perfetto_common_zero", ":protos_perfetto_config_android_zero", @@ -650,13 +650,13 @@ perfetto_filegroup( ], ) -# GN target: //include/perfetto/ext/cloud_trace_processor:cloud_trace_processor +# GN target: //include/perfetto/ext/bigtrace:bigtrace perfetto_filegroup( - name = "include_perfetto_ext_cloud_trace_processor_cloud_trace_processor", + name = "include_perfetto_ext_bigtrace_bigtrace", srcs = [ - "include/perfetto/ext/cloud_trace_processor/environment.h", - "include/perfetto/ext/cloud_trace_processor/orchestrator.h", - "include/perfetto/ext/cloud_trace_processor/worker.h", + "include/perfetto/ext/bigtrace/environment.h", + "include/perfetto/ext/bigtrace/orchestrator.h", + "include/perfetto/ext/bigtrace/worker.h", ], ) @@ -1075,16 +1075,16 @@ perfetto_genrule( ], ) -# GN target: //src/cloud_trace_processor:sources +# GN target: //src/bigtrace:sources perfetto_filegroup( - name = "src_cloud_trace_processor_sources", + name = "src_bigtrace_sources", srcs = [ - "src/cloud_trace_processor/orchestrator_impl.cc", - "src/cloud_trace_processor/orchestrator_impl.h", - "src/cloud_trace_processor/trace_processor_wrapper.cc", - "src/cloud_trace_processor/trace_processor_wrapper.h", - "src/cloud_trace_processor/worker_impl.cc", - "src/cloud_trace_processor/worker_impl.h", + "src/bigtrace/orchestrator_impl.cc", + "src/bigtrace/orchestrator_impl.h", + "src/bigtrace/trace_processor_wrapper.cc", + "src/bigtrace/trace_processor_wrapper.h", + "src/bigtrace/worker_impl.cc", + "src/bigtrace/worker_impl.h", ], ) @@ -3448,20 +3448,20 @@ perfetto_py_proto_library( ], ) -# GN target: //protos/perfetto/cloud_trace_processor:lite +# GN target: //protos/perfetto/bigtrace:lite perfetto_cc_proto_library( - name = "protos_perfetto_cloud_trace_processor_lite", + name = "protos_perfetto_bigtrace_lite", deps = [ - ":protos_perfetto_cloud_trace_processor_protos", + ":protos_perfetto_bigtrace_protos", ], ) -# GN target: //protos/perfetto/cloud_trace_processor:source_set +# GN target: //protos/perfetto/bigtrace:source_set perfetto_proto_library( - name = "protos_perfetto_cloud_trace_processor_protos", + name = "protos_perfetto_bigtrace_protos", srcs = [ - "protos/perfetto/cloud_trace_processor/orchestrator.proto", - "protos/perfetto/cloud_trace_processor/worker.proto", + "protos/perfetto/bigtrace/orchestrator.proto", + "protos/perfetto/bigtrace/worker.proto", ], visibility = [ PERFETTO_CONFIG.proto_library_visibility, diff --git a/BUILD.gn b/BUILD.gn index 9051777810..cff53607f1 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -42,7 +42,7 @@ if (enable_perfetto_platform_services) { } if (enable_perfetto_trace_processor && enable_perfetto_trace_processor_sqlite) { - all_targets += [ "src/cloud_trace_processor" ] + all_targets += [ "src/bigtrace" ] all_targets += [ "src/trace_processor:trace_processor_shell" ] } diff --git a/gn/perfetto.gni b/gn/perfetto.gni index eebfc41caf..b23aa06a20 100644 --- a/gn/perfetto.gni +++ b/gn/perfetto.gni @@ -310,8 +310,8 @@ declare_args() { # Enables gRPC in the Perfetto codebase. gRPC significantly increases build # times and the general footprint of Perfetto. As it only required for - # cloud trace processor and even then only to build the final ready-to-ship - # binary, don't enable this by default. + # BigTrace and even then only to build the final ready-to-ship binary, don't + # enable this by default. enable_perfetto_grpc = false } diff --git a/gn/perfetto_unittests.gni b/gn/perfetto_unittests.gni index 3ed44203dc..cc51910b4d 100644 --- a/gn/perfetto_unittests.gni +++ b/gn/perfetto_unittests.gni @@ -77,6 +77,6 @@ if (enable_perfetto_trace_processor) { if (enable_perfetto_trace_processor_sqlite) { perfetto_unittests_targets += [ "src/trace_processor/metrics:unittests" ] - perfetto_unittests_targets += [ "src/cloud_trace_processor:unittests" ] + perfetto_unittests_targets += [ "src/bigtrace:unittests" ] } } diff --git a/include/perfetto/ext/cloud_trace_processor/BUILD.gn b/include/perfetto/ext/bigtrace/BUILD.gn similarity index 95% rename from include/perfetto/ext/cloud_trace_processor/BUILD.gn rename to include/perfetto/ext/bigtrace/BUILD.gn index be266cb255..e40ba6d578 100644 --- a/include/perfetto/ext/cloud_trace_processor/BUILD.gn +++ b/include/perfetto/ext/bigtrace/BUILD.gn @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -source_set("cloud_trace_processor") { +source_set("bigtrace") { sources = [ "environment.h", "orchestrator.h", diff --git a/include/perfetto/ext/cloud_trace_processor/environment.h b/include/perfetto/ext/bigtrace/environment.h similarity index 80% rename from include/perfetto/ext/cloud_trace_processor/environment.h rename to include/perfetto/ext/bigtrace/environment.h index 8b1fc01ea7..943ad94577 100644 --- a/include/perfetto/ext/cloud_trace_processor/environment.h +++ b/include/perfetto/ext/bigtrace/environment.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ENVIRONMENT_H_ -#define INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ENVIRONMENT_H_ +#ifndef INCLUDE_PERFETTO_EXT_BIGTRACE_ENVIRONMENT_H_ +#define INCLUDE_PERFETTO_EXT_BIGTRACE_ENVIRONMENT_H_ #include #include @@ -27,13 +27,13 @@ #include "perfetto/ext/base/threading/stream.h" namespace perfetto { -namespace cloud_trace_processor { +namespace bigtrace { // Shim interface allowing embedders to change how operations which interact // with the OS operate (e.g. IO, networking etc). -class CtpEnvironment { +class Environment { public: - virtual ~CtpEnvironment(); + virtual ~Environment(); // Opens the file at |path| and reads the contents in chunks, returning the // the chunks as a Stream. The size of the chunks is implementation defined @@ -42,7 +42,7 @@ class CtpEnvironment { const std::string& path) = 0; }; -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto -#endif // INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ENVIRONMENT_H_ +#endif // INCLUDE_PERFETTO_EXT_BIGTRACE_ENVIRONMENT_H_ diff --git a/include/perfetto/ext/cloud_trace_processor/orchestrator.h b/include/perfetto/ext/bigtrace/orchestrator.h similarity index 85% rename from include/perfetto/ext/cloud_trace_processor/orchestrator.h rename to include/perfetto/ext/bigtrace/orchestrator.h index 4501f6ef04..0cefe46b51 100644 --- a/include/perfetto/ext/cloud_trace_processor/orchestrator.h +++ b/include/perfetto/ext/bigtrace/orchestrator.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_H_ -#define INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_H_ +#ifndef INCLUDE_PERFETTO_EXT_BIGTRACE_ORCHESTRATOR_H_ +#define INCLUDE_PERFETTO_EXT_BIGTRACE_ORCHESTRATOR_H_ #include #include @@ -43,13 +43,13 @@ class TracePoolDestroyResponse; } // namespace perfetto namespace perfetto { -namespace cloud_trace_processor { +namespace bigtrace { class Worker; -// Interface for a CloudTraceProcessor "Orchestrator". +// Interface for a BigTrace "Orchestrator". // -// See CloudTraceProcessorOrchestrator RPC service for high-level documentation. +// See BigTraceOrchestrator RPC service for high-level documentation. class Orchestrator { public: virtual ~Orchestrator(); @@ -81,7 +81,7 @@ class Orchestrator { TracePoolDestroy(const protos::TracePoolDestroyArgs&) = 0; }; -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto -#endif // INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_H_ +#endif // INCLUDE_PERFETTO_EXT_BIGTRACE_ORCHESTRATOR_H_ diff --git a/include/perfetto/ext/cloud_trace_processor/worker.h b/include/perfetto/ext/bigtrace/worker.h similarity index 76% rename from include/perfetto/ext/cloud_trace_processor/worker.h rename to include/perfetto/ext/bigtrace/worker.h index d96c495940..93af24be9e 100644 --- a/include/perfetto/ext/cloud_trace_processor/worker.h +++ b/include/perfetto/ext/bigtrace/worker.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_WORKER_H_ -#define INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_WORKER_H_ +#ifndef INCLUDE_PERFETTO_EXT_BIGTRACE_WORKER_H_ +#define INCLUDE_PERFETTO_EXT_BIGTRACE_WORKER_H_ #include #include @@ -38,23 +38,23 @@ class QueryTraceArgs; class QueryTraceResponse; } // namespace protos -namespace cloud_trace_processor { +namespace bigtrace { -class CtpEnvironment; +class Environment; -// Interface for a CloudTraceProcessor "Worker". +// Interface for a BigTrace "Worker". // -// See CloudTraceProcessorWorker RPC service for high-level documentation. +// See BigTraceWorker RPC service for high-level documentation. class Worker { public: virtual ~Worker(); // Returns an in-process implementation of the Worker given an instance of - // |CtpEnvironment| and a |ThreadPool|. The |CtpEnvironment| will be used to + // |Environment| and a |ThreadPool|. The |Environment| will be used to // perform any interaction with the OS (e.g. opening and reading files) and // the |ThreadPool| will be used to dispatch requests to TraceProcessor. static std::unique_ptr CreateInProcesss(base::TaskRunner*, - CtpEnvironment*, + Environment*, base::ThreadPool*); // Synchronize the state of the traces in the worker to the orchestrator. @@ -66,7 +66,7 @@ class Worker { const protos::QueryTraceArgs&) = 0; }; -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto -#endif // INCLUDE_PERFETTO_EXT_CLOUD_TRACE_PROCESSOR_WORKER_H_ +#endif // INCLUDE_PERFETTO_EXT_BIGTRACE_WORKER_H_ diff --git a/protos/perfetto/cloud_trace_processor/BUILD.gn b/protos/perfetto/bigtrace/BUILD.gn similarity index 94% rename from protos/perfetto/cloud_trace_processor/BUILD.gn rename to protos/perfetto/bigtrace/BUILD.gn index d3178fe5a6..33e87d2d51 100644 --- a/protos/perfetto/cloud_trace_processor/BUILD.gn +++ b/protos/perfetto/bigtrace/BUILD.gn @@ -30,7 +30,7 @@ perfetto_proto_library("@TYPE@") { } if (enable_perfetto_grpc) { - perfetto_grpc_library("cloud_trace_processor_grpc") { + perfetto_grpc_library("bigtrace_grpc") { deps = [ ":lite" ] sources = SOURCES } diff --git a/protos/perfetto/cloud_trace_processor/orchestrator.proto b/protos/perfetto/bigtrace/orchestrator.proto similarity index 95% rename from protos/perfetto/cloud_trace_processor/orchestrator.proto rename to protos/perfetto/bigtrace/orchestrator.proto index 3ac84fe996..48072896c3 100644 --- a/protos/perfetto/cloud_trace_processor/orchestrator.proto +++ b/protos/perfetto/bigtrace/orchestrator.proto @@ -20,12 +20,12 @@ package perfetto.protos; import "protos/perfetto/trace_processor/trace_processor.proto"; -// RPC interface for a CloudTraceProcessor Orchestrator. +// RPC interface for a BigTrace Orchestrator. // -// Each CloudTraceProcessor instance has a single Orchestrator which is +// Each BigTrace instance has a single Orchestrator which is // responsible for receiving requests for loading and querying traces from // clients and shards these requests among a set of "Workers". -service CloudTraceProcessorOrchestrator { +service BigTraceOrchestrator { // Creates a TracePool with the specified arguments. // // A TracePool is a logical group of traces which can be addressed with a diff --git a/protos/perfetto/cloud_trace_processor/worker.proto b/protos/perfetto/bigtrace/worker.proto similarity index 96% rename from protos/perfetto/cloud_trace_processor/worker.proto rename to protos/perfetto/bigtrace/worker.proto index 9289ab2c71..af24fa5e47 100644 --- a/protos/perfetto/cloud_trace_processor/worker.proto +++ b/protos/perfetto/bigtrace/worker.proto @@ -20,12 +20,12 @@ package perfetto.protos; import "protos/perfetto/trace_processor/trace_processor.proto"; -// Interface for a CloudTraceProcessor "Worker". +// Interface for a BigTrace "Worker". // // Workers are owned by an |Orchestrator| which assigns traces and forwards any // requests from end users. Workers are responsible for loading assigned traces // with TraceProcessor and executing the requests. -service CloudTraceProcessorWorker { +service BigTraceWorker { // Synchronize the state of the traces in the worker to the orchestrator. The // orchestrator uses this method to ensure the worker is always fully up to // date with the state according to the orchestrator. This makes the system diff --git a/src/cloud_trace_processor/BUILD.gn b/src/bigtrace/BUILD.gn similarity index 81% rename from src/cloud_trace_processor/BUILD.gn rename to src/bigtrace/BUILD.gn index e9a4bfca56..270363fec8 100644 --- a/src/cloud_trace_processor/BUILD.gn +++ b/src/bigtrace/BUILD.gn @@ -18,13 +18,13 @@ import("../../gn/test.gni") assert( enable_perfetto_trace_processor && enable_perfetto_trace_processor_sqlite) -# The "core" business logic of cloud trace processor which is agnostic to the +# The "core" business logic of BigTrace which is agnostic to the # RPC transport. Allows wrapping with any RPC framework capable of handling # protobufs. -static_library("cloud_trace_processor") { +static_library("bigtrace") { complete_static_lib = true deps = [ ":sources" ] - public_deps = [ "../../include/perfetto/ext/cloud_trace_processor" ] + public_deps = [ "../../include/perfetto/ext/bigtrace" ] } source_set("sources") { @@ -38,8 +38,8 @@ source_set("sources") { ] deps = [ "../../gn:default_deps", - "../../include/perfetto/ext/cloud_trace_processor", - "../../protos/perfetto/cloud_trace_processor:lite", + "../../include/perfetto/ext/bigtrace", + "../../protos/perfetto/bigtrace:lite", "../base", "../base/threading", "../protozero", @@ -57,7 +57,7 @@ perfetto_unittest_source_set("unittests") { ":sources", "../../gn:default_deps", "../../gn:gtest_and_gmock", - "../../protos/perfetto/cloud_trace_processor:lite", + "../../protos/perfetto/bigtrace:lite", "../base", "../base/threading", ] diff --git a/src/cloud_trace_processor/orchestrator_impl.cc b/src/bigtrace/orchestrator_impl.cc similarity index 95% rename from src/cloud_trace_processor/orchestrator_impl.cc rename to src/bigtrace/orchestrator_impl.cc index bc22e9806f..d6aa22f2b3 100644 --- a/src/cloud_trace_processor/orchestrator_impl.cc +++ b/src/bigtrace/orchestrator_impl.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "src/cloud_trace_processor/orchestrator_impl.h" +#include "src/bigtrace/orchestrator_impl.h" #include #include @@ -32,14 +32,14 @@ #include "perfetto/ext/base/threading/poll.h" #include "perfetto/ext/base/threading/spawn.h" #include "perfetto/ext/base/threading/stream.h" -#include "perfetto/ext/cloud_trace_processor/orchestrator.h" -#include "perfetto/ext/cloud_trace_processor/worker.h" -#include "protos/perfetto/cloud_trace_processor/orchestrator.pb.h" -#include "protos/perfetto/cloud_trace_processor/worker.pb.h" +#include "perfetto/ext/bigtrace/orchestrator.h" +#include "perfetto/ext/bigtrace/worker.h" +#include "protos/perfetto/bigtrace/orchestrator.pb.h" +#include "protos/perfetto/bigtrace/worker.pb.h" #include "src/trace_processor/util/status_macros.h" namespace perfetto { -namespace cloud_trace_processor { +namespace bigtrace { namespace { base::Future> @@ -212,5 +212,5 @@ base::StatusFuture OrchestratorImpl::SyncWorkers() { .Collect(base::AllOkCollector()); } -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto diff --git a/src/cloud_trace_processor/orchestrator_impl.h b/src/bigtrace/orchestrator_impl.h similarity index 88% rename from src/cloud_trace_processor/orchestrator_impl.h rename to src/bigtrace/orchestrator_impl.h index 39b9f0295d..44bb52d51e 100644 --- a/src/cloud_trace_processor/orchestrator_impl.h +++ b/src/bigtrace/orchestrator_impl.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef SRC_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_IMPL_H_ -#define SRC_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_IMPL_H_ +#ifndef SRC_BIGTRACE_ORCHESTRATOR_IMPL_H_ +#define SRC_BIGTRACE_ORCHESTRATOR_IMPL_H_ #include #include @@ -26,14 +26,14 @@ #include "perfetto/ext/base/periodic_task.h" #include "perfetto/ext/base/threading/future.h" #include "perfetto/ext/base/threading/spawn.h" -#include "perfetto/ext/cloud_trace_processor/orchestrator.h" +#include "perfetto/ext/bigtrace/orchestrator.h" namespace perfetto { namespace protos { class TracePoolShardCreateArgs; } -namespace cloud_trace_processor { +namespace bigtrace { class OrchestratorImpl : public Orchestrator { public: @@ -73,7 +73,7 @@ class OrchestratorImpl : public Orchestrator { base::FlatHashMap traces_; }; -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto -#endif // SRC_CLOUD_TRACE_PROCESSOR_ORCHESTRATOR_IMPL_H_ +#endif // SRC_BIGTRACE_ORCHESTRATOR_IMPL_H_ diff --git a/src/cloud_trace_processor/trace_processor_wrapper.cc b/src/bigtrace/trace_processor_wrapper.cc similarity index 96% rename from src/cloud_trace_processor/trace_processor_wrapper.cc rename to src/bigtrace/trace_processor_wrapper.cc index 0dc423774c..255a165a67 100644 --- a/src/cloud_trace_processor/trace_processor_wrapper.cc +++ b/src/bigtrace/trace_processor_wrapper.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "src/cloud_trace_processor/trace_processor_wrapper.h" +#include "src/bigtrace/trace_processor_wrapper.h" #include #include @@ -37,13 +37,13 @@ #include "perfetto/trace_processor/trace_blob.h" #include "perfetto/trace_processor/trace_blob_view.h" #include "perfetto/trace_processor/trace_processor.h" -#include "protos/perfetto/cloud_trace_processor/worker.pb.h" +#include "protos/perfetto/bigtrace/worker.pb.h" #include "src/protozero/proto_ring_buffer.h" #include "src/trace_processor/rpc/query_result_serializer.h" #include "src/trace_processor/util/status_macros.h" namespace perfetto { -namespace cloud_trace_processor { +namespace bigtrace { namespace { using trace_processor::QueryResultSerializer; @@ -155,5 +155,5 @@ base::StatusOrStream TraceProcessorWrapper::Query( [tp = trace_processor_] { tp->InterruptQuery(); }); } -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto diff --git a/src/cloud_trace_processor/trace_processor_wrapper.h b/src/bigtrace/trace_processor_wrapper.h similarity index 89% rename from src/cloud_trace_processor/trace_processor_wrapper.h rename to src/bigtrace/trace_processor_wrapper.h index ac64a5cb3d..d28a1ea7ff 100644 --- a/src/cloud_trace_processor/trace_processor_wrapper.h +++ b/src/bigtrace/trace_processor_wrapper.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef SRC_CLOUD_TRACE_PROCESSOR_TRACE_PROCESSOR_WRAPPER_H_ -#define SRC_CLOUD_TRACE_PROCESSOR_TRACE_PROCESSOR_WRAPPER_H_ +#ifndef SRC_BIGTRACE_TRACE_PROCESSOR_WRAPPER_H_ +#define SRC_BIGTRACE_TRACE_PROCESSOR_WRAPPER_H_ #include "perfetto/ext/base/threading/future.h" #include "perfetto/ext/base/threading/stream.h" @@ -32,10 +32,10 @@ class QueryTraceResponse; } // namespace perfetto namespace perfetto { -namespace cloud_trace_processor { +namespace bigtrace { // Wrapper class around an instance of TraceProcessor to adapt it for the needs -// of a CloudTraceProcessor Worker. +// of a BigTrace Worker. class TraceProcessorWrapper { public: enum Statefulness { @@ -76,7 +76,7 @@ class TraceProcessorWrapper { std::shared_ptr trace_processor_; }; -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto -#endif // SRC_CLOUD_TRACE_PROCESSOR_TRACE_PROCESSOR_WRAPPER_H_ +#endif // SRC_BIGTRACE_TRACE_PROCESSOR_WRAPPER_H_ diff --git a/src/cloud_trace_processor/trace_processor_wrapper_unittest.cc b/src/bigtrace/trace_processor_wrapper_unittest.cc similarity index 97% rename from src/cloud_trace_processor/trace_processor_wrapper_unittest.cc rename to src/bigtrace/trace_processor_wrapper_unittest.cc index 3baa3db74c..a495395f4f 100644 --- a/src/cloud_trace_processor/trace_processor_wrapper_unittest.cc +++ b/src/bigtrace/trace_processor_wrapper_unittest.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "src/cloud_trace_processor/trace_processor_wrapper.h" +#include "src/bigtrace/trace_processor_wrapper.h" #include #include #include @@ -29,11 +29,11 @@ #include "perfetto/ext/base/threading/stream.h" #include "perfetto/ext/base/threading/thread_pool.h" #include "perfetto/ext/base/threading/util.h" -#include "protos/perfetto/cloud_trace_processor/worker.pb.h" +#include "protos/perfetto/bigtrace/worker.pb.h" #include "test/gtest_and_gmock.h" namespace perfetto { -namespace cloud_trace_processor { +namespace bigtrace { namespace { using SF = TraceProcessorWrapper::Statefulness; @@ -240,5 +240,5 @@ TEST(TraceProcessorWrapperUnittest, Interrupt) { } } // namespace -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto diff --git a/src/cloud_trace_processor/worker_impl.cc b/src/bigtrace/worker_impl.cc similarity index 87% rename from src/cloud_trace_processor/worker_impl.cc rename to src/bigtrace/worker_impl.cc index b351034ef9..300d11c316 100644 --- a/src/cloud_trace_processor/worker_impl.cc +++ b/src/bigtrace/worker_impl.cc @@ -14,7 +14,7 @@ * limitations under the License. */ -#include "src/cloud_trace_processor/worker_impl.h" +#include "src/bigtrace/worker_impl.h" #include @@ -27,25 +27,25 @@ #include "perfetto/ext/base/threading/stream.h" #include "perfetto/ext/base/threading/util.h" #include "perfetto/ext/base/uuid.h" -#include "perfetto/ext/cloud_trace_processor/worker.h" -#include "protos/perfetto/cloud_trace_processor/orchestrator.pb.h" -#include "protos/perfetto/cloud_trace_processor/worker.pb.h" -#include "src/cloud_trace_processor/trace_processor_wrapper.h" +#include "perfetto/ext/bigtrace/worker.h" +#include "protos/perfetto/bigtrace/orchestrator.pb.h" +#include "protos/perfetto/bigtrace/worker.pb.h" +#include "src/bigtrace/trace_processor_wrapper.h" #include "src/trace_processor/util/status_macros.h" namespace perfetto { -namespace cloud_trace_processor { +namespace bigtrace { Worker::~Worker() = default; std::unique_ptr Worker::CreateInProcesss(base::TaskRunner* runner, - CtpEnvironment* environment, + Environment* environment, base::ThreadPool* pool) { return std::make_unique(runner, environment, pool); } WorkerImpl::WorkerImpl(base::TaskRunner* runner, - CtpEnvironment* environment, + Environment* environment, base::ThreadPool* pool) : task_runner_(runner), environment_(environment), thread_pool_(pool) {} @@ -94,5 +94,5 @@ base::StatusOrStream WorkerImpl::QueryTrace( return tp->wrapper->Query(args.sql_query()); } -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto diff --git a/src/cloud_trace_processor/worker_impl.h b/src/bigtrace/worker_impl.h similarity index 76% rename from src/cloud_trace_processor/worker_impl.h rename to src/bigtrace/worker_impl.h index 224fc3bbbb..720d022cf5 100644 --- a/src/cloud_trace_processor/worker_impl.h +++ b/src/bigtrace/worker_impl.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef SRC_CLOUD_TRACE_PROCESSOR_WORKER_IMPL_H_ -#define SRC_CLOUD_TRACE_PROCESSOR_WORKER_IMPL_H_ +#ifndef SRC_BIGTRACE_WORKER_IMPL_H_ +#define SRC_BIGTRACE_WORKER_IMPL_H_ #include #include @@ -26,9 +26,9 @@ #include "perfetto/ext/base/flat_hash_map.h" #include "perfetto/ext/base/threading/spawn.h" #include "perfetto/ext/base/threading/thread_pool.h" -#include "perfetto/ext/cloud_trace_processor/environment.h" -#include "perfetto/ext/cloud_trace_processor/worker.h" -#include "src/cloud_trace_processor/trace_processor_wrapper.h" +#include "perfetto/ext/bigtrace/environment.h" +#include "perfetto/ext/bigtrace/worker.h" +#include "src/bigtrace/trace_processor_wrapper.h" namespace perfetto { namespace protos { @@ -39,11 +39,11 @@ enum GroupType : int; } // namespace perfetto namespace perfetto { -namespace cloud_trace_processor { +namespace bigtrace { class WorkerImpl : public Worker { public: - explicit WorkerImpl(base::TaskRunner*, CtpEnvironment*, base::ThreadPool*); + explicit WorkerImpl(base::TaskRunner*, Environment*, base::ThreadPool*); // Synchronize the state of the traces in the worker to the orchestrator. base::StatusOrStream SyncTraceState( @@ -59,12 +59,12 @@ class WorkerImpl : public Worker { base::SpawnHandle load_handle; }; base::TaskRunner* const task_runner_; - CtpEnvironment* const environment_; + Environment* const environment_; base::ThreadPool* const thread_pool_; base::FlatHashMap traces_; }; -} // namespace cloud_trace_processor +} // namespace bigtrace } // namespace perfetto -#endif // SRC_CLOUD_TRACE_PROCESSOR_WORKER_IMPL_H_ +#endif // SRC_BIGTRACE_WORKER_IMPL_H_ diff --git a/tools/gen_bazel b/tools/gen_bazel index 9585bb4ccb..5429026881 100755 --- a/tools/gen_bazel +++ b/tools/gen_bazel @@ -76,7 +76,7 @@ public_targets = [ # exported publicly. default_targets = [ '//src/base:perfetto_base_default_platform', - '//src/cloud_trace_processor:cloud_trace_processor', + '//src/bigtrace:bigtrace', '//src/ipc:perfetto_ipc', '//src/ipc/protoc_plugin:ipc_plugin', '//src/protozero:protozero', @@ -90,7 +90,7 @@ default_targets = [ # Proto targets are required by internal build rules but don't need to be # exported publicly. proto_default_targets = [ - '//protos/perfetto/cloud_trace_processor:lite' + '//protos/perfetto/bigtrace:lite' ] # Proto target groups which will be made public.