Skip to content

RFC Kernel tracing thread flag

Mathieu Desnoyers lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest20 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20LTTng Kernel Trace Thread Flag Alphaarch/alpha/include/asm/thread_info.h+3 -10 replies
2/20LTTng Kernel Trace Thread Flag ARMarch/arm/include/asm/thread_info.h arch/arm/kernel/entry-common.S+5 -00 replies
3/20LTTng Kernel Trace Thread Flag AVR32arch/avr32/include/asm/thread_info.h+3 -10 replies
4/20LTTng Kernel Trace Thread Flag Blackfinarch/blackfin/include/asm/thread_info.h+3 -10 replies
5/20LTTng Kernel Trace Thread Flag Crisarch/cris/include/asm/thread_info.h+7 -20 replies
6/20LTTng Kernel Trace Thread Flag Frvarch/frv/include/asm/thread_info.h+3 -10 replies
7/20LTTng Kernel Trace Thread Flag H8300arch/h8300/include/asm/thread_info.h+3 -10 replies
8/20LTTng Kernel Trace Thread Flag ia64arch/ia64/include/asm/thread_info.h arch/ia64/kernel/entry.S+11 -50 replies
9/20LTTng Kernel Trace Thread Flag m32rarch/m32r/include/asm/thread_info.h+7 -20 replies
10/20LTTng Kernel Trace Thread Flag m68karch/m68k/include/asm/thread_info_mm.h arch/m68k/include/asm/thread_info_no.h+4 -10 replies
11/20LTTng Kernel Trace Thread Flag MIPSarch/mips/include/asm/thread_info.h arch/mips/kernel/entry.S+4 -20 replies
12/20LTTng Kernel Trace Thread Flag pariscarch/parisc/include/asm/thread_info.h+2 -00 replies
13/20LTTng Kernel Trace Thread Flag powerpcarch/powerpc/include/asm/thread_info.h+5 -30 replies
14/20LTTng Kernel Trace Thread Flag s390arch/s390/include/asm/thread_info.h arch/s390/kernel/entry.S arch/s390/kernel/entry64.S+18 -41 reply
15/20LTTng Kernel Trace Thread Flag SHarch/sh/include/asm/thread_info.h+7 -31 reply
16/20LTTng Kernel Trace Thread Flag sparcarch/sparc/include/asm/thread_info_32.h arch/sparc/include/asm/thread_info_64.h arch/sparc/kernel/entry.S+8 -50 replies
17/20LTTng Kernel Trace Thread Flag UMLarch/um/include/asm/thread_info.h+2 -00 replies
18/20LTTng Linux Kernel Trace Thread Flag x86arch/x86/include/asm/thread_info.h arch/x86/kernel/entry_64.S+18 -30 replies
19/20LTTng Kernel Trace Thread Flag xtensaarch/xtensa/include/asm/thread_info.h+3 -10 replies
20/20LTTng Kernel Trace Thread Flag APIinclude/linux/sched.h kernel/fork.c kernel/sched.c+67 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC patch 00/20] Kernel tracing thread flag

This is the generalisation of the TIF_SYSCALL_FTRACE thread flag for :

- multiple tracers (even accessible from modules)
- multiple architectures

It includes :

- Addition of the TIF_KERNEL_TRACE for all Linux architectures.
- Modification of some architecture entry*.S files to ensure that the thread flag is re-read upon syscall exit to ensure that syscall exit is traced. Basically, what I try to achieve here is to make sure that given the following sequence will get its syscall exit event traced :

- Thread preempted in a system call
- Activation of all TIF_KERNEL_TRACE thread flags
- ...enough time passes to expect that all tracing sites are activated...
- syscall exit -> expected to be traced

But if the thread flags used at syscall exit are the same that has been read at syscall entry, the event will be skipped. This does not permit reaching a known "quiescent state" where we know that all tracing sites are activated.

Note that having non-perfectly matched syscall trace entry/exit may have implications wrt getname/putname refcounting for instance, and could cause problems if getname/putname was used in the syscall entry/exit pairs. We will have to deal with this somehow when we face this problem. Keeping a per-thread flag saying that a matching syscall_entry tracing has been executed could fix this problem. We could even re-use TIF_SYSCALL_FTRACE for this specific purpose.

Mathieu

Signature · 2 lines
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68