Closed Bug 799641 Opened 12 years ago Closed 3 years ago

Include io info in profiles

Categories

(Core :: Gecko Profiler, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: taras.mozilla, Unassigned)

References

(Blocks 2 open bugs)

Details

Windows, Linux and possibly others provide various ways to get amount of io done by process. Would be good to poll that during profiling and show an icon if a threshold is exceeded. See http://mxr.mozilla.org/mozilla-central/source/toolkit/components/telemetry/TelemetryPing.js#192 for an example of doing it via Windows API. On linux you can count page-faults(getrusage) and read amount of io via some /proc file(lame I know).
We've discussed ways to include extra data in the profiler data with Benoit during the snappy work week, and there are a bunch of data points i'm planning to add, page faults being one of them. As said on irc, for b2g/android, the /proc info is useless because they are block i/o, and yaffs (the filesystem most commonly used on android devices) doesn't do block i/o. There are much better APIs in linux to get more interesting i/o info, but they require accounting flags that are usually not enabled on android phones.
I've been contemplating having a dynamic library that is crafted to interpose interesting function using LD_PRELOAD. We could have the extension force firefox to restart with this library preloaded. We could use it to intercept interesting IO function.
You can't intercept mmap induced i/o, and intercepting read/write doesn't give you any clue as to whether the I/O is actually hurting or not (if you open()/read()/close() the same thing twice in a row, the second time doesn't hit storage)
(In reply to Mike Hommey [:glandium] from comment #3) > You can't intercept mmap induced i/o, and intercepting read/write doesn't > give you any clue as to whether the I/O is actually hurting or not (if you > open()/read()/close() the same thing twice in a row, the second time doesn't > hit storage) we can track mmap costs on moz side(it's restricted to zip stuff and some js loading stuff). Timing io calls would still be handy
Blocks: 1329137

We now capture a lot of IO operations, through both low-level interceptions, and higher-level labels&markers (e.g., DLL loads).
So I'll mark this bug fixed.

If more is needed, please file more focused bugs blocking bug 1527023.

Blocks: 1527023
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.