dtrace: restructuring to support DTrace on multiple architectures
Restructure the DTrace modules code to facilitate supporting ultiple
architectures (rather than just x86_64).
- The assembler implementation of support functions is now in a file
named dtrace_asm_<arch>.S and arch-specific aspects are found in
dtrace_isa_<arch>.c. The SDT provider requires an arch-specific
portion of code as well (in sdt_<arch>.c).
- The number of frames to skip for specific probes has been updated
to be more accurate (mistakes in this area were found during code
review).
- The mechanism for direct calling the test probe in dt_test_probe()
has been updated to work around compiler warnings.
- Removed dtrace_modload and dtrace_modunload. They were expected to
be needed for multi-arch support but it turns out that was not the
case.
- Add conditionals to not try to build anything that relates to providers
not necessarily being supported on all platforms.
- Various fixes for varable datatype issues that were not noticed on
x86 because they mapped to the same or similar numeric datatypes.
- Pass the dtrace_mstate_t struct to dtrace_getstackdepth() to support
the limitation that memory allocation cannot be done from probe
context. The dtrace_getstackdepth() function uses the dtrace_mstate_t
information to obtain a scratch area of memory to use as temporary
storage for PCs in the processing of dtrace_stacktrace().
- Handle the fact that on x86, the user sp for the current task can be
obtained using current_user_stack_pointer() whereas other platforms
use user_stack_pointer(current_pt_regs).
- Support that fact that the current instruction pointer is not always
an 'ip' member of the pt_regs struct. Always obtain the value of
the instruction pointer using the instruction_pointer(regs function.
- Support the use of asm/dtrace_syscall.h to list the system calls
that are implemented using an assembler stub.
- Ensure that membar functions use the SMP-versions.
- Clean up byte order conditionals.
- Remove dead code.
- Ensure needed header files are explicitly included.
- Update copyright statements.
Orabug:
20262965
Signed-off-by: Kris Van Hees <kris.van.hees@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>