New issue
Advanced search Search tips

Issue 863831 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 16
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

kInvalidFields in perfetto don't work with jumbo builds

Project Member Reported by primiano@chromium.org, Jul 16

Issue description

From bratell@:
The most important restriction in jumbo builds is that a code symbol needs  
to be unique within the build target, and perfetto's generated protobuf  
source has a lot of different constants, all named kInvalidField, all  
being the same afaict. I have not investigated this at all, but I wonder  
if if would be possible to give them unique names or merge them or  
something?

This is not high priority, but if it's easy, it would be appreciated. And  
what is the appropriate place to track requests like this?


FAILED: obj/third_party/perfetto/protos/perfetto/trace/ftrace/zero/zero_jumbo_1.o 
../../third_party/llvm-build-no-asserts/Release+No+Asserts/bin/clang++ -MMD -MF obj/third_party/perfetto/protos/perfetto/trace/ftrace/zero/zero_jumbo_1.o.d -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCOMPONENT_BUILD -DCR_LIBCXX_REVISION=332543 -DCR_LIBCXXABI_REVISION=331450 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_GLIBCXX_DEBUG=1 -DPERFETTO_IMPLEMENTATION -DPERFETTO_SHARED_LIBRARY -DPERFETTO_BUILD_WITH_CHROMIUM -I. -I../.. -Igen -I../../third_party/protobuf/src -Igen/protoc_out -Igen/third_party/perfetto/protos -I../../third_party/perfetto -I../../third_party/perfetto/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -B../../third_party/binutils/Linux_x64/Release/bin -pthread -fcolor-diagnostics -fmerge-all-constants -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 -no-canonical-prefixes -fcomplete-member-pointers -m64 -march=x86-64 -Wall -Werror -Wextra -Wimplicit-fallthrough -Wthread-safety -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-address-of-packed-member -Wno-nonportable-include-path -Wno-user-defined-warnings -Wno-unused-lambda-capture -Wno-null-pointer-arithmetic -Wno-enum-compare-switch -Wno-ignored-pragma-optimize -O0 -fno-omit-frame-pointer -g2 -gsplit-dwarf -ggnu-pubnames -fvisibility=hidden -Xclang -load -Xclang ../../third_party/llvm-build-no-asserts/Release+No+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang enforce-in-thirdparty-webkit -Xclang -plugin-arg-find-bad-constructs -Xclang check-enum-max-value -Xclang -plugin-arg-find-bad-constructs -Xclang check-ipc -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -std=gnu++14 -fno-exceptions -fno-rtti -nostdinc++ -isystem../../buildtools/third_party/libc++/trunk/include -isystem../../buildtools/third_party/libc++abi/trunk/include -fvisibility-inlines-hidden -c gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc -o obj/third_party/perfetto/protos/perfetto/trace/ftrace/zero/zero_jumbo_1.o
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:6:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event_bundle.pbzero.cc:7:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:7:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_stats.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:8:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/test_bundle_wrapper.pbzero.cc:7:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:9:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/print.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:10:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/sched_switch.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:11:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpufreq_interactive_already.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:12:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpufreq_interactive_boost.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:13:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpufreq_interactive_notyet.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:14:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpufreq_interactive_setspeed.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:15:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpufreq_interactive_target.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:16:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpufreq_interactive_unboost.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:17:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpu_frequency.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:18:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpu_frequency_limits.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:19:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/cpu_idle.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:20:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/clock_enable.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:21:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/clock_disable.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:22:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/clock_set_rate.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:23:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/sched_wakeup.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
In file included from gen/third_party/perfetto/protos/perfetto/trace/ftrace/zero_jumbo_1.cc:24:
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/sched_blocked_reason.pbzero.cc:6:50: error: redefinition of 'kInvalidField'
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
./gen/third_party/perfetto/protos/perfetto/trace/ftrace/ftrace_event.pbzero.cc:266:50: note: previous definition is here
  static const ::protozero::ProtoFieldDescriptor kInvalidField = {"", ::protozero::ProtoFieldDescriptor::Type::TYPE_INVALID, 0, false};
                                                 ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[10 processes, 36/3094 @ 15.5/s : 2.319s ] CXX obj/components/autofill/content/common/mojo_interfaces/mojo_interfaces_jumbo_1.o^C
ninja: build stopped: interrupted by user.
 
Bratell can you plz check if https://android-review.googlesource.com/c/platform/external/perfetto/+/717724 fixes that?
You need to cherry-pick it like this:

$ cd third_party/perfetto
$ git fetch https://android.googlesource.com/platform/external/perfetto refs/changes/24/717724/1
$ git cherry-pick FETCH_HEAD


Doh, should have seen this before the mail. I copied it by hand which took... minutes! But it seems to compile fine so I looks like a good patch.

(The header in the new file says 2017)

Sign in to add a comment