Closed Bug 875821 Opened 9 years ago Closed 9 years ago

Improve APKOpen.cpp message about library loading timing

Categories

(Core :: mozglue, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla24

People

(Reporter: glandium, Assigned: glandium)

Details

Attachments

(1 file)

"E/GeckoLibLoad(24452): Loaded libs in 732696ms total, 430ms user, 180ms system, 0 faults"

This is most likely 732ms, or 732696µs.
The error is in line 183 of the file APKOpen.cpp but sadly I don't know C++ (so its quite possible I'm looking at the wrong thing) and neither do I know how to reproduce this bug or I'd take a stab at it.
(In reply to Nicolas Carlo from comment #1)
> The error is in line 183 of the file APKOpen.cpp but sadly I don't know C++
> (so its quite possible I'm looking at the wrong thing) and neither do I know
> how to reproduce this bug or I'd take a stab at it.

You need to connect to an android device with usb debugging and do adb logcat, observing GeckoLibLoad entries occuring during Firefox startup. Alternatively, android applications such as aLogcat allow to display logcat on the device itself without usb debugging.
As it turns out I want to add some information to this message, I'm going to take this bug and morph it for my purpose.
Assignee: nobody → mh+mozilla
Summary: APKOpen.cpp message about library loading timing displays microseconds as milliseconds → Improve APKOpen.cpp message about library loading timing
Whiteboard: [good first bug][mentor=glandium][lang=C++]
Before:
Loaded libs in 1341682ms total, 398ms user, 128ms system, 55 faults

After:
Loaded libs in 1341ms total, 398ms(766ms) user, 128ms(218ms) system, 55(67) faults

t1 and t0 turned into nanoseconds in bug 793735, which broke the calculation done for the message and turned it from ms to µs.

As I've been reminded while debugging bug 874708, library loading is not happening on the main thread, and the java side is doing stuff at the same time, too. While this is less of a problem on multi-core devices, it definitely is on single-core devices, and it's better to know how much time library loading is delayed because of other threads activity (although that doesn't account for i/o)
Attachment #754091 - Flags: review?(bugmail.mozilla)
Comment on attachment 754091 [details] [diff] [review]
Fix library loading time message and add process usage on top of thread usage

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

LGTM
Attachment #754091 - Flags: review?(bugmail.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/eb6cd5c88fc7
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla24
You need to log in before you can comment on or make changes to this bug.