Index: sys/cddl/dev/fbt/fbt.c =================================================================== --- sys/cddl/dev/fbt/fbt.c +++ sys/cddl/dev/fbt/fbt.c @@ -171,6 +171,21 @@ return (1); #endif +#if defined(__riscv) + /* + * Some assembly-language exception handlers are not suitable for + * instrumentation. + */ + if (strcmp(name, "cpu_exception_handler") == 0) + return (1); + if (strcmp(name, "cpu_exception_handler_user") == 0) + return (1); + if (strcmp(name, "cpu_exception_handler_supervisor") == 0) + return (1); + if (strcmp(name, "do_trap_supervisor") == 0) + return (1); +#endif + /* * When DTrace is built into the kernel we need to exclude * the FBT functions from instrumentation.