aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/dev/fbt/powerpc
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-2/+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/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.
* powerpc/dtrace: Fix fbt function probing for ELFv2Justin Hibbits2019-05-271-0/+2
| | | | | | | | | | | | | '.' function names exist only in ELFv1. ELFv2 does away with function descriptors, and look more like they do on powerpc(32) and most other platforms, as direct function pointers. Stop blacklisting regular function names in ELFv2. Submitted by: Brandon Bergren Differential Revision: https://reviews.freebsd.org/D20346 Notes: svn path=/head/; revision=348298
* DTrace/powerpc: Fix FBT return probesJustin Hibbits2018-11-211-1/+1
| | | | | | | | | The FBT fuction boundary prober was setting one return probe marker value, but the dtrace handler was expecting another. This causes a hang when tracing return probes. Notes: svn path=/head/; revision=340726
* 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
* Fix the encoded instruction for FBT traps on powerpcJustin Hibbits2017-05-101-1/+1
| | | | | | | | | | | r314370 changed EXC_DTRACE to a different instruction, but neglected to make the same change to fbt, so dtrace didn't actually pick it up, resulting in entering KDB instead of trapping for dtrace. MFC after: 1 week Notes: svn path=/head/; revision=318130
* Fix check for fbt_excluded() in powerpcJustin Hibbits2017-05-101-1/+1
| | | | | | | | | | fbt_excluded() returns 1 if the symbol is to be excluded. Every other arch has this correct, powerpc was the only broken one MFC after: 1 week Notes: svn path=/head/; revision=318129
* 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
* Remove a couple of unused fields from the FBT probe struct.Mark Johnston2015-08-031-1/+0
| | | | Notes: svn path=/head/; revision=286241
* WhitespaceJustin Hibbits2014-10-241-1/+1
| | | | | | | | X-MFC-with: r273570 MFC after: 1 week Notes: svn path=/head/; revision=273571
* Three updates to PowerPC FBT:Justin Hibbits2014-10-241-3/+15
| | | | | | | | | | | | * Use a constant to define the number of stack frames in a probe exception. * Only allow function symbols in powerpc64 ('.' prefixed) * Set the fbtp_roffset for return probes, so the correct dtrace_probe call is made. MFC after: 1 week Notes: svn path=/head/; revision=273570
* Fix the stack tracing for dtrace/powerpc.Justin Hibbits2014-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fix the stack tracing for dtrace/powerpc by using the trapexit/asttrapexit return address sentinels instead of checking within the kernel address space. As part of this, I had to add new inline functions. FBT traces the kernel, so we have to have special case handling for this, since a trap will create a full new trap frame, and there's no way to pass around the 'real' stack. I handle this by special-casing 'aframes == 0' with the trap frame. If aframes counts out to the trap frame, then assume we're looking for the full kernel trap frame, so switch to the real stack pointer. Test Plan: Tested on powerpc64 Reviewers: rpaulo, markj, nwhitehorn Reviewed By: markj, nwhitehorn Differential Revision: https://reviews.freebsd.org/D788 MFC after: 3 week Relnotes: Yes Notes: svn path=/head/; revision=271697
* Factor out the common code for function boundary tracing instead ofMark Johnston2014-08-162-0/+271
duplicating the entire implementation for both x86 and powerpc. This makes it easier to add support for other architectures and has no functional impact. Phabric: D613 Reviewed by: gnn, jhibbits, rpaulo Tested by: jhibbits (powerpc) MFC after: 2 weeks Notes: svn path=/head/; revision=270067