Open Bug 1379286 Opened 7 years ago Updated 2 years ago

Use a kernel driver for profiling on Windows

Categories

(Core :: Gecko Profiler, enhancement, P2)

enhancement

Tracking

()

Performance Impact none
Tracking Status
firefox57 --- wontfix

People

(Reporter: jrmuizel, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: perf)

It should be possible for us to get better profiling results on Windows using a kernel driver for the following reasons:
1. We can have a single piece of code profiling multiple processes instead of one profiler thread per process.
2. Profiling should be lower overhead because we don't need to switch threads
3. We can profile at a higher frequency than 1ms (probably using a performance counter interrupt on the 'UnHalted Core Cycles' or 'UnHalted Reference Cycles' counters)
4. We can get kernel stacks
5. We can performance counter information.

Here are some resources and notes that will be helpful for implementing such a tool:

https://github.com/ipkn/wdd (prototype of an rr tool for windows (has a driver that interacts with the )
https://github.com/GPUOpen-Tools/CxlCommon/blob/master/Src/WinDriverStackWalker/ (the kernel space stack walker used by CodeXL)
https://github.com/jrmuizel/KStack (a simple kernel space stack walker)
https://github.com/opcm/pcm

Some notes on trying to use performance counters:
http://hypervsir.blogspot.ca/2014/11/anybody-knows-how-to-legitimately.html
Blocks: 1382150
Whiteboard: [qf:p2]
Priority: -- → P2
Keywords: perf
Whiteboard: [qf:p2] → [qf:p3]
Performance Impact: --- → P3
Whiteboard: [qf:p3]

This might not be needed anymore because we can use the ETW converter for 8000Hz sampling.

Performance Impact: P3 → -
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.