Closed
Bug 791357
Opened 12 years ago
Closed 3 years ago
Detect whether the target thread has pending IOs
Categories
(Core :: Gecko Profiler, enhancement, P3)
Tracking
()
RESOLVED
FIXED
People
(Reporter: ehsan.akhgari, Unassigned)
References
(Blocks 1 open bug)
Details
It would be useful to know whether the unresponsive times in a thread happened because the thread was running code or because it was blocked on something. Without this it's impossible to say for sure whether something was computationally expensive or just took a long time because it was page faulting all the time let's say.
One crude way to detect that would be to compare the program counter to the previous value and see if the thread is making any progress. Can you guys think of better ways of doing this?
Comment 2•12 years ago
|
||
What APIs can we use for each platform? I'm interested to see what data we could get.
Comment 3•12 years ago
|
||
FWIW, I tried various things to try to detect when the profiled thread is waiting for the kernel on linux/android, but didn't seem to get any reliable information. On desktop linux, we can use I/O accounting information, but that usually isn't available on mobile devices (both android and b2g). On Windows, there are APIs to get some interesting counters, too, and I seem to remember there is something for OSX too.
Comment 4•12 years ago
|
||
What's the API on mac? I can have a shot at implementing it there to prototype the feature. Most profiles we get directly from users come from windows/mac so getting it there would be a good start.
Reporter | ||
Comment 5•12 years ago
|
||
GetThreadIOPendingFlag on Windows might be interesting to look into.
Comment 6•11 years ago
|
||
I'm leaving this thread open to mean finding a way that doesn't require instrumenting. Bug 963158 solved this problem by instrumenting the blocking call site and thus not requiring any native APIs. Native APIs would likely be preferred so we may still want to do this.
Depends on: 963158
The original bug title (Detect whether the target thread has been running) and description have effectively been fixed recently, thanks to the addition of CPU measurements.
But the following discussion is more about detecting whether IOs are pending, which I think would be an interesting kind of data to capture if possible.
Blocks: 1329137
Severity: normal → N/A
Status: NEW → RESOLVED
Type: defect → enhancement
Closed: 3 years ago
Priority: -- → P3
Resolution: --- → FIXED
Summary: Detect whether the target thread has been running → Detect whether the target thread has pending IOs
You need to log in
before you can comment on or make changes to this bug.
Description
•