Last Comment Bug 735422 - Compilation on Linux ARM is broken
: Compilation on Linux ARM is broken
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: ARM Linux
: -- normal (vote)
: mozilla14
Assigned To: Landry Breuil (:gaston)
:
: Gregory Szorc [:gps]
Mentors:
Depends on:
Blocks: 712109 735861
  Show dependency treegraph
 
Reported: 2012-03-13 13:26 PDT by Oleg Romashin (:romaxa)
Modified: 2012-03-15 08:26 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Possible fix (592 bytes, patch)
2012-03-13 13:34 PDT, Oleg Romashin (:romaxa)
mh+mozilla: review-
Details | Diff | Splinter Review
Dont use SharedLibraryInfo on platforms where sps is not enabled (6.46 KB, patch)
2012-03-14 10:01 PDT, Landry Breuil (:gaston)
vladan.bugzilla: review-
Details | Diff | Splinter Review
Dont use SharedLibraryInfo on platforms where sps is not enabled (6.92 KB, patch)
2012-03-14 13:37 PDT, Landry Breuil (:gaston)
vladan.bugzilla: review+
ehsan: review+
Details | Diff | Splinter Review

Description Oleg Romashin (:romaxa) 2012-03-13 13:26:06 PDT
mozilla/Telemetry.h:47: fatal error: shared-libraries.h: No such file or directory

http://mxr.mozilla.org/mozilla-central/source/configure.in#2177
here we have check for Linux/X86, and disable MOZ_ENABLE_PROFILER_SPS profiler for other Linux systems, like MAEMO (Linux/Arm)

and Telemetry.h does not have MOZ_ENABLE_PROFILER_SPS ifdefs.
Comment 1 Oleg Romashin (:romaxa) 2012-03-13 13:34:04 PDT
Created attachment 605518 [details] [diff] [review]
Possible fix
Comment 2 Mike Hommey [:glandium] 2012-03-14 02:14:44 PDT
Comment on attachment 605518 [details] [diff] [review]
Possible fix

This will merely hide the problem on linux arm. Having quickly taken a look at the sps code when i did that MOZ_ENABLE_PROFILER_SPS stuff, I'm afraid SPS doesn't actually work there, because it kind of relies on android == arm. So enabling it is not the right solution. The right solution is to make the telemetry stuff not use SPS when it's not enabled.
Comment 3 Mike Hommey [:glandium] 2012-03-14 02:15:24 PDT
(In reply to Mike Hommey [:glandium] from comment #2)
> Comment on attachment 605518 [details] [diff] [review]
> Possible fix
> 
> This will merely hide the problem on linux arm.

... and leave it for non x86, non arm linux.
Comment 4 Oleg Romashin (:romaxa) 2012-03-14 02:20:55 PDT
That was my first assumption, to cover Telemetry.h/cpp code with SPS ifdefs.. but later I got info that it probably easier fix compilation by adding define.. (at least it compiles and works)

but did not check profiler itself
Comment 5 Landry Breuil (:gaston) 2012-03-14 10:01:59 PDT
Created attachment 605816 [details] [diff] [review]
Dont use SharedLibraryInfo on platforms where sps is not enabled

This quick patch allows me to build m-c on OpenBSD, where SPS is not enabled. Note that it's a rather large hammer in some places, and i reused REPORT_CHROME_HANGS in xpcom/threads/HangMonitor.cpp (on an unrelated not, why does that file has windows-style line endings ?)
Comment 6 Vladan Djeric (:vladan) 2012-03-14 11:54:46 PDT
Comment on attachment 605816 [details] [diff] [review]
Dont use SharedLibraryInfo on platforms where sps is not enabled

>diff --git a/xpcom/threads/HangMonitor.cpp b/xpcom/threads/HangMonitor.cpp
>@@ -213,17 +213,19 @@ ThreadMain(void*)
>   Telemetry::HangStack hangStack;
>+#ifdef REPORT_CHROME_HANGS
>   SharedLibraryInfo hangModuleMap;
>+#endif

nitpick: put the ifdef around both declarations

Also, please modify the REPORT_CHROME_HANGS define in HangMonitor.cpp to be conditional on MOZ_ENABLE_PROFILER_SPS in addition to MOZ_PROFILING & XP_WIN.
Comment 7 Landry Breuil (:gaston) 2012-03-14 13:37:10 PDT
Created attachment 605928 [details] [diff] [review]
Dont use SharedLibraryInfo on platforms where sps is not enabled

Sure, here you are..
Comment 8 :Ehsan Akhgari 2012-03-14 15:08:02 PDT
Comment on attachment 605928 [details] [diff] [review]
Dont use SharedLibraryInfo on platforms where sps is not enabled

Review of attachment 605928 [details] [diff] [review]:
-----------------------------------------------------------------

::: xpcom/threads/HangMonitor.cpp
@@ +50,5 @@
>  #ifdef XP_WIN
>  #include <windows.h>
>  #endif
>  
> +#if defined(MOZ_ENABLE_PROFILER_SPS) && defined(MOZ_PROFILING) && defined(XP_WIN)

MOZ_ENABLE_PROFILER_SPS implies XP_WIN, but I assume that's fine.
Comment 9 Oleg Romashin (:romaxa) 2012-03-14 19:03:12 PDT
Can we check it in?
Comment 11 Marco Bonardo [::mak] 2012-03-15 08:26:22 PDT
https://hg.mozilla.org/mozilla-central/rev/f2c6c1e25b18

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