Closed Bug 735422 Opened 12 years ago Closed 12 years ago

Compilation on Linux ARM is broken


(Firefox Build System :: General, defect)

Not set


(Not tracked)



(Reporter: romaxa, Assigned: gaston)




(2 files, 1 obsolete file)

mozilla/Telemetry.h:47: fatal error: shared-libraries.h: No such file or directory
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.
Blocks: 712109
No longer blocks: 683229
Attached patch Possible fixSplinter Review
Assignee: nobody → romaxa
Attachment #605518 - Flags: review?(ehsan)
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.
Attachment #605518 - Flags: review?(ehsan) → review-
(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.
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
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 ?)
Assignee: romaxa → landry
Attachment #605816 - Flags: review?(mh+mozilla)
Attachment #605816 - Flags: review?(mh+mozilla) → review?(vdjeric)
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;
>   SharedLibraryInfo hangModuleMap;

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.
Attachment #605816 - Flags: review?(vdjeric) → review-
Sure, here you are..
Attachment #605816 - Attachment is obsolete: true
Attachment #605928 - Flags: review?(vdjeric)
Attachment #605928 - Flags: review?(vdjeric)
Attachment #605928 - Flags: review?(ehsan)
Attachment #605928 - Flags: review+
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.
Attachment #605928 - Flags: review?(ehsan) → review+
Blocks: 735861
Can we check it in?
Keywords: checkin-needed
Closed: 12 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.