aboutsummaryrefslogtreecommitdiff
path: root/sys/modules/dtrace
Commit message (Collapse)AuthorAgeFilesLines
* MFC r344450, r344452, r344453:Mark Johnston2019-03-171-3/+2
| | | | | | | Fix a tracepoint lookup race in fasttrap_pid_probe(). Notes: svn path=/stable/12/; revision=345247
* Move most of the contents of opt_compat.h to opt_global.h.Brooks Davis2018-04-064-11/+3
| | | | | | | | | | | | | | | | | | | | | opt_compat.h is mentioned in nearly 180 files. In-progress network driver compabibility improvements may add over 100 more so this is closer to "just about everywhere" than "only some files" per the guidance in sys/conf/options. Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h is created on all architectures. Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the set of compiled files. Reviewed by: kib, cem, jhb, jtl Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14941 Notes: svn path=/head/; revision=332122
* Rename assym.s to assym.incEd Maste2018-03-201-3/+3
| | | | | | | | | | | | assym is only to be included by other .s files, and should never actually be assembled by itself. Reviewed by: imp, bdrewery (earlier) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D14180 Notes: svn path=/head/; revision=331254
* Build systrace_freebsd32 on arm64.Michael Tuexen2018-01-111-0/+1
| | | | | | | | | | | Since r326501 which added COMPAT_FREEBSD32 to the GENERIC config for arm64, we need to build systrace_freebsd32, since dtraceall depends on it. Reviewed by: ed, gnn Differential Revision: https://reviews.freebsd.org/D13670 Notes: svn path=/head/; revision=327846
* sys: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326272
* Don't redefine _KERNEL.Mark Johnston2017-11-241-2/+0
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=326178
* Enable dtrace support for mips64 and the ERL kernel configKurt Lidl2017-09-063-3/+7
| | | | | | | | | | | | | | Turn on the required options in the ERL config file, and ensure that the fbt module is listed as a dependency for mips in the modules/dtrace/dtraceall/dtraceall.c file. PR: 220346 Reviewed by: gnn, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D12227 Notes: svn path=/head/; revision=323206
* o Replace __riscv__ with __riscvRuslan Bukin2017-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o Replace __riscv64 with (__riscv && __riscv_xlen == 64) This is required to support new GCC 7.1 compiler. This is compatible with current GCC 6.1 compiler. RISC-V is extensible ISA and the idea here is to have built-in define per each extension, so together with __riscv we will have some subset of these as well (depending on -march string passed to compiler): __riscv_compressed __riscv_atomic __riscv_mul __riscv_div __riscv_muldiv __riscv_fdiv __riscv_fsqrt __riscv_float_abi_soft __riscv_float_abi_single __riscv_float_abi_double __riscv_cmodel_medlow __riscv_cmodel_medany __riscv_cmodel_pic __riscv_xlen Reviewed by: ngie Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D11901 Notes: svn path=/head/; revision=322168
* Normalize SYSDIR on SRCTOP instead of .CURDIREnji Cooper2017-05-181-1/+1
| | | | | | | | | | This is being done to simplify pathing for CFLAGS and source files. MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=318440
* Stop building assym.o into the module.Bryan Drewery2017-04-051-15/+1
| | | | | | | | | | | | | | | | | | DTrace includes assym.s, to build this we build assym.o, however this is unneeded as assym.s only contains macros. Remove the need to build this by removing it from OBJS, but keep assym.s in the module dependencies via DPSRCS. This fixes the build when there is no assembler, e.g. on arm64 without the external binutils. Submitted by: andrew MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D10041 Notes: svn path=/head/; revision=316534
* Add an experimental DTrace audit provider, which allows users of DTrace toRobert Watson2017-03-292-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instrument security event auditing rather than relying on conventional BSM trail files or audit pipes: - Add a set of per-event 'commit' probes, which provide access to particular auditable events at the time of commit in system-call return. These probes gain access to audit data via the in-kernel audit_record data structure, providing convenient access to system-call arguments and return values in a single probe. - Add a set of per-event 'bsm' probes, which provide access to particular auditable events at the time of BSM record generation in the audit worker thread. These probes have access to the in-kernel audit_record data structure and BSM representation as would be written to a trail file or audit pipe -- i.e., asynchronously in the audit worker thread. DTrace probe arguments consist of the name of the audit event (to support future mechanisms of instrumenting multiple events via a single probe -- e.g., using classes), a pointer to the in-kernel audit record, and an optional pointer to the BSM data and its length. For human convenience, upper-case audit event names (AUE_...) are converted to lower case in DTrace. DTrace scripts can now cause additional audit-based data to be collected on system calls, and inspect internal and BSM representations of the data. They do not affect data captured in the audit trail or audit pipes configured in the system. auditd(8) must be configured and running in order to provide a database of event information, as well as other audit configuration parameters (e.g., to capture command-line arguments or environmental variables) for the provider to operate. Reviewed by: gnn, jonathan, markj Sponsored by: DARPA, AFRL MFC after: 3 weeks Differential Revision: https://reviews.freebsd.org/D10149 Notes: svn path=/head/; revision=316176
* sys/modules: normalize .CURDIR-relative paths to SRCTOPEnji Cooper2017-03-0414-14/+14
| | | | | | | | | | | This simplifies make output/logic Tested with: `cd sys/modules; make ALL_MODULES=` on amd64 MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=314651
* Replace the implementation of DTrace's RAND subroutine for generatingGeorge V. Neville-Neil2017-02-033-0/+4
| | | | | | | | | | | | | | low-quality random numbers with a modern implementation (xoroshiro128+) that is capable of generating better quality randomness without compromising performance. Submitted by: Graeme Jenkinson Reviewed by: markj MFC after: 2 weeks Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D9051 Notes: svn path=/head/; revision=313176
* Add full softfloat and hardfloat support for RISC-V.Ruslan Bukin2016-11-161-0/+4
| | | | | | | | | | | Hardfloat is now default (use riscv64sf as TARGET_ARCH for softfloat). Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8529 Notes: svn path=/head/; revision=308731
* o Add support for long double.Ruslan Bukin2016-11-031-1/+1
| | | | | | | | | | o Add support for latest RISC-V GNU toolchain. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=308251
* Revert r303911 "Remove extra -msoft-float flags settings."Ruslan Bukin2016-08-111-0/+5
| | | | | | | This was not properly tested. Notes: svn path=/head/; revision=303959
* Remove extra -msoft-float flags settings.Ruslan Bukin2016-08-101-5/+0
| | | | | | | | | | This helps to build firmware modules. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=303911
* Include FBT to modules build on RISC-V.Ruslan Bukin2016-07-292-2/+4
| | | | Notes: svn path=/head/; revision=303480
* Build DTrace assym.o with -msoft-float flag for RISC-V so we haveRuslan Bukin2016-07-281-0/+5
| | | | | | | | | | correct flag in ELF file. Sponsored by: DARPA, AFRL Sponsored by: HEIF5 Notes: svn path=/head/; revision=303439
* Rename remaining linux32 symbols such as linux_sysent[] andJohn Baldwin2015-10-223-6/+23
| | | | | | | | | | | | | | | | | | | | linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with linux64.ko. While here, add support for linux64 binaries to systrace. - Update NOPROTO entries in amd64/linux/syscalls.master to match the main table to fix systrace build. - Add a special case for union l_semun arguments to the systrace generation. - The systrace_linux32 module now only builds the systrace_linux32.ko. module on amd64. - Add a new systrace_linux module that builds on both i386 and amd64. For i386 it builds the existing systrace_linux.ko. For amd64 it builds a systrace_linux.ko for 64-bit binaries. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D3954 Notes: svn path=/head/; revision=289769
* Implement the lockstat provider using SDT(9) instead of the custom providerMark Johnston2015-07-194-22/+0
| | | | | | | | | | | in lockstat.ko. This means that lockstat probes now have typed arguments and will utilize SDT probe hot-patching support when it arrives. Reviewed by: gnn Differential Revision: https://reviews.freebsd.org/D2993 Notes: svn path=/head/; revision=285703
* First cut of DTrace for AArch64.Ruslan Bukin2015-07-012-2/+3
| | | | | | | | | Reviewed by: andrew, emaste Sponsored by: ARM Limited Differential Revision: https://reviews.freebsd.org/D2738 Notes: svn path=/head/; revision=285009
* Set a dependancy on fbt module for ARM.Ruslan Bukin2015-03-061-1/+1
| | | | Notes: svn path=/head/; revision=279692
* Initial version of DTrace on ARM32.George V. Neville-Neil2015-02-102-1/+8
| | | | | | | | Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj Notes: svn path=/head/; revision=278529
* Re-support CWARNFLAGS, lost when bsd.sys.mk was removed. Also, supportWarner Losh2015-01-031-0/+1
| | | | | | | | | | | CWARNFALGS.$file centrally so we don't have to have it in all the places. Remove a few warning flags that are no longer needed. Also, always use -Wno-unknown-pragma to (hopefully temporarily) work around #pragma ident in debug.h in the opensolaris code. Remove some stale warning suppression that's no longer necessary. Notes: svn path=/head/; revision=276606
* Submitted by: rick MaclemJulian Elischer2014-12-271-1/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=276304
* Remove the old NFS client and server from head,Rick Macklem2014-12-233-21/+0
| | | | | | | | | | | | | | | which means that the NFSCLIENT and NFSSERVER kernel options will no longer work. This commit only removes the kernel components. Removal of unused code in the user utilities will be done later. This commit does not include an addition to UPDATING, but that will be committed in a few minutes. Discussed on: freebsd-fs Notes: svn path=/head/; revision=276096
* remove opensolaris cyclic code, replace with high-precision calloutsAndriy Gapon2014-12-072-3/+0
| | | | | | | | | | | | | | In the old days callout(9) had 1 tick precision and that was inadequate for some uses, e.g. DTrace profile module, so we had to emulate cyclic API and behavior. Now we can directly use callout(9) in the very few places where cyclic was used. Differential Revision: https://reviews.freebsd.org/D1161 Reviewed by: gnn, jhb, markj MFC after: 2 weeks Notes: svn path=/head/; revision=275576
* Allow loading of dtraceall without nfscl if what you really wnat is nfsclientJulian Elischer2014-10-281-0/+2
| | | | | | | | Obtained from: Panzura tree MFC after: 1 week Notes: svn path=/head/; revision=273762
* Factor out the common code for function boundary tracing instead ofMark Johnston2014-08-161-5/+10
| | | | | | | | | | | | | | 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
* Remove unnecessary inclusions of bsd.own.mk.Warner Losh2014-08-041-1/+0
| | | | Notes: svn path=/head/; revision=269538
* Copy strtolctype.h to sys/cddl/contrib/opensolaris/common/util to keepRui Paulo2014-07-311-3/+1
| | | | | | | | | the kernel self-contained. Requested by: jhb Notes: svn path=/head/; revision=269325
* Avoid using ${.CURDIR} so that the module can be built from multipleMarcel Moolenaar2014-07-261-1/+1
| | | | | | | | | directories. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=269130
* Revert r268007, and re-adapt MFV r260708:Pedro F. Giffuni2014-07-011-0/+4
| | | | | | | | | | | 4427 pid provider rejects probes with valid UTF-8 names Use of u8_textprep.c required -Wno-cast-qual for powerpc. MFC after: 2 weeks Notes: svn path=/head/; revision=268097
* Revert r267869:Pedro F. Giffuni2014-06-281-3/+0
| | | | | | | | | | | | | MFV r260708 4427 pid provider rejects probes with valid UTF-8 names Use of u8_textprep.c broke the build on powerpc. Reported by: bz, rpaulo and tinderbox. Pointyhat: me Notes: svn path=/head/; revision=268007
* Move the -I of common/util to the proper place to fix the powerpc build.Rui Paulo2014-06-281-2/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=268006
* Redefine SUNW based on SYSDIR in an attempt to fix a build problem.Rui Paulo2014-06-271-1/+1
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=267987
* MFV illumosRui Paulo2014-06-261-1/+4
| | | | | | | | | 4477 DTrace should speak JSON MFC after: 2 weeks Notes: svn path=/head/; revision=267937
* MFV r260708Pedro F. Giffuni2014-06-251-0/+3
| | | | | | | | | | | | | | | | | | 4427 pid provider rejects probes with valid UTF-8 names This make use of Solaris' u8_validate() which we happen to use since r185029 for ZFS. Illumos Revision: 1444d846b126463eb1059a572ff114d51f7562e5 Reference: https://www.illumos.org/issues/4427 Obtained from: Illumos MFC after: 2 weeks Notes: svn path=/head/; revision=267869
* Use SYSDIR to reference to the top of the sys hierarchy. Define SYSDIRMarcel Moolenaar2014-03-0615-83/+113
| | | | | | | | | | relative to .CURDIR if not already defined. This makes the makefiles more readable but also more re-usable and adaptable. Obtained from: Juniper Networks, Inc. Notes: svn path=/head/; revision=262818
* Move some files that are identical on i386 and amd64 to an x86 subdirectoryMark Johnston2014-02-271-1/+3
| | | | | | | | | | rather than keeping duplicate copies. Discussed with: avg MFC after: 1 week Notes: svn path=/head/; revision=262542
* - For kernel compiled only with KDTRACE_HOOKS and not any lock debuggingAttilio Rao2013-11-253-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | option, unbreak the lock tracing release semantic by embedding calls to LOCKSTAT_PROFILE_RELEASE_LOCK() direclty in the inlined version of the releasing functions for mutex, rwlock and sxlock. Failing to do so skips the lockstat_probe_func invokation for unlocking. - As part of the LOCKSTAT support is inlined in mutex operation, for kernel compiled without lock debugging options, potentially every consumer must be compiled including opt_kdtrace.h. Fix this by moving KDTRACE_HOOKS into opt_global.h and remove the dependency by opt_kdtrace.h for all files, as now only KDTRACE_FRAMES is linked there and it is only used as a compile-time stub [0]. [0] immediately shows some new bug as DTRACE-derived support for debug in sfxge is broken and it was never really tested. As it was not including correctly opt_kdtrace.h before it was never enabled so it was kept broken for a while. Fix this by using a protection stub, leaving sfxge driver authors the responsibility for fixing it appropriately [1]. Sponsored by: EMC / Isilon storage division Discussed with: rstone [0] Reported by: rstone [1] Discussed with: philip Notes: svn path=/head/; revision=258541
* Redefine the io provider using the SDT(9) macros instead of doing everythingMark Johnston2013-10-243-17/+0
| | | | | | | | | manually. This change has no functional impact. Discussed with: gnn Notes: svn path=/head/; revision=257037
* Add fasttrap for PowerPC. This is the last piece of the dtrace/ppc puzzle.Justin Hibbits2013-10-152-1/+4
| | | | | | | | | | It's incomplete, it doesn't contain full instruction emulation, but it should be sufficient for most cases. MFC after: 1 month Notes: svn path=/head/; revision=256543
* Fix some ppc64 dtrace bugs, and enable systrace_freebsd32 for ppc64.Justin Hibbits2013-08-191-1/+1
| | | | Notes: svn path=/head/; revision=254509
* Fix make dependUlrich Spörlein2013-08-141-1/+1
| | | | Notes: svn path=/head/; revision=254319
* opensolaris code: translate INVARIANTS to DEBUG and ZFS_DEBUGAndriy Gapon2013-08-0616-2/+36
| | | | | | | | | | | | | | | | | | | Do this by forcing inclusion of sys/cddl/compat/opensolaris/sys/debug_compat.h via -include option into all source files from OpenSolaris. Note that this -include option must always be after -include opt_global.h. Additionally, remove forced definition of DEBUG for some modules and fix their build without DEBUG. Also, meaning of DEBUG was overloaded to enable WITNESS support for some OpenSolaris (primarily ZFS) locks. Now this overloading is removed and that use of DEBUG is replaced with a new option OPENSOLARIS_WITNESS. MFC after: 17 days Notes: svn path=/head/; revision=253996
* dtrace: fix compilation with gccAndriy Gapon2013-08-061-0/+1
| | | | | | | | | | Cowardly taking the easiest way and using -Wno-* MFC after: 3 days X-MFC with: r253772 Notes: svn path=/head/; revision=253989
* [fixup] add Makefile changes that should have been committed in r253772Andriy Gapon2013-07-291-0/+3
| | | | | | | | MFC after: 3 weeks X-MFC with: r253772 Notes: svn path=/head/; revision=253773
* Port the SDT test now that it's possible to create SDT probes that takeMark Johnston2013-06-021-1/+2
| | | | | | | | | | | | | | | seven arguments. The original test uses Solaris' uadmin system call to trigger the test probe; this change adds a sysctl to the dtrace_test module and gets the test program to trigger the test probe via the sysctl handler. The test is currently failing on amd64 because of some bugs in the way that probe arguments beyond the first five are obtained - these bugs will be fixed in a separate change. Notes: svn path=/head/; revision=251237