]> www.infradead.org Git - users/jedix/linux-maple.git/commit
dtrace: restructuring to support DTrace on multiple architectures
authorKris Van Hees <kris.van.hees@oracle.com>
Tue, 10 Feb 2015 16:33:19 +0000 (11:33 -0500)
committerKris Van Hees <kris.van.hees@oracle.com>
Mon, 20 Apr 2015 08:00:58 +0000 (04:00 -0400)
commitab27b30ac795c2c9807cf8f393fd1af5e81a0791
tree25d2881e286f600810c7bad8041cdc4e7ceab2f2
parentdbdb24d9091617f17c5653c097f4e6cc10c6abea
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>
24 files changed:
dtrace/Kbuild
dtrace/dt_test_dev.c
dtrace/dtrace_actdesc.c
dtrace/dtrace_asm_x86_64.S [moved from dtrace/dtrace_asm.S with 98% similarity]
dtrace/dtrace_dev.c
dtrace/dtrace_dif.c
dtrace/dtrace_dof.c
dtrace/dtrace_ecb.c
dtrace/dtrace_enable.c
dtrace/dtrace_fmt.c
dtrace/dtrace_hash.c
dtrace/dtrace_isa.c
dtrace/dtrace_isa_x86_64.c [new file with mode: 0644]
dtrace/dtrace_probe.c
dtrace/dtrace_util.c
dtrace/include/dtrace/dtrace_impl.h
dtrace/include/dtrace/dtrace_impl_defines.h
dtrace/include/x86_64/dtrace/sdt_arch.h [new file with mode: 0644]
dtrace/profile_dev.c
dtrace/sdt_dev.c
dtrace/sdt_impl.h
dtrace/sdt_mod.c
dtrace/sdt_x86_64.c [new file with mode: 0644]
dtrace/systrace_dev.c