apply this diff for test purposes diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index d68af4ea4d51..21afbaa95822 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -978,6 +978,43 @@ struct chroot_args { char *path; }; #endif + + + +volatile int chuq_notailcalls; + +void +chuq_f3(void); +void +chuq_f2(void); +void +chuq_f1(void); + +int chuq_spin = 1; + +__noinline void +chuq_f3(void) +{ + int i; + + for (i = 0; i < chuq_spin; i++) + chuq_notailcalls++; +} + +__noinline void +chuq_f2(void) +{ + chuq_f3(); + chuq_notailcalls++; +} + +__noinline void +chuq_f1(void) +{ + chuq_f2(); + chuq_notailcalls++; +} + int sys_chroot(struct thread *td, struct chroot_args *uap) { @@ -985,6 +1022,7 @@ sys_chroot(struct thread *td, struct chroot_args *uap) struct proc *p; int error; + chuq_f1(); error = priv_check(td, PRIV_VFS_CHROOT); if (error != 0) { p = td->td_proc; dtrace -n 'fbt::chuq_f3:entry { stack(); }' existing value #define FBT_AFRAMES 3 CPU ID FUNCTION:NAME 3 55035 chuq_f3:entry kernel`chuq_f2+0x9 kernel`sys_chroot+0x1f kernel`amd64_syscall+0x109 kernel`0xffffffff8100b21b test value to see how many dtrace frames show up #define FBT_AFRAMES 0 CPU ID FUNCTION:NAME 3 55035 chuq_f3:entry kernel`chuq_f2+0x9 dtrace.ko`dtrace_invop+0x4c dtrace.ko`dtrace_invop_callsite kernel`chuq_f1+0x9 kernel`sys_chroot+0x1f kernel`amd64_syscall+0x109 kernel`0xffffffff8100b21b correct value #define FBT_AFRAMES 2 CPU ID FUNCTION:NAME 3 55035 chuq_f3:entry kernel`chuq_f2+0x9 kernel`chuq_f1+0x9 kernel`sys_chroot+0x1f kernel`amd64_syscall+0x109 kernel`0xffffffff8100b21b
Details
Details
- Reviewers
markj - Commits
- rG90951695207f: fbt/x86: update FBT_AFRAMES to match the trap handlers
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 51431 Build 48322: arc lint + arc unit