Closed Bug 1061800 Opened 10 years ago Closed 10 years ago

[b2g] Gecko Profiler should store the breakpad binary IDs for symbolication

Categories

(Firefox OS Graveyard :: General, defect, P1)

All
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: BenWa, Assigned: wcosta)

References

Details

Attachments

(1 file, 1 obsolete file)

It appears we properly archive the breakpad symbol data on symbolapi.mozilla.org . This symbol requires a the matching breakpad binary IDs/key to fetch these symbols. This hash should be unique for each build of each library. The profiler correctly computes and store the IDs for the windows library but is missing the implementation on other platforms.

If we implement this and match the breakpad ids well be able to symbolicate builds where the breakpad data is sent to symbolapi.mozilla.org.
Blocks: 1061801
Assignee: nobody → wcosta
Status: NEW → ASSIGNED
OS: Mac OS X → Linux
Priority: -- → P1
Hardware: x86 → All
By default, breakpad uses the build-id section for ids, if it isn't
found, it uses the .text section. On the later case, the stripped
libraries will have different ids from their non-stripped counterparts.

See Bug 1062459 for details.
Attachment #8486580 - Flags: review?(bgirard)
Comment on attachment 8486580 [details] [diff] [review]
Add breakpad ids to profiler in Linux. r=BenWa

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

We should document in the code why we're removing - and appending 0.
Attachment #8486580 - Flags: review?(bgirard) → review+
Attachment #8486580 - Attachment is obsolete: true
By default, breakpad uses the build-id section for ids, if it isn't
found, it uses the .text section. On the later case, the stripped
libraries will have different ids from their non-stripped counterparts.

See Bug 1062459 for details.
Attachment #8486727 - Flags: review?(bgirard)
(In reply to Benoit Girard (:BenWa) from comment #3)
> Comment on attachment 8486580 [details] [diff] [review]
> Add breakpad ids to profiler in Linux. r=BenWa
> 
> Review of attachment 8486580 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> We should document in the code why we're removing - and appending 0.

Ok, done.
Attachment #8486727 - Flags: review?(bgirard) → review+
Keywords: checkin-needed
Hi, could you provide a try link for this changes? thanks!
Keywords: checkin-needed
(In reply to Carsten Book [:Tomcat] from comment #6)
> Hi, could you provide a try link for this changes? thanks!

Here it is: https://tbpl.mozilla.org/?tree=Try&rev=9732a93e78c2
Comment on attachment 8486727 [details] [diff] [review]
Add breakpad ids to profiler in Linux. r=BenWa

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

::: tools/profiler/shared-libraries-linux.cc
@@ +35,5 @@
> +    // ConvertIdentifierToString converts the identifier to a string with
> +    // some dashes (don't ask me why), but we need it raw, so remove the dashes.
> +    char *id_end = remove(id_str, id_str + strlen(id_str), '-');
> +    // Also add an extra "0" by the end.  google-breakpad does it for
> +    // consistency with PDB files so we need to do too.

FWIW, if you wanted to patch Breakpad to make ConvertIdentifierToString do the right thing here I think we could take that. Seems silly that all the callers wind up stripping out the dashes and appending zero.
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #8)
> Comment on attachment 8486727 [details] [diff] [review]
> Add breakpad ids to profiler in Linux. r=BenWa
> 
> Review of attachment 8486727 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: tools/profiler/shared-libraries-linux.cc
> @@ +35,5 @@
> > +    // ConvertIdentifierToString converts the identifier to a string with
> > +    // some dashes (don't ask me why), but we need it raw, so remove the dashes.
> > +    char *id_end = remove(id_str, id_str + strlen(id_str), '-');
> > +    // Also add an extra "0" by the end.  google-breakpad does it for
> > +    // consistency with PDB files so we need to do too.
> 
> FWIW, if you wanted to patch Breakpad to make ConvertIdentifierToString do
> the right thing here I think we could take that. Seems silly that all the
> callers wind up stripping out the dashes and appending zero.

I take it after this patch lands.
(In reply to Carsten Book [:Tomcat] from comment #6)
> Hi, could you provide a try link for this changes? thanks!

Hi, is there anything else pending to land this patch?
Flags: needinfo?(cbook)
(In reply to Carsten Book [:Tomcat] from comment #11)
> https://hg.mozilla.org/integration/b2g-inbound/rev/83804f7688e7

Thanks :)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: needinfo?(cbook)
Resolution: --- → FIXED
(In reply to Wander Lairson Costa [:wcosta] from comment #12)
> (In reply to Carsten Book [:Tomcat] from comment #11)
> > https://hg.mozilla.org/integration/b2g-inbound/rev/83804f7688e7
> 
> Thanks :)

np :) bascially when we something is missing for check-in needed bugs (like missing try run or patch does not apply cleanly) we remove the checkin-needed keyword like in this case, so it was fallen under the radar when you posted the link to the try run :)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: