ftrace
is used for function tracing of kernel. Now how does it work for interrupts. Can it track kernel functions in interrupt mode. If so can you explain how it works. I am trying to write a function that tracks function calls and it works fine in Supervisor mode but does not work in interrupt mode (goes into loop). I need to make it work in IRQ mode.
相关问题
- Kernel oops Oops: 80000005 on arm embedded system
- Avoid cmake to add the flags -search_paths_first a
- Linux kernel behaviour on heap overrun or stack ov
- AOSP Build TARGET_PRODUCT fails
- Where is the standard kernel libraries to let kern
相关文章
- Enable dynamic debug for multiple files at boot
- socket() returns 0 in C client server application
- Difference in ABI between x86_64 Linux functions a
- Why are i2c_smbus function not available? (I2C – E
- Why are there no debug symbols in my vmlinux when
- Problem with time() function in embedded applicati
- ccflag option in Makefile
- A HR timers precision study case
As in Linux kernel ARM exception stack init details, the amount of IRQ stack used by Linux is minimal. ARM has several banked registers including
lr
andsp
for the IRQ modes. In the Linux ARM kernel, these registers are used only briefly to transfer information to the supervisor (8K) stack. This supervisor stack is allocate per kernel process and also contain a task context block with pointers to the memory manager, scheduler and file system information.So in Linux, the supervisor stack has the stack information for all modes, including FIQ, IRQ, undefined instruction, data and instruction faults. This means only one stack needs to be traced. Special information (pseudo assembler) is included in entry-armv.S, such as
UNWIND(.fnend)
andENDPROC(__irq_usr)
which annotate the kernel with ELF information to create unwind tables that allow the stack tracing code to understand the layout of data on the stack.Vector page mapping in ARM Linux has some additional details such as the
vector_name
assembler macro which does the stack/mode switching. Thevector_name
assembler macro is the only code that actually executes in IRQ mode.irq_usr
andirq_svc
execute in supervisor mode, with the supervisor stack.