Last Comment Bug 717769 - Fix Profiler on Linux
: Fix Profiler on Linux
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Gecko Profiler (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla12
Assigned To: Benoit Girard (:BenWa)
:
Mentors:
Depends on:
Blocks: 713227
  Show dependency treegraph
 
Reported: 2012-01-12 14:47 PST by Benoit Girard (:BenWa)
Modified: 2013-06-05 09:15 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (1.58 KB, patch)
2012-01-12 14:47 PST, Benoit Girard (:BenWa)
ehsan: review+
Details | Diff | Splinter Review
Include sps_sampler.h if __linux__, not XP_UNIX (947 bytes, patch)
2012-01-14 10:58 PST, Landry Breuil (:gaston)
bgirard: review+
Details | Diff | Splinter Review

Description Benoit Girard (:BenWa) 2012-01-12 14:47:01 PST
Created attachment 588192 [details] [diff] [review]
patch

A few bugs where preventing the profiling from working on linux, this patch fixes this.
Comment 1 Benoit Girard (:BenWa) 2012-01-12 15:08:16 PST
mcote, this will fix the problem you saw today.
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2012-01-13 03:01:57 PST
https://hg.mozilla.org/mozilla-central/rev/2cc49e58c516
Comment 4 Landry Breuil (:gaston) 2012-01-14 10:58:29 PST
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
Comment 5 Landry Breuil (:gaston) 2012-01-14 11:01:06 PST
Comment on attachment 588667 [details] [diff] [review]
Include sps_sampler.h if __linux__, not XP_UNIX

Reassigning..
Comment 6 Benoit Girard (:BenWa) 2012-01-14 12:35:08 PST
Thanks for the fix!
https://hg.mozilla.org/integration/mozilla-inbound/rev/cfd6e9dbc379
Comment 7 Jonathan Kew (:jfkthame) 2012-01-16 04:52:08 PST
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

Note You need to log in before you can comment on or make changes to this bug.