Fix Profiler on Linux

RESOLVED FIXED in mozilla12

Status

()

Core
Gecko Profiler
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: BenWa, Assigned: BenWa)

Tracking

unspecified
mozilla12
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
Created attachment 588192 [details] [diff] [review]
patch

A few bugs where preventing the profiling from working on linux, this patch fixes this.
(Assignee)

Updated

5 years ago
Attachment #588192 - Flags: review?(ehsan)
Attachment #588192 - Flags: review?(ehsan) → review+
(Assignee)

Comment 1

5 years ago
mcote, this will fix the problem you saw today.
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/2cc49e58c516
(Assignee)

Updated

5 years ago
Blocks: 713227
https://hg.mozilla.org/mozilla-central/rev/2cc49e58c516
Assignee: nobody → bgirard
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Created attachment 588667 [details] [diff] [review]
Include sps_sampler.h if __linux__, not XP_UNIX

Erm... XP_UNIX is defined on the BSDs, so now the build fails with missing symbols.

../../dist/bin/libxul.so.1.0: undefined reference to `mozilla_sampler_stop()'
../../dist/bin/libxul.so.1.0: undefined reference to `stack_key_initialized'
../../dist/bin/libxul.so.1.0: undefined reference to `mozilla_sampler_start(int, int, char const**, unsigned int)'
../../dist/bin/libxul.so.1.0: undefined reference to `mozilla_sampler_get_features()'
../../dist/bin/libxul.so.1.0: undefined reference to `mozilla_sampler_is_active()'
../../dist/bin/libxul.so.1.0: undefined reference to `mozilla_sampler_init()'
../../dist/bin/libxul.so.1.0: undefined reference to `mozilla_sampler_responsiveness(mozilla::TimeStamp)'
../../dist/bin/libxul.so.1.0: undefined reference to `pkey_stack'
../../dist/bin/libxul.so.1.0: undefined reference to `mozilla_sampler_get_profile()'
../../dist/bin/libxul.so.1.0: undefined reference to `mozilla_sampler_get_responsiveness()'

It seems better to use __linux__, or maybe XP_LINUX should be propagated as said in xpcom/base/Makefile.in#52. At least it fixes the build on OpenBSD, and i've sent the proposed fix to try in https://tbpl.mozilla.org/?tree=Try&usebuildbot=1&rev=70e335493537
Attachment #588667 - Flags: review?(Ms2ger)
Comment on attachment 588667 [details] [diff] [review]
Include sps_sampler.h if __linux__, not XP_UNIX

Reassigning..
Attachment #588667 - Flags: review?(Ms2ger) → review?(bgirard)
(Assignee)

Updated

5 years ago
Attachment #588667 - Flags: review?(bgirard) → review+
Keywords: checkin-needed
(Assignee)

Comment 6

5 years ago
Thanks for the fix!
https://hg.mozilla.org/integration/mozilla-inbound/rev/cfd6e9dbc379
Keywords: checkin-needed
I believe the convention is to not resolve the bug as fixed until it's landed on m-c.

Anyhow, it has now merged there:
https://hg.mozilla.org/mozilla-central/rev/cfd6e9dbc379
(Assignee)

Updated

4 years ago
Component: General → Gecko Profiler
You need to log in before you can comment on or make changes to this bug.