Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
431 changes: 0 additions & 431 deletions Android.bp

Large diffs are not rendered by default.

345 changes: 0 additions & 345 deletions BUILD

Large diffs are not rendered by default.

22 changes: 7 additions & 15 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,14 @@ if (enable_perfetto_trace_processor) {
}

if (enable_perfetto_traceconv) {
all_targets += [
"src/traceconv",
"src/proto_utils",
]
# The standalone traceconv host binary has been folded into
# trace_processor_shell (the convert/bundle/util subcommands), so it is no
# longer built here. The src/traceconv:lib conversion code is pulled in
# directly by the shell, and the UI's traceconv WASM module is built via
# ui/BUILD.gn.
all_targets += [ "src/proto_utils" ]
if (is_cross_compiling) {
# In many cross-compilation scenarios (typically Android) developers expect
# the host version of traceconv to be available somewhere in out/, so
# they can convert Android traces on their dev machine. Also
# tools/gen_android_bp explicitly depends on the host version for the
# cc_binary_host("traceconv") target in Android.bp.
# Note that when cross-compiling the host executable will be available in
# out/xxx/gcc_like_host/traceconv NOT just out/xxx/traceconv.
all_targets += [
"src/traceconv($host_toolchain)",
"src/proto_utils($host_toolchain)",
]
all_targets += [ "src/proto_utils($host_toolchain)" ]
}
}

