Closed Bug 1107330 Opened 10 years ago Closed 9 years ago

DMD reports generated by |get_about_memory.py| cannot be parsed by |dmd.py|

Categories

(Core :: DMD, defect)

All
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: erahm, Unassigned)

Details

Attachments

(1 file)

It looks like we put some process info at the beginning of the file that causes json parsing to fail. Manually removing the info fixes this issue. Either we should update dmd.py to skip the header, or we should remove the header from the generated report files.

Example header:
> # Processed DMD output
> # Created on Wed Dec  3 16:32:05 2014, device time (may be unreliable).
> # Processed on Wed Dec  3 16:33:30 2014, host machine time.
> # Corresponds to "myapp" app, pid 6082
> #
> # Contents of b2g-procrank:
> #
> #    APPLICATION        PID       Vss      Rss      Pss      Uss  cmdline
> #    b2g               2474   208792K   89220K   65958K   58652K  /system/b2g/b2g
> #    Built-in Keyboa   2869    85164K   36108K   19667K   15360K  /system/b2g/plugin-container
> #    Homescreen        2554    89968K   34112K   16863K   14176K  /system/b2g/b2g
> #    Browser           5589    80888K   32612K   15235K   12520K  /system/b2g/b2g
> #    Smart Collectio   2979    74820K   29288K   12845K   10320K  /system/b2g/b2g
> #    Bookmarks Reade   5972    75412K   25580K    9615K    7328K  /system/b2g/b2g
> #    (Preallocated a   6250    67832K   21820K    7998K    6076K  /system/b2g/b2g
> #    (Nuwa)            2483    60852K   15252K    4455K    2792K  /system/b2g/b2g
> #    ------   ------  ------
> #    288383K  252184K  TOTAL
> #    
>
>
I see two options: (a) remove the procrank info, or (b) put it in a separate file. The latter is probably better, because it's useful to be able to see which pid corresponds to which app.
(In reply to Nicholas Nethercote [:njn] from comment #1)
> I see two options: (a) remove the procrank info, or (b) put it in a separate
> file. The latter is probably better, because it's useful to be able to see
> which pid corresponds to which app.

We already store it in a separate file, removing the header should be fine.
Attachment #8536234 - Flags: review?(erahm) → review+
erahm, I've updated the patch in GitHub. Can you please land it for me? Thank you.
Flags: needinfo?(erahm)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: