aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/dev/fbt/arm
Commit message (Collapse)AuthorAgeFilesLines
* 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-162-4/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* fbt: get rid of redundant definesChristos Margiolis2023-05-011-3/+0
| | | | | | | | | No functional change intended. Reviewed by: markj MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39882
* dtrace/fbt: fix return probe arguments on armAndriy Gapon2020-07-211-6/+12
| | | | | | | | | | | | | | | | | | | | | arg0 should be an offset of the return point within the function, arg1 should be the return value. Previously the return probe had arguments as if for the entry probe. Tested on armv7. andrew noted that the same problem seems to be present on arm64, mips, and riscv. I am not sure if I will get around to fixing those. So, platform users or anyone looking to make a contribution please be aware of this opportunity. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25685 Notes: svn path=/head/; revision=363383
* Allow multiple FBT probes to share a tracepoint.Mark Johnston2018-08-281-1/+1
| | | | | | | | | | | | | | | | | With GNU ifuncs, multiple FBT probes may correspond to the same instruction. fbt_invop() assumed that this could not happen and would return after the first probe found in the global FBT hash table, which might not be the one that's enabled. Fix the problem on x86 by linking probes that share a tracepoint and having each linked probe fire when the tracepoint is hit. PR: 230846 Approved by: re (gjb) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D16921 Notes: svn path=/head/; revision=338359
* Use the kernel stack in the ARM FBT DTrace provider. This is used to findAndrew Turner2017-01-181-1/+1
| | | | | | | | | | | | | the fifth argument to functions being traced, however there was an error where the userspace stack was being used. This may be invalid leading to a kernel panic if this address is unmapped. Submitted by: Graeme Jenkinson <graeme.jenkinson@cl.cam.ac.uk> MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D9229 Notes: svn path=/head/; revision=312378
* Consistently use fbt_excluded() on all architectures.Mark Johnston2016-12-101-9/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=309785
* Allow tracing of functions prefixed by "__".Mark Johnston2016-10-021-3/+0
| | | | | | | | | | This restriction was inherited from upstream but is not relevant on FreeBSD. Furthermore, it hindered the tracing of locking primitive subroutines. MFC after: 1 week Notes: svn path=/head/; revision=306570
* Make the second argument of dtrace_invop() a trapframe pointer.Mark Johnston2016-04-171-2/+1
| | | | | | | | | | | | | | | | Currently this argument is a pointer into the stack which is used by FBT to fetch the first five probe arguments. On all non-x86 architectures it's simply the trapframe address, so this change has no functional impact. On amd64 it's a pointer into the trapframe such that stack[1 .. 5] gives the first five argument registers, which are deliberately grouped together in the amd64 trapframe definition. A trapframe argument simplifies the invop handlers on !x86 and makes the x86 FBT invop handler easier to understand. Moreover, it allows for invop handlers that may want to modify the register set of the interrupted thread. Notes: svn path=/head/; revision=298171
* ARM: Rename remaining ARMv4 specific function in DTrace code.Michal Meloun2016-02-061-1/+1
| | | | | | | | | I missed it in r295319. Pointed by: tuexen Notes: svn path=/head/; revision=295348
* Be stricter on which functions we can probe with FBT. We now only check theAndrew Turner2015-12-231-5/+13
| | | | | | | | | | | | | | first instruction to see if it's either a pushm with lr, or a sub with sp. The former is the common case, with the latter used with va_args. This removes 12 probes. These are all hand-written assembly, with a few C functions with no stack usage. Submitted by: Howard Su <howard0su@gmail.com> Differential Revision: https://reviews.freebsd.org/D4419 Notes: svn path=/head/; revision=292663
* Move the check to see if we are tracing a function with the DTrace FunctionAndrew Turner2015-12-051-17/+13
| | | | | | | | | | | Boundary Trace to assembly to reduce the overhead of these checks. Submitted by: Howard Su <howard0su@gmail.com> Relnotes: Yes Differential Revision: https://reviews.freebsd.org/D4266 Notes: svn path=/head/; revision=291852
* Remove a couple of unused fields from the FBT probe struct.Mark Johnston2015-08-031-1/+0
| | | | Notes: svn path=/head/; revision=286241
* Now that DTrace stack traces handle exception frames better, skip fewerRobert Watson2015-03-151-1/+1
| | | | | | | | | | stack frames for FBT 'entry' probes on ARM. MFC after: 3 days Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=280039
* Add the MD parts of dtrace needed to use fbt on ARM. For this we need toAndrew Turner2015-03-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | emulate the instructions used in function entry and exit. For function entry ARM will use a push instruction to push up to 16 registers to the stack. While we don't expect all 16 to be used we need to handle any combination the compiler may generate, even if it doesn't make sense (e.g. pushing the program counter). On function return we will either have a pop or branch instruction. The former is similar to the push instruction, but with care to make sure we update the stack pointer and program counter correctly in the cases they are either in the list of registers or not. For branch we need to take the 24-bit offset, sign-extend it, and add that number of 4-byte words to the program counter. Care needs to be taken as, due to historical reasons, the address the branch is relative to is not the current instruction, but 8 bytes later. This allows us to use the following probes on ARM boards: dtrace -n 'fbt::malloc:entry { stack() }' and dtrace -n 'fbt::free:return { stack() }' Differential Revision: https://reviews.freebsd.org/D2007 Reviewed by: gnn, rpaulo Sponsored by: ABT Systems Ltd Notes: svn path=/head/; revision=279667
* Don't all DTrace's FBT on ARM to instrument undefinedinstruction(), asRobert Watson2015-03-051-0/+7
| | | | | | | | | this would lead to DTrace reentrance. Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=279626
* Clean up machine dependent code for DTrace on ARM.George V. Neville-Neil2015-02-111-1142/+31
| | | | | | | Submitted by: markj Notes: svn path=/head/; revision=278587
* Initial version of DTrace on ARM32.George V. Neville-Neil2015-02-102-0/+1333
Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj Notes: svn path=/head/; revision=278529