git: 36a9ce874b59 - main - dtrace: correct the aframes value for fbt provider
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 12 Jan 2023 15:06:56 UTC
The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=36a9ce874b5988dc8615a4b1b3fb41eb9e06051d commit 36a9ce874b5988dc8615a4b1b3fb41eb9e06051d Author: Mitchell Horne <mhorne@FreeBSD.org> AuthorDate: 2023-01-11 18:06:24 +0000 Commit: Mitchell Horne <mhorne@FreeBSD.org> CommitDate: 2023-01-12 15:06:07 +0000 dtrace: correct the aframes value for fbt provider Set the number of artificial frames to 5: 1. cpu_exception_handler_supervisor() 2. do_trap_supervisor() 3. dtrace_invop_start() 4. dtrace_invop() 5. fbt_invop() Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37663 --- sys/cddl/dev/fbt/riscv/fbt_isa.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/cddl/dev/fbt/riscv/fbt_isa.c b/sys/cddl/dev/fbt/riscv/fbt_isa.c index a67e83811d9e..baf268028988 100644 --- a/sys/cddl/dev/fbt/riscv/fbt_isa.c +++ b/sys/cddl/dev/fbt/riscv/fbt_isa.c @@ -45,6 +45,7 @@ #define FBT_PATCHVAL MATCH_EBREAK #define FBT_ENTRY "entry" #define FBT_RETURN "return" +#define FBT_AFRAMES 5 int fbt_invop(uintptr_t addr, struct trapframe *frame, uintptr_t rval) @@ -196,7 +197,7 @@ fbt_provide_module_function(linker_file_t lf, int symindx, fbt = malloc(sizeof (fbt_probe_t), M_FBT, M_WAITOK | M_ZERO); fbt->fbtp_name = name; fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_ENTRY, 3, fbt); + name, FBT_ENTRY, FBT_AFRAMES, fbt); fbt->fbtp_patchpoint = instr; fbt->fbtp_ctl = lf; fbt->fbtp_loadcnt = lf->loadcnt; @@ -239,7 +240,7 @@ again: fbt->fbtp_name = name; if (retfbt == NULL) { fbt->fbtp_id = dtrace_probe_create(fbt_id, modname, - name, FBT_RETURN, 3, fbt); + name, FBT_RETURN, FBT_AFRAMES, fbt); } else { retfbt->fbtp_probenext = fbt; fbt->fbtp_id = retfbt->fbtp_id;