/freebsd/sys/cddl/dev/dtrace/arm/ |
H A D | dtrace_subr.c | diff 4a8169d97b36df6420959c773a502fd5cfb25bfc Thu Mar 05 18:55:31 CET 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 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
|
/freebsd/sys/cddl/dev/fbt/arm/ |
H A D | fbt_isa.c | diff 4a8169d97b36df6420959c773a502fd5cfb25bfc Thu Mar 05 18:55:31 CET 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 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
|
/freebsd/sys/arm/arm/ |
H A D | db_trace.c | diff 4a8169d97b36df6420959c773a502fd5cfb25bfc Thu Mar 05 18:55:31 CET 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 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
|
H A D | exception.S | diff 4a8169d97b36df6420959c773a502fd5cfb25bfc Thu Mar 05 18:55:31 CET 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 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
|
H A D | undefined.c | diff 4a8169d97b36df6420959c773a502fd5cfb25bfc Thu Mar 05 18:55:31 CET 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 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
|
/freebsd/sys/cddl/contrib/opensolaris/uts/common/sys/ |
H A D | dtrace.h | diff 4a8169d97b36df6420959c773a502fd5cfb25bfc Thu Mar 05 18:55:31 CET 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 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
|