Revision tags: release/14.0.0 |
|
#
95ee2897 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
|
Revision tags: release/13.2.0, release/12.4.0 |
|
#
bdd101c4 |
| 04-Oct-2022 |
Mark Johnston <markj@FreeBSD.org> |
dtrace: Add a "regs" variable
This allows invop-based providers (i.e., fbt and kinst) to expose the register file of the CPU at the point where the probe fired. It does not work for SDT providers b
dtrace: Add a "regs" variable
This allows invop-based providers (i.e., fbt and kinst) to expose the register file of the CPU at the point where the probe fired. It does not work for SDT providers because their probes are implemented as plain function calls and so don't save registers. It's not clear what semantics "regs" should have for them anyway.
This is akin to "uregs", which nominally provides access to the userspace registers. In fact, DIF already had a DIF_VAR_REGS variable defined, it was simply unimplemented.
Usage example: print the contents of %rdi upon each call to amd64_syscall():
fbt::amd64_syscall:entry {printf("%x", regs[R_RDI]);}
Note that the R_* constants are defined in /usr/lib/dtrace/regs_x86.d. Currently there are no similar definitions for non-x86 platforms.
Reviewed by: christos MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D36799
show more ...
|
#
7357c2e5 |
| 14-Aug-2022 |
Dimitry Andric <dim@FreeBSD.org> |
Adjust function definition in arm's dtrace_subr.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/cddl/dev/dtrace/arm/dtrace_subr.c:174:17: error: a func
Adjust function definition in arm's dtrace_subr.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/cddl/dev/dtrace/arm/dtrace_subr.c:174:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] dtrace_gethrtime() ^ void
This is because dtrace_gethrtime() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration.
MFC after: 3 days
show more ...
|
Revision tags: release/13.1.0, release/12.3.0, release/13.0.0 |
|
#
30b68ecd |
| 09-Jan-2021 |
Robert Watson <rwatson@FreeBSD.org> |
Changes that improve DTrace FBT reliability on freebsd/arm64:
- Implement a dtrace_getnanouptime(), matching the existing dtrace_getnanotime(), to avoid DTrace calling out to a potentially instr
Changes that improve DTrace FBT reliability on freebsd/arm64:
- Implement a dtrace_getnanouptime(), matching the existing dtrace_getnanotime(), to avoid DTrace calling out to a potentially instrumentable function.
(These should probably both be under KDTRACE_HOOKS. Also, it's not clear to me that they are correct implementations for the DTrace thread time functions they are used in .. fixes for another commit.)
- Don't allow FBT to instrument functions involved in EL1 exception handling that are involved in FBT trap processing: handle_el1h_sync() and do_el1h_sync().
- Don't allow FBT to instrument DDB and KDB functions, as that makes it rather harder to debug FBT problems.
Prior to these changes, use of FBT on FreeBSD/arm64 rapidly led to kernel panics due to recursion in DTrace.
Reliable FBT on FreeBSD/arm64 is reliant on another change from @andrew to have the aarch64 instrumentor more carefully check that instructions it replaces are against the stack pointer, which can otherwise lead to memory corruption. That change remains under review.
MFC after: 2 weeks Reviewed by: andrew, kp, markj (earlier version), jrtc27 (earlier version) Differential revision: https://reviews.freebsd.org/D27766
show more ...
|
Revision tags: release/12.2.0 |
|
#
c7aa572c |
| 31-Jul-2020 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: Rubicon Communications, LLC (netgate.com)
|
#
2032c532 |
| 21-Jul-2020 |
Andriy Gapon <avg@FreeBSD.org> |
dtrace/fbt: fix return probe arguments on arm
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
dtrace/fbt: fix return probe arguments on arm
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
show more ...
|
Revision tags: release/11.4.0 |
|
#
8bfc473c |
| 09-Jan-2020 |
Ian Lepore <ian@FreeBSD.org> |
Remove scary-looking printf output that happens when you kldload dtrace on arm. Replace it with a comment block explaining why the function is empty on 32-bit arm.
|
Revision tags: release/12.1.0, release/11.3.0, release/12.0.0, release/11.2.0, release/10.4.0, release/11.1.0 |
|
#
67d955aa |
| 09-Apr-2017 |
Patrick Kelsey <pkelsey@FreeBSD.org> |
Corrected misspelled versions of rendezvous.
The MFC will include a compat definition of smp_no_rendevous_barrier() that calls smp_no_rendezvous_barrier().
Reviewed by: gnn, kib MFC after: 1 week D
Corrected misspelled versions of rendezvous.
The MFC will include a compat definition of smp_no_rendevous_barrier() that calls smp_no_rendezvous_barrier().
Reviewed by: gnn, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D10313
show more ...
|
#
2828dafc |
| 10-Nov-2016 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r308227 through r308490.
|
#
28323add |
| 09-Nov-2016 |
Bryan Drewery <bdrewery@FreeBSD.org> |
Fix improper use of "its".
Sponsored by: Dell EMC Isilon
|
Revision tags: release/11.0.1, release/11.0.0 |
|
#
6c280659 |
| 18-Apr-2016 |
Mark Johnston <markj@FreeBSD.org> |
Make the second argument of dtrace_invop() a trapframe pointer.
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 archi
Make the second argument of dtrace_invop() a trapframe pointer.
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.
show more ...
|
#
d6084013 |
| 05-Apr-2016 |
Glen Barber <gjb@FreeBSD.org> |
MFH
Sponsored by: The FreeBSD Foundation
|
Revision tags: release/10.3.0 |
|
#
48cc2d5e |
| 17-Mar-2016 |
Mark Johnston <markj@FreeBSD.org> |
Remove unused variables dtrace_in_probe and dtrace_in_probe_addr.
|
Revision tags: release/10.2.0 |
|
#
98e0ffae |
| 27-May-2015 |
Simon J. Gerraty <sjg@FreeBSD.org> |
Merge sync of head
|
#
e6e746bf |
| 25-Mar-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r278968-r280640
Sponsored by: The FreeBSD Foundation
|
#
c14aafed |
| 18-Mar-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Merge r278538 through r280226.
|
#
7426d572 |
| 15-Mar-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from head
|
#
6404f697 |
| 08-Mar-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merging ^/head r279596 through r279758.
|
#
a340dc53 |
| 07-Mar-2015 |
George V. Neville-Neil <gnn@FreeBSD.org> |
Add support for walltimestamp to DTrace on ARM.
|
#
5b66e196 |
| 07-Mar-2015 |
Navdeep Parhar <np@FreeBSD.org> |
Merge r278538 through r279716.
|
#
4a8169d9 |
| 05-Mar-2015 |
Andrew Turner <andrew@FreeBSD.org> |
Add the MD parts of dtrace needed to use fbt on ARM. For this we need to emulate the instructions used in function entry and exit.
For function entry ARM will use a push instruction to push up to 16
Add the MD parts of dtrace needed to use fbt on ARM. For this we need to 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
show more ...
|
#
569e61a4 |
| 14-Feb-2015 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r278499 through r278755.
|
#
d8fee543 |
| 12-Feb-2015 |
Baptiste Daroussin <bapt@FreeBSD.org> |
Merge from HEAD
|
#
53f2fbca |
| 11-Feb-2015 |
Glen Barber <gjb@FreeBSD.org> |
MFH: r278202,r278205-r278590
Sponsored by: The FreeBSD Foundation
|
#
fcb56067 |
| 10-Feb-2015 |
George V. Neville-Neil <gnn@FreeBSD.org> |
Initial version of DTrace on ARM32.
Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj
|