Dump the length of strings in JS_GetTraceThingInfo

RESOLVED FIXED in Firefox 25, Firefox OS v1.1hd

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mccr8, Assigned: Justin Lebar (not reading bugmail))

Tracking

(Blocks: 1 bug)

Trunk
mozilla25
Points:
---

Firefox Tracking Flags

(blocking-b2g:leo+, firefox23 wontfix, firefox24 wontfix, firefox25 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 wontfix, b2g-v1.1hd fixed)

Details

(Whiteboard: [MemShrink:P2][LeoVB+])

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
A common problem in B2G is leaking giant strings, but the existing DumpHeapComplete truncates the strings, so it can be hard to tell what is a long string, so we could just dump the length as well.
(Reporter)

Updated

5 years ago
Whiteboard: [MemShrink]
(Reporter)

Comment 1

5 years ago
We could do this only when a string was of a certain length, or when it was going to be truncated.
Summary: Dump the length of strings in DumpHeapComplete → Dump the length of strings in JS_GetTraceThingInfo
(Assignee)

Updated

5 years ago
Assignee: general → justin.lebar+bug
Whiteboard: [MemShrink] → [MemShrink:P2]
(Assignee)

Comment 2

5 years ago
Created attachment 773053 [details] [diff] [review]
Patch, v1
Attachment #773053 - Flags: review?(n.nethercote)
(Assignee)

Comment 3

5 years ago
The function to count the number of decimal digits in a number would probably be /much/ faster as a series of if statements.  But I figured that was a premature optimization.
Comment on attachment 773053 [details] [diff] [review]
Patch, v1

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

::: js/src/jsapi.cpp
@@ +2446,5 @@
> +    size_t numDigits = 0;
> +    do {
> +        num /= 10;
> +        numDigits++;
> +    } while(num > 0);

Space between |while| and |(|.
Attachment #773053 - Flags: review?(n.nethercote) → review+
https://hg.mozilla.org/mozilla-central/rev/8aeb99497de3
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla25

Comment 7

5 years ago
This will aide in debugging b2g failures.
blocking-b2g: --- → leo+
https://hg.mozilla.org/releases/mozilla-b2g18/rev/c014cfa75fac
status-b2g18: --- → fixed
status-b2g18-v1.0.0: --- → wontfix
status-b2g18-v1.0.1: --- → wontfix
status-b2g-v1.1hd: --- → affected
status-firefox23: --- → wontfix
status-firefox24: --- → wontfix
status-firefox25: --- → fixed

Updated

5 years ago
Whiteboard: [MemShrink:P2] → [MemShrink:P2][LeoVB+]
You need to log in before you can comment on or make changes to this bug.