Closed Bug 1470938 Opened 2 years ago Closed 2 years ago

toolkit/components/telemetry/Telemetry.cpp:110:27: error: 'mozilla::Telemetry::CombinedStacks ' has not been declared

Categories

(Toolkit :: Telemetry, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox-esr52 --- unaffected
firefox-esr60 --- unaffected
firefox60 --- unaffected
firefox61 --- unaffected
firefox62 --- fixed
firefox63 --- fixed

People

(Reporter: jbeich, Assigned: jbeich)

References

Details

(Keywords: regression)

Attachments

(1 file)

$ c++ -v
FreeBSD clang version 6.0.0 (tags/RELEASE_600/final 326565) (based on LLVM 6.0.0)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin

$ ./mach bootstrap
$ ./mach build
[...]
toolkit/components/telemetry/Telemetry.cpp:110:27: error: no member named 'CombinedStacks' in
      namespace 'mozilla::Telemetry'
using mozilla::Telemetry::CombinedStacks;
      ~~~~~~~~~~~~~~~~~~~~^
toolkit/components/telemetry/Telemetry.cpp:204:3: error: unknown type name 'CombinedStacks'
  CombinedStacks mLateWritesStacks; // This is collected out of the main thread.
  ^
toolkit/components/telemetry/Telemetry.cpp:496:3: error: no matching function for call to
      'UnregisterWeakMemoryReporter'
  UnregisterWeakMemoryReporter(this);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsIMemoryReporter.h:538:21: note: candidate
      function not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to
      'nsIMemoryReporter *' for 1st argument
XPCOM_API(nsresult) UnregisterWeakMemoryReporter(nsIMemoryReporter* aReporter);
                    ^
toolkit/components/telemetry/Telemetry.cpp:505:3: error: no matching function for call to
      'RegisterWeakMemoryReporter'
  RegisterWeakMemoryReporter(this);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsIMemoryReporter.h:533:21: note: candidate
      function not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to
      'nsIMemoryReporter *' for 1st argument
XPCOM_API(nsresult) RegisterWeakMemoryReporter(nsIMemoryReporter* aReporter);
                    ^
toolkit/components/telemetry/Telemetry.cpp:1013:5: error: unknown type name 'CombinedStacks'
    CombinedStacks empty;
    ^
toolkit/components/telemetry/Telemetry.cpp:1141:26: error: no viable conversion from
      '(anonymous namespace)::TelemetryImpl *' to 'nsCOMPtr<nsITelemetry>'
  nsCOMPtr<nsITelemetry> ret = sTelemetry;
                         ^     ~~~~~~~~~~
objdir/dist/include/nsCOMPtr.h:455:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to 'decltype(nullptr)'
      (aka 'nullptr_t') for 1st argument
  MOZ_IMPLICIT nsCOMPtr(decltype(nullptr))
               ^
objdir/dist/include/nsCOMPtr.h:462:3: note: candidate constructor not
      viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to
      'const nsCOMPtr<nsITelemetry> &' for 1st argument
  nsCOMPtr(const nsCOMPtr<T>& aSmartPtr)
  ^
objdir/dist/include/nsCOMPtr.h:472:3: note: candidate constructor not
      viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to 'nsCOMPtr<nsITelemetry> &&' for
      1st argument
  nsCOMPtr(nsCOMPtr<T>&& aSmartPtr)
  ^
objdir/dist/include/nsCOMPtr.h:481:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to 'nsITelemetry *' for 1st
      argument
  MOZ_IMPLICIT nsCOMPtr(T* aRawPtr)
               ^
objdir/dist/include/nsCOMPtr.h:492:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to
      'already_AddRefed<nsITelemetry> &' for 1st argument
  MOZ_IMPLICIT nsCOMPtr(already_AddRefed<T>& aSmartPtr)
               ^
objdir/dist/include/nsCOMPtr.h:501:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to
      'already_AddRefed<nsITelemetry> &&' for 1st argument
  MOZ_IMPLICIT nsCOMPtr(already_AddRefed<T>&& aSmartPtr)
               ^
objdir/dist/include/nsCOMPtr.h:536:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to 'const nsQueryInterface'
      for 1st argument
  MOZ_IMPLICIT nsCOMPtr(const nsQueryInterface aQI)
               ^
objdir/dist/include/nsCOMPtr.h:545:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to
      'const nsQueryInterfaceWithError &' for 1st argument
  MOZ_IMPLICIT nsCOMPtr(const nsQueryInterfaceWithError& aQI)
               ^
objdir/dist/include/nsCOMPtr.h:554:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to 'const nsGetServiceByCID'
      for 1st argument
  MOZ_IMPLICIT nsCOMPtr(const nsGetServiceByCID aGS)
               ^
objdir/dist/include/nsCOMPtr.h:563:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to
      'const nsGetServiceByCIDWithError &' for 1st argument
  MOZ_IMPLICIT nsCOMPtr(const nsGetServiceByCIDWithError& aGS)
               ^
objdir/dist/include/nsCOMPtr.h:572:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to
      'const nsGetServiceByContractID' for 1st argument
  MOZ_IMPLICIT nsCOMPtr(const nsGetServiceByContractID aGS)
               ^
objdir/dist/include/nsCOMPtr.h:581:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to 'const
      nsGetServiceByContractIDWithError &' for 1st argument
  MOZ_IMPLICIT nsCOMPtr(const nsGetServiceByContractIDWithError& aGS)
               ^
objdir/dist/include/nsCOMPtr.h:590:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to 'const nsQueryReferent &'
      for 1st argument
  MOZ_IMPLICIT nsCOMPtr(const nsQueryReferent& aQueryReferent)
               ^
objdir/dist/include/nsCOMPtr.h:600:16: note: candidate constructor
      not viable: no known conversion from '(anonymous namespace)::TelemetryImpl *' to 'const nsCOMPtr_helper &'
      for 1st argument
  MOZ_IMPLICIT nsCOMPtr(const nsCOMPtr_helper& aHelper)
               ^
objdir/dist/include/nsCOMPtr.h:511:16: note: candidate template
      ignored: could not match 'already_AddRefed<type-parameter-0-0>' against
      '(anonymous namespace)::TelemetryImpl *'
  MOZ_IMPLICIT nsCOMPtr(already_AddRefed<U>& aSmartPtr)
               ^
objdir/dist/include/nsCOMPtr.h:524:16: note: candidate template
      ignored: could not match 'already_AddRefed<type-parameter-0-0>' against
      '(anonymous namespace)::TelemetryImpl *'
  MOZ_IMPLICIT nsCOMPtr(already_AddRefed<U>&& aSmartPtr)
               ^
objdir/dist/include/nsCOMPtr.h:611:16: note: candidate template
      ignored: could not match 'OwningNonNull<type-parameter-0-0>' against
      '(anonymous namespace)::TelemetryImpl *'
  MOZ_IMPLICIT nsCOMPtr(const mozilla::OwningNonNull<U>& aOther);
               ^
toolkit/components/telemetry/Telemetry.cpp:1509:1: error: static_cast from
      '(anonymous namespace)::TelemetryImpl *' to 'nsITelemetry *', which are not related by inheritance, is not
      allowed
NS_IMPL_ISUPPORTS(TelemetryImpl, nsITelemetry, nsIMemoryReporter)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1223:3: note: expanded from
      macro 'NS_IMPL_ISUPPORTS'
  NS_IMPL_QUERY_INTERFACE(aClass, __VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1113:3: note: expanded from
      macro 'NS_IMPL_QUERY_INTERFACE'
  NS_INTERFACE_TABLE(aClass, __VA_ARGS__)                                     \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1101:18: note: expanded from
      macro 'NS_INTERFACE_TABLE'
    MOZ_FOR_EACH(NS_INTERFACE_TABLE_ENTRY, (aClass,), (__VA_ARGS__))          \
    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
objdir/dist/include/mozilla/MacroForEach.h:68:5: note: expanded from
      macro 'MOZ_FOR_EACH_HELPER'
    aMacro, \
    ^~~~~~~~~
objdir/dist/include/mozilla/MacroForEach.h:65:40: note: expanded from
      macro 'MOZ_FOR_EACH_HELPER_GLUE'
#define MOZ_FOR_EACH_HELPER_GLUE(a, b) a b
                                       ^~~
objdir/dist/include/nsISupportsImpl.h:925:25: note: expanded from
      macro 'NS_INTERFACE_TABLE_ENTRY'
                        static_cast<_interface*>((_class*) 0x1000)) -         \
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/components/telemetry/Telemetry.cpp:1509:1: error: static_cast from
      '(anonymous namespace)::TelemetryImpl *' to 'nsIMemoryReporter *', which are not related by inheritance, is
      not allowed
NS_IMPL_ISUPPORTS(TelemetryImpl, nsITelemetry, nsIMemoryReporter)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1223:3: note: expanded from
      macro 'NS_IMPL_ISUPPORTS'
  NS_IMPL_QUERY_INTERFACE(aClass, __VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1113:3: note: expanded from
      macro 'NS_IMPL_QUERY_INTERFACE'
  NS_INTERFACE_TABLE(aClass, __VA_ARGS__)                                     \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1101:18: note: expanded from
      macro 'NS_INTERFACE_TABLE'
    MOZ_FOR_EACH(NS_INTERFACE_TABLE_ENTRY, (aClass,), (__VA_ARGS__))          \
    ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
objdir/dist/include/mozilla/MacroForEach.h:68:5: note: expanded from
      macro 'MOZ_FOR_EACH_HELPER'
    aMacro, \
    ^~~~~~~~~
objdir/dist/include/mozilla/MacroForEach.h:65:40: note: expanded from
      macro 'MOZ_FOR_EACH_HELPER_GLUE'
#define MOZ_FOR_EACH_HELPER_GLUE(a, b) a b
                                       ^~~
objdir/dist/include/nsISupportsImpl.h:925:25: note: expanded from
      macro 'NS_INTERFACE_TABLE_ENTRY'
                        static_cast<_interface*>((_class*) 0x1000)) -         \
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/components/telemetry/Telemetry.cpp:1509:1: error: static_cast from
      '(anonymous namespace)::TelemetryImpl *' to 'nsITelemetry *', which are not related by inheritance, is not
      allowed
NS_IMPL_ISUPPORTS(TelemetryImpl, nsITelemetry, nsIMemoryReporter)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1223:3: note: expanded from
      macro 'NS_IMPL_ISUPPORTS'
  NS_IMPL_QUERY_INTERFACE(aClass, __VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1113:3: note: expanded from
      macro 'NS_IMPL_QUERY_INTERFACE'
  NS_INTERFACE_TABLE(aClass, __VA_ARGS__)                                     \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1102:5: note: expanded from
      macro 'NS_INTERFACE_TABLE'
    NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS(aClass, nsISupports,                   \
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:933:40: note: expanded from
      macro 'NS_INTERFACE_TABLE_ENTRY_AMBIGUOUS'
                                       static_cast<_implClass*>(              \
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/components/telemetry/Telemetry.cpp:1509:1: error: invalid application of 'sizeof' to
      an incomplete type 'const QITableEntry []'
NS_IMPL_ISUPPORTS(TelemetryImpl, nsITelemetry, nsIMemoryReporter)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1223:3: note: expanded from
      macro 'NS_IMPL_ISUPPORTS'
  NS_IMPL_QUERY_INTERFACE(aClass, __VA_ARGS__)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1113:3: note: expanded from
      macro 'NS_IMPL_QUERY_INTERFACE'
  NS_INTERFACE_TABLE(aClass, __VA_ARGS__)                                     \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:1104:3: note: expanded from
      macro 'NS_INTERFACE_TABLE'
  NS_INTERFACE_TABLE_END
  ^~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:951:3: note: expanded from
      macro 'NS_INTERFACE_TABLE_END'
  NS_INTERFACE_TABLE_END_WITH_PTR(this)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
objdir/dist/include/nsISupportsImpl.h:946:24: note: expanded from
      macro 'NS_INTERFACE_TABLE_END_WITH_PTR'
  static_assert((sizeof(table)/sizeof(table[0])) > 1, "need at least 1 interface"); \
                       ^~~~~~~
toolkit/components/telemetry/Telemetry.cpp:204:18: error: private field 'mLateWritesStacks'
      is not used [-Werror,-Wunused-private-field]
  CombinedStacks mLateWritesStacks; // This is collected out of the main thread.
                 ^
11 errors generated.
Forgot to copy-paste rationale:

On Tier3 platforms without GeckoProfiler (Linux powerpc/sparc/s390x, BSDs, Solaris) the build is broken because CombinedStacks.h isn't explicitly included but was bootlegged via HangReports.h before bug 1448040. To reproduce on Tier1 platforms before bug 1371159 is fixed one has to force `return None` in gecko_profiler().

https://hg.mozilla.org/mozilla-central/rev/167d3bf700d3#l17.19
https://searchfox.org/mozilla-central/rev/39b790b29543/toolkit/components/telemetry/KeyedStackCapturer.h#13
https://searchfox.org/mozilla-central/rev/39b790b29543/toolkit/moz.configure#25-31
Component: General → Telemetry
Product: Core → Toolkit
Comment on attachment 8987566 [details]
Bug 1470938 - Unbreak build without GeckoProfiler after bug 1448040.

https://reviewboard.mozilla.org/r/252810/#review259296

Woops! Sorry about the breakage. Looks good to me.
Attachment #8987566 - Flags: review?(dothayer) → review+
Keywords: checkin-needed
Comment on attachment 8987566 [details]
Bug 1470938 - Unbreak build without GeckoProfiler after bug 1448040.

In case Nightly switches to 63.0a1 before this bug lands. Cancel otherwise.

GeckoProfiler (previously, knows as SPS) bustage is impossible to work around downstream. While bug 1403868 alleviated some bustage there're still no tests on TaskCluster.

Approval Request Comment
[Feature/Bug causing the regression]: bug 1448040
[User impact if declined]: Broken build on most Tier3 platforms.
[Is this code covered by automated tests?]: Yes
[Has the fix been verified in Nightly?]: Locally while Nightly was still at 62.0a1
[Needs manual test from QE? If yes, steps to reproduce]: No
[List of other uplifts needed for the feature/fix]: None
[Is the change risky?]: No
[Why is the change risky/not risky?]: Can only break build due to typos. Telemetry.cpp includes KeyedStackCapturer.h which already includes CombinedStacks.h
[String changes made/needed]: None
Attachment #8987566 - Flags: approval-mozilla-beta?
Pushed by nbeleuzu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/55b38951516f
Unbreak build without GeckoProfiler after bug 1448040. r=dthayer
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/55b38951516f
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Assignee: nobody → jbeich
Comment on attachment 8987566 [details]
Bug 1470938 - Unbreak build without GeckoProfiler after bug 1448040.

Trivial build bustage fix. Approved for 62.0b4.
Attachment #8987566 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.