Skip to content

Commit d963767

Browse files
qipengzhanashif
authored andcommitted
arch: x86: add irq runtime statistics
Unlike tracing module mainly for debug usage, this is to allow runtime profiling IRQ performance data, and target to enable it in product release since platform can choose to make it work with low weight protocol. Enable this option and implement runtime_irq_stats() in platform code, such as Intel ISH platform implement with SHMI protocol to allow host profiling irq stats. Signed-off-by: Qipeng Zha <[email protected]>
1 parent f5830f3 commit d963767

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

arch/x86/core/Kconfig.ia32

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,11 @@ config X86_MFENCE_INSTRUCTION_SUPPORTED
185185
Set n to disable the use of MFENCE instruction in arch_dcache_flush()
186186
for X86 CPUs have CLFLUSH instruction but no MFENCE
187187

188+
config X86_RUNTIME_IRQ_STATS
189+
bool
190+
help
191+
Add irq runtime statistics to allow runtime profiling irq performance
192+
data with Host tools, enable this and implement platform dependent API
193+
runtime_irq_stats().
194+
188195
endif # !X86_64

arch/x86/core/ia32/intstub.S

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,16 @@ alreadyOnIntStack:
180180
popl %eax
181181
#endif
182182

183+
#if defined(CONFIG_X86_RUNTIME_IRQ_STATS)
184+
/*
185+
* The runtime_irq_stats() function should be implemented
186+
* by platform with this config.
187+
*/
188+
pushl %eax
189+
call runtime_irq_stats
190+
popl %eax
191+
#endif
192+
183193
xorl %eax, %eax
184194
#if defined(CONFIG_X2APIC)
185195
xorl %edx, %edx

0 commit comments

Comments
 (0)