Open
Bug 691309
Opened 13 years ago
Updated 2 years ago
Monitor all main thread IO
Categories
(Core :: General, defect)
Core
General
Tracking
()
NEW
People
(Reporter: Yoric, Unassigned)
Details
(Keywords: main-thread-io, perf, Whiteboard: [mobilestartupshrink])
Attachments
(1 file)
5.24 KB,
patch
|
Details | Diff | Splinter Review |
We are not the only ones hunting down I/O in the main thread. Android offers a developer tool to monitor I/O happening in the main thread and, essentially, kill off applications that have any: http://www.talkandroid.com/23545-strict-mode-in-android-2-3-gingerbread-helps-developers-make-better-leaner-apps/
I do not think we have anything quite equivalent for Mozilla, although perhaps Instruments or XPerf can do something related. I am wondering if we could add a build mode that provides the same kind of feature.
Updated•13 years ago
|
Component: File Handling → General
QA Contact: file-handling → general
Reporter | ||
Updated•13 years ago
|
Keywords: main-thread-io
Reporter | ||
Comment 1•13 years ago
|
||
Attaching a small utility patch that makes any PRLog launched from the main thread easier to filter out.
Reporter | ||
Comment 2•12 years ago
|
||
With the profiler, we now have ways to do this by instrumenting low-level functions performing main thread IO.
So this bug is now about instrumenting all low-level IO functions with SAMPLE_LABEL("IO", "FunctionName"). This will let us find all main thread IO by just filtering upon "IO::" in Cleopatra.
More info about SAMPLE_LABEL: https://developer.mozilla.org/en-US/docs/Performance/Profiling_with_the_Built-in_Profiler#Pseudostack
And a few examples: http://dxr.mozilla.org/search.cgi?tree=mozilla-central&string=SAMPLE_LABEL
Summary: startup perf- Investigate "IO strict mode" main thread → Monitor all main thread IO
Whiteboard: mobilestartupshrink → [mentor=Yoric][lang=c++][mobilestartupshrink]
Reporter | ||
Comment 3•12 years ago
|
||
We can start by labelling as IO:
- the relevant methods of nsLocalFileUnix, nsLocalFileWin;
- the relevant functions of sqlite.
Or we can try and locate all Posix and Win32 IO functions.
Reporter | ||
Comment 5•12 years ago
|
||
Actually, BenWa has advanced a lot on the more general question of monitoring I/O since the bug was filed. BenWa, can Richard help you at this stage?
Flags: needinfo?(bgirard)
Comment 6•12 years ago
|
||
We talked about this during the snappy work week:
- Profile can highlight IO functions. This will find slow IO calls but the probability of it being missed decreases as the runtime for the IO is less then the sampling interval.
- We plan on intercepting certain Gecko IO calls that will cover most IO calls in practice. We will instrument the code to repo this to the profiler and telemetry.
Nathan what are the calls we are interested in watching?
Flags: needinfo?(bgirard) → needinfo?(nfroyd)
Comment 7•12 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #6)
> Nathan what are the calls we are interested in watching?
We were planning on watching:
- Wrapper functions in storage/src/TelemetryVFS.cpp;
- Calls made by OS.File;
- Calls made by NSPR (PR_Read/PR_Write/etc.).
Those three categories might not catch everything, but they ought to catch the majority of interesting cases.
Flags: needinfo?(nfroyd)
Reporter | ||
Comment 8•12 years ago
|
||
Fwiw, barring any bug, OS.File should not be able to do main thread I/O, so they might not need watching – at least on the main thread.
Reporter | ||
Comment 9•11 years ago
|
||
Richard, if you are still interested in this bug, you should synchronize with BenWa and froydnj over irc.
Flags: needinfo?(richard)
Reporter | ||
Updated•11 years ago
|
Whiteboard: [mentor=Yoric][lang=c++][mobilestartupshrink] → [mobilestartupshrink]
Comment 10•11 years ago
|
||
Unfortunately i won't be able to look at this anymore.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•