: Improved 'NMI' oprofile profiling support.
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | : sparc64: Add interface for registering a performancearch/ arch/ arch/ | +67 | 0 replies | |
| 2/6 | : sparc64: Make %pil level 15 a pseudo-NMI.arch/ arch/ arch/ +9 more | +46 | 0 replies | |
| 3/6 | : sparc64: Make special trap return path for TRAP_NMI().arch/ arch/ | +14 | 0 replies | |
| 4/6 | : sparc64: Block NMIs in critical section of contextarch/ | +2 | 0 replies | |
| 5/6 | : sparc64: Add write_pic() helper.arch/ | +5 | 0 replies | |
| 6/6 | : sparc64: Use NMI oprofile profiling on cheetah andarch/ | +109 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/6]: Improved 'NMI' oprofile profiling support.
Basically what happens right now on sparc64 with oprofile is that as soon as a code path turns off cpu interrupts (by writing 15 into the %pil register) nothing in that code block can take profiling hits since we use the simple timer interrupt for oprofile support.
These next 6 patches do a few things to improve that situation:
1) We run the kernel at %pil 0 and 14 normally. This turns %pil level 15 into a pseudo-NMI for profiling.
2) An interface is created to register handlers for the level 15 interrupt, for profiling counter overflows on cpus that have it. (Basically, UltraSPARC-III and later)
3) Finally, for now on only UltraSPARC-III and derivative chips, we use the profiling counters as a 'nmi' timer for oprofile.
As a result, when this stuff is enabled, code sequences run with interrupts disabled are profiled fully. This gets us on-par with x86 which has had a real hardware NMI profiling handler forever.
I'll add sun4v cpu support for this in a bit. The code is simple, I just want to test it properly.
All of this code is commited to sparc-next-2.6