Expand Down
2 changes: 2 additions & 0 deletions gn/perfetto_integrationtests.gni
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ if (enable_perfetto_trace_processor && perfetto_build_standalone &&
!is_android) {
perfetto_integrationtests_targets +=
[ "src/trace_processor:integrationtests" ]
perfetto_integrationtests_targets +=
[ "src/trace_processor/shell:integrationtests" ]
perfetto_integrationtests_targets += [ "src/traceconv:integrationtests" ]
perfetto_integrationtests_data_targets +=
[ "protos/perfetto/trace:test_extensions_slim_descriptor" ]
Expand Down
17 changes: 0 additions & 17 deletions include/perfetto/ext/traceconv/BUILD.gn

This file was deleted.

28 changes: 0 additions & 28 deletions include/perfetto/ext/traceconv/traceconv.h

This file was deleted.

3 changes: 0 additions & 3 deletions infra/luci/recipes/perfetto.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@
{
'name': 'trace_processor_shell'
},
{
'name': 'traceconv',
},
{
'name': 'tracebox',
'exclude_platforms': ['windows-amd64']
Expand Down
17 changes: 17 additions & 0 deletions src/trace_processor/shell/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,20 @@ source_set("unittests") {
"../../base",
]
}

if (enable_perfetto_integration_tests) {
source_set("integrationtests") {
testonly = true
sources = [ "bundle_integrationtest.cc" ]
deps = [
"..:trace_processor_shell_lib",
"../../../gn:default_deps",
"../../../gn:gtest_and_gmock",
"../../../include/perfetto/ext/base",
"../../../include/perfetto/ext/trace_processor:trace_processor_shell",
"../../../protos/perfetto/trace:cpp",
"../../../protos/perfetto/trace/profiling:cpp",
"../../base:test_support",
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include "perfetto/ext/traceconv/traceconv.h"
#include "perfetto/ext/trace_processor/trace_processor_shell.h"

#include <cstdlib>
#include <cstring>
Expand All @@ -31,12 +31,13 @@
#include "src/base/test/utils.h"
#include "test/gtest_and_gmock.h"

namespace perfetto::traceconv {
namespace perfetto::trace_processor {
namespace {

using testing::UnorderedElementsAre;

// Helper: builds an argv from owned strings and invokes TraceconvMain.
// Helper: builds an argv from owned strings and invokes the shell's `bundle`
// subcommand via TraceProcessorShellMain.
class ArgvInvoker {
public:
void Add(const std::string& arg) { args_.push_back(arg); }
Expand All @@ -45,7 +46,7 @@ class ArgvInvoker {
for (auto& s : args_) {
argv.push_back(s.data());
}
return TraceconvMain(static_cast<int>(argv.size()), argv.data());
return TraceProcessorShellMain(static_cast<int>(argv.size()), argv.data());
}

private:
Expand Down Expand Up @@ -131,7 +132,7 @@ TEST_F(TraceconvBundleTest, BundleWithProguardMap) {
" void bar() -> b\n");

ArgvInvoker invoker;
invoker.Add("traceconv");
invoker.Add("trace_processor_shell");
invoker.Add("bundle");
invoker.Add("--no-auto-symbol-paths");
invoker.Add("--proguard-map");
Expand Down Expand Up @@ -176,7 +177,7 @@ TEST_F(TraceconvBundleTest, BundleWithRepeatedProguardMaps) {
base::TempFile map2 = WriteTempFile("com.example.Bar -> b.b:\n");

ArgvInvoker invoker;
invoker.Add("traceconv");
invoker.Add("trace_processor_shell");
invoker.Add("bundle");
invoker.Add("--no-auto-symbol-paths");
invoker.Add("--proguard-map");
Expand All @@ -200,7 +201,7 @@ TEST_F(TraceconvBundleTest, BundleWithProguardMapNoPackage) {
base::TempFile mapping = WriteTempFile("com.example.Foo -> a.a:\n");

ArgvInvoker invoker;
invoker.Add("traceconv");
invoker.Add("trace_processor_shell");
invoker.Add("bundle");
invoker.Add("--no-auto-symbol-paths");
invoker.Add("--proguard-map");
Expand All @@ -224,7 +225,7 @@ TEST_F(TraceconvBundleTest, BundleWithProguardMapNoPackage) {
// Explicit --proguard-map pointing at a missing file must fail the command.
TEST_F(TraceconvBundleTest, BundleWithMissingProguardMapFails) {
ArgvInvoker invoker;
invoker.Add("traceconv");
invoker.Add("trace_processor_shell");
invoker.Add("bundle");
invoker.Add("--no-auto-symbol-paths");
invoker.Add("--proguard-map");
Expand All @@ -238,7 +239,7 @@ TEST_F(TraceconvBundleTest, BundleWithMissingProguardMapFails) {
// --proguard-map with no following argument is a usage error.
TEST_F(TraceconvBundleTest, BundleProguardMapMissingArgFails) {
ArgvInvoker invoker;
invoker.Add("traceconv");
invoker.Add("trace_processor_shell");
invoker.Add("bundle");
invoker.Add("--proguard-map");

Expand All @@ -253,7 +254,7 @@ TEST_F(TraceconvBundleTest, BundleNoAutoProguardMapsWithExplicit) {
base::TempFile mapping = WriteTempFile("com.example.Foo -> a.a:\n");

ArgvInvoker invoker;
invoker.Add("traceconv");
invoker.Add("trace_processor_shell");
invoker.Add("bundle");
invoker.Add("--no-auto-symbol-paths");
invoker.Add("--no-auto-proguard-maps");
Expand All @@ -271,4 +272,4 @@ TEST_F(TraceconvBundleTest, BundleNoAutoProguardMapsWithExplicit) {
}

} // namespace
} // namespace perfetto::traceconv
} // namespace perfetto::trace_processor
43 changes: 11 additions & 32 deletions src/traceconv/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,11 @@ import("../../gn/perfetto_host_executable.gni")
import("../../gn/test.gni")
import("../../gn/wasm.gni")

executable("traceconv") {
testonly = true
deps = [
":main",
"../../gn:default_deps",
]
}
# NOTE: there is no longer a standalone "traceconv" executable. The host CLI is
# now trace_processor_shell (the convert/bundle/util subcommands, plus
# traceconv-name compatibility), and the conversion implementation below
# (":lib") is linked directly by the shell. The only artifact still built from
# this directory is the UI's "traceconv" WASM module (wasm_lib below).

source_set("utils") {
deps = [
Expand Down Expand Up @@ -119,28 +117,6 @@ source_set("lib") {
]
}

source_set("main") {
deps = [
":traceconv_lib",
"../../gn:default_deps",
]
sources = [ "main.cc" ]
}

source_set("traceconv_lib") {
deps = [
":gen_cc_android_extension_descriptor",
":gen_cc_trace_descriptor",
":lib",
"../../gn:default_deps",
"../../include/perfetto/ext/base:base",
"../base:version",
"../protozero/text_to_proto",
]
public_deps = [ "../../include/perfetto/ext/traceconv:traceconv" ]
sources = [ "traceconv.cc" ]
}

if (enable_perfetto_ui) {
wasm_lib("traceconv_wasm") {
name = "traceconv"
Expand All @@ -149,9 +125,14 @@ if (enable_perfetto_ui) {
enable_web_environment = true
enable_filesystem = true
deps = [
":main",
":gen_cc_android_extension_descriptor",
":gen_cc_trace_descriptor",
":lib",
"../../gn:default_deps",
"../../include/perfetto/ext/base:base",
"../protozero/text_to_proto",
]
sources = [ "wasm_main.cc" ]
}
}

Expand All @@ -170,7 +151,6 @@ if (enable_perfetto_integration_tests) {
testonly = true
deps = [
":lib",
":traceconv_lib",
"../../gn:default_deps",
"../../gn:gtest_and_gmock",
"../../include/perfetto/base",
Expand All @@ -186,7 +166,6 @@ if (enable_perfetto_integration_tests) {
"pprof_reader.h",
"trace_to_pprof_integrationtest.cc",
"trace_to_text_integrationtest.cc",
"traceconv_bundle_integrationtest.cc",
]
}
}
21 changes: 0 additions & 21 deletions src/traceconv/main.cc

This file was deleted.

Loading
Loading