Closed Bug 1378312 Opened 7 years ago Closed 7 years ago

objdir/dist/include/ProfilerMarkerPayload.h:103:15: error: private field 'mCategory' is not used [-Werror,-Wunused-private-field]

Categories

(Core :: Gecko Profiler, defect, P3)

Unspecified
FreeBSD
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox-esr52 --- unaffected
firefox55 --- unaffected
firefox56 --- wontfix
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: jbeich, Unassigned)

References

Details

(Keywords: regression)

Attachments

(1 file)

On platforms without GeckoProfiler (iOS, Linux non-x86, BSDs, Solaris) build has new warnings that if appeared on treeherder would break build.

$ echo "ac_add_options --enable-warnings-as-errors" >>.mozconfig # mimic MOZ_AUTOMATION
$ ./mach build
[...]
In file included from objdir/xpcom/base/Unified_cpp_xpcom_base0.cpp:29:
In file included from xpcom/base/CycleCollectedJSRuntime.cpp:88:
objdir/dist/include/ProfilerMarkerPayload.h:103:15: error: private field 'mCategory' is not
      used [-Werror,-Wunused-private-field]
  const char *mCategory;
              ^
objdir/dist/include/ProfilerMarkerPayload.h:104:15: error: private field 'mKind' is not used
      [-Werror,-Wunused-private-field]
  TracingKind mKind;
              ^
objdir/dist/include/ProfilerMarkerPayload.h:124:15: error: private field 'mSource' is not
      used [-Werror,-Wunused-private-field]
  const char* mSource;
              ^
objdir/dist/include/ProfilerMarkerPayload.h:143:12: error: private field 'mPhase' is not used
      [-Werror,-Wunused-private-field]
  uint16_t mPhase;
           ^
objdir/dist/include/ProfilerMarkerPayload.h:168:15: error: private field 'mEntryType' is not
      used [-Werror,-Wunused-private-field]
  const char* mEntryType;
              ^
objdir/dist/include/ProfilerMarkerPayload.h:188:27: error: private field 'mLayer' is not used
      [-Werror,-Wunused-private-field]
  mozilla::layers::Layer* mLayer;
                          ^
objdir/dist/include/ProfilerMarkerPayload.h:228:12: error: private field 'mGpuTimeStart' is
      not used [-Werror,-Wunused-private-field]
  uint64_t mGpuTimeStart;
           ^
objdir/dist/include/ProfilerMarkerPayload.h:229:12: error: private field 'mGpuTimeEnd' is not
      used [-Werror,-Wunused-private-field]
  uint64_t mGpuTimeEnd;
           ^
8 errors generated.
> ... if appeared on treeherder ...

For one, as part of bug 1371159.
Blocks: buildwarning
Oops, this is not an old warning but just a regression.
No longer blocks: buildwarning
Comment on attachment 8885004 [details]
Bug 1378312 - Unbreak --enable-warnings-as-errors without GeckoProfiler after bug 1375776.

https://reviewboard.mozilla.org/r/155826/#review161012

In my opinion, building with --enable-warnings-as-errors on non-Tier-1 platforms and off CI is not particularly useful.

But if you think it's important, I'll allow it. However, it's not clear to me why the compiler isn't complaining some of these fields, such as IOMarkerPaylod::mFilename, DOMEventMarkerPayload::mType, etc. Please move these into the MOZ_GECKO_PROFILER blocks if that's possible.
Attachment #8885004 - Flags: review?(n.nethercote)
Comment on attachment 8885004 [details]
Bug 1378312 - Unbreak --enable-warnings-as-errors without GeckoProfiler after bug 1375776.

https://reviewboard.mozilla.org/r/155826/#review161038

::: tools/profiler/public/ProfilerMarkerPayload.h:291
(Diff revision 2)
>                         const mozilla::TimeStamp& aEndTime,
>                         JS::UniqueChars&& aTimingJSON)
> -   : ProfilerMarkerPayload(aStartTime, aEndTime),
> -     mTimingJSON(mozilla::Move(aTimingJSON))
> +   : ProfilerMarkerPayload(aStartTime, aEndTime)
> +#ifdef MOZ_GECKO_PROFILER
> +   , mTimingJSON(mozilla::Move(aTimingJSON))
> +#endif

Will aTimingJSON be freed here when the profiler is disabled? r=me if that's the case.
Attachment #8885004 - Flags: review?(n.nethercote) → review+
Priority: -- → P3
ProfilerMarkerPayload.h is no longer used on Tier3 platforms.
https://hg.mozilla.org/mozilla-central/diff/672b02d86007/tools/profiler/moz.build
Status: NEW → RESOLVED
Closed: 7 years ago
Depends on: 1403868
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: