aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/dev/profile
Commit message (Collapse)AuthorAgeFilesLines
* machine/stdarg.h -> sys/stdarg.hBrooks Davis2025-06-111-1/+1
| | | | | | | | | | | | | Switch to using sys/stdarg.h for va_list type and va_* builtins. Make an attempt to insert the include in a sensible place. Where style(9) was followed this is easy, where it was ignored, aim for the first block of sys/*.h headers and don't get too fussy or try to fix other style bugs. Reviewed by: imp Exp-run by: antoine (PR 286274) Pull Request: https://github.com/freebsd/freebsd-src/pull/1595
* dtrace/profile: Stop storing the probe name in struct profile_probeMark Johnston2025-06-041-2/+0
| | | | | | | | | It's unused, and the naked strcpy() was susceptible to buffer overflow if one creates, say, a probe called "profile-2000000000ns". Reported by: CHERI MFC after: 1 week Sponsored by: Innovate UK
* dtrace/profile: Set t_dtrace_trapframe for profile probesMark Johnston2024-01-071-1/+6
| | | | | | | | | | profile provider probes fire in the context of a timer interrupt. Thus, the "regs" action can make use of the interrupt trap frame to get register values when the interrupt happened in kernel mode. Make that trap frame available when possible so that "regs" works more or less as it already does with the fbt and kinst providers. MFC after: 1 week
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* dtrace/powerpc: Adjust AFRAMES for fbt and profileJustin Hibbits2023-03-111-1/+1
| | | | | FBT_AFRAMES was skipping over too many frames, while PROFILE_AFRAMES was skipping over too few. Adjust them empirically.
* dtrace: correct profile aframes value for riscvMitchell Horne2023-01-121-2/+1
| | | | | | | | | | | Experimentation shows this is the correct value; the dtrace/interrupt handler frames are omitted, while the backtrace of the active thread is recorded in its entirety. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37662
* dtrace: kill mips definitions in profile providerMitchell Horne2023-01-121-12/+0
| | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D37660
* Adjust profile_unload() definition to avoid clang 15 warningDimitry Andric2022-07-191-1/+1
| | | | | | | | | | | | | | | With clang 15, the following -Werror warnings is produced: sys/cddl/dev/profile/profile.c:640:15: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] profile_unload() ^ void This is because profile_unload() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days
* dtrace: remove /dev/dtrace/profileChristos Margiolis2022-06-011-21/+0
| | | | | | | It is unused. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D35380
* Tune DTrace 'aframes' for the FBT and profile providers on arm64.Robert Watson2021-03-221-2/+1
| | | | | | | | | In both cases, too few frames were trimmed, leading to exception handling or DTrace internals being exposed in stack traces exposed by D's stack() primitive. MFC after: 3 days Reviewed by: emaste, andrew
* DTrace: remove sparc64 remnants in non-contrib codeEd Maste2021-03-221-17/+0
| | | | Sponsored by: The FreeBSD Foundation
* Merge OpenZFS support in to HEAD.Matt Macy2020-08-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort. I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak. Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream. Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression. Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872 Notes: svn path=/head/; revision=364746
* Mark more nodes as CTLFLAG_MPSAFE or CTLFLAG_NEEDGIANT (17 of many)Pawel Biernacki2020-02-261-1/+2
| | | | | | | | | | | | | | | | | | | r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are still not MPSAFE (or already are but aren’t properly marked). Use it in preparation for a general review of all nodes. This is non-functional change that adds annotations to SYSCTL_NODE and SYSCTL_PROC nodes using one of the soon-to-be-required flags. Mark all obvious cases as MPSAFE. All entries that haven't been marked as MPSAFE before are by default marked as NEEDGIANT Approved by: kib (mentor, blanket) Commented by: kib, gallatin, melifaro Differential Revision: https://reviews.freebsd.org/D23718 Notes: svn path=/head/; revision=358333
* Revert r326083, it doesn't behave as expected.Justin Hibbits2018-06-031-1/+1
| | | | | | | | | Even though there do appear to be more artificial frames, with 12, stack traces no longer list at all. Revert until a better, more stable value can be determined. Notes: svn path=/head/; revision=334550
* PowerPC has 12 artificial frames for the profilerJustin Hibbits2017-11-221-1/+1
| | | | | | | | | | It may need to be different between AIM and Book-E, this was tested only on Book-E (64- and 32-bit) MFC after: 3 weeks Notes: svn path=/head/; revision=326083
* Use C99 initializers for DTrace provider methods.Mark Johnston2017-09-271-10/+10
| | | | | | | | | This makes the definitions easier to read and more cscope-friendly. MFC after: 1 week Notes: svn path=/head/; revision=324066
* o Replace __riscv__ with __riscvRuslan Bukin2017-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Replace __riscv64 with (__riscv && __riscv_xlen == 64) This is required to support new GCC 7.1 compiler. This is compatible with current GCC 6.1 compiler. RISC-V is extensible ISA and the idea here is to have built-in define per each extension, so together with __riscv we will have some subset of these as well (depending on -march string passed to compiler): __riscv_compressed __riscv_atomic __riscv_mul __riscv_div __riscv_muldiv __riscv_fdiv __riscv_fsqrt __riscv_float_abi_soft __riscv_float_abi_single __riscv_float_abi_double __riscv_cmodel_medlow __riscv_cmodel_medany __riscv_cmodel_pic __riscv_xlen Reviewed by: ngie Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11901 Notes: svn path=/head/; revision=322168
* Ensure that profile and tick probes provide a non-zero PC value.Mark Johnston2017-05-151-36/+24
| | | | | | | | | | | | | | | | The idle thread may process callouts while reloading the timer in cpu_activeclock(). In this case, provide a representative value, &cpu_idle, instead of 0 for args[0] so that the active thread can be more easily identified from the probe. This addresses intermittent failures of the profile-n/tst.argtest.d test. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D10651 Notes: svn path=/head/; revision=318319
* Add initial DTrace support for RISC-V.Ruslan Bukin2016-05-241-0/+5
| | | | | | | | Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=300618
* Allow the artificial profile frames to be adjusted as needed by the user.Andrew Turner2015-12-051-6/+9
| | | | | | | | | | | While here update for armv6 to a tested value. Submitted by: Howard Su <howard0su@gmail.com> Reviewed by: stat Differential Revision: https://reviews.freebsd.org/D4315 Notes: svn path=/head/; revision=291855
* First cut of DTrace for AArch64.Ruslan Bukin2015-07-011-0/+5
| | | | | | | | | Reviewed by: andrew, emaste Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2738 Notes: svn path=/head/; revision=285009
* CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than tenJung-uk Kim2015-05-221-2/+2
| | | | | | | | | | | | | years for head. However, it is continuously misused as the mpsafe argument for callout_init(9). Deprecate the flag and clean up callout_init() calls to make them more consistent. Differential Revision: https://reviews.freebsd.org/D2613 Reviewed by: jhb MFC after: 2 weeks Notes: svn path=/head/; revision=283291
* Adjust PROF_ARTIFICIAL_FRAMES in the DTrace profile provider on ARM toRobert Watson2015-04-251-2/+4
| | | | | | | | | | | | | | skip 10, rather than 9, frames. This appears to work quite well in practice on the BeagleBone Black, so remove a comment about the value being bogus and replace it with a slightly less negative one. However, the number of frames to skip is quite sensitive to details of the timer and interrupt handling paths, so this is necessarily fragile -- but no more so than on x86. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=281983
* Replace the completely arbitrary '3' with '9' for the number of frames toRobert Watson2015-03-151-1/+1
| | | | | | | | | | | | | skip using the DTrace 'profile' provider on ARM. This causes stack traces to skip various driver-and callout-related things as they do on x86, where the likewise arbitrary values are '6' (32-bit) and '10' (64-bit) for similar sorts of reasons. MFC after: 3 days Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=280035
* Initial version of DTrace on ARM32.George V. Neville-Neil2015-02-101-0/+10
| | | | | | | | Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj Notes: svn path=/head/; revision=278529
* remove opensolaris cyclic code, replace with high-precision calloutsAndriy Gapon2014-12-071-10/+169
| | | | | | | | | | | | | | In the old days callout(9) had 1 tick precision and that was inadequate for some uses, e.g. DTrace profile module, so we had to emulate cyclic API and behavior. Now we can directly use callout(9) in the very few places where cyclic was used. Differential Revision: https://reviews.freebsd.org/D1161 Reviewed by: gnn, jhb, markj MFC after: 2 weeks Notes: svn path=/head/; revision=275576
* Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.Justin Hibbits2012-11-071-0/+7
| | | | | | | | | | | | | | There is one known issue: Some probes will display an error message along the lines of: "Invalid address (0)" I tested this with both a simple dtrace probe and dtruss on a few different binaries on 32-bit. I only compiled 64-bit, did not run it, but I don't expect problems without the modules loaded. Volunteers are welcome. MFC after: 1 month Notes: svn path=/head/; revision=242723
* Add device part of DTrace/MIPS codeOleksandr Tymoshenko2012-03-241-0/+7
| | | | Notes: svn path=/head/; revision=233409
* Custom DTrace kernel module files plus FreeBSD-specific DTrace providers.John Birrell2008-05-231-0/+531
Notes: svn path=/head/; revision=179237