Skip to content

Commit

Permalink
perfetto: rename CTP -> BigTrace
Browse files Browse the repository at this point in the history
Change-Id: I2ef60f966ca9996a4c18b53f0e14d6e6eb1d3971
Bug: 278208757
  • Loading branch information
LalitMaganti committed Sep 25, 2023
1 parent 43ee4b9 commit 7e5f68c
Show file tree
Hide file tree
Showing 21 changed files with 141 additions and 141 deletions.
54 changes: 27 additions & 27 deletions Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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: [
".",
Expand Down Expand Up @@ -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",
],
}

Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
50 changes: 25 additions & 25 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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",
],
)

Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}

Expand Down
4 changes: 2 additions & 2 deletions gn/perfetto.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion gn/perfetto_unittests.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <functional>
#include <memory>
Expand All @@ -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
Expand All @@ -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_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <vector>
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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_
Original file line number Diff line number Diff line change
Expand Up @@ -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 <memory>
#include <vector>
Expand All @@ -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<Worker> CreateInProcesss(base::TaskRunner*,
CtpEnvironment*,
Environment*,
base::ThreadPool*);

// Synchronize the state of the traces in the worker to the orchestrator.
Expand All @@ -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_
Loading

0 comments on commit 7e5f68c

Please sign in to comment.