History log of /src/sys/modules/dtrace/Makefile (Results 1 – 25 of 286)
Revision Date Author Comments
# 6e32e8d7 04-Feb-2026 Mark Johnston <markj@FreeBSD.org>

sdt: Enable on 32-bit powerpc and powerpc64le

Reviewed by: jhibbits, adrian
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D54814


# 1e734f15 22-Jan-2025 Mark Johnston <markj@FreeBSD.org>

dtrace: Build systrace_freebsd32 only if COMPAT_FREEBSD32 is configured

MFC after: 1 week
Sponsored by: Innovate UK


# e9ac4169 15-Jul-2024 Warner Losh <imp@FreeBSD.org>

Remove residual blank line at start of Makefile

This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix


# ddf0ed09 19-Jun-2024 Mark Johnston <markj@FreeBSD.org>

sdt: Implement SDT probes using hot-patching

The idea here is to avoid a memory access and conditional branch per
probe site. Instead, the probe is represented by an "unreachable"
unconditional fun

sdt: Implement SDT probes using hot-patching

The idea here is to avoid a memory access and conditional branch per
probe site. Instead, the probe is represented by an "unreachable"
unconditional function call. asm goto is used to store the address of
the probe site (represented by a no-op sled) and the address of the
function call into a tracepoint record. Each SDT probe carries a list
of tracepoints.

When the probe is enabled, the no-op sled corresponding to each
tracepoint is overwritten with a jmp to the corresponding label. The
implementation uses smp_rendezvous() to park all other CPUs while the
instruction is being overwritten, as this can't be done atomically in
general. The compiler moves argument marshalling code and the
sdt_probe() function call out-of-line, i.e., to the end of the function.

Per gallatin@ in D43504, this approach has less overhead when probes are
disabled. To make the implementation a bit simpler, I removed support
for probes with 7 arguments; nothing makes use of this except a
regression test case. It could be re-added later if need be.

The approach taken in this patch enables some more improvements:
1. We can now automatically fill out the "function" field of SDT probe
names. The SDT macros let the programmer specify the function and
module names, but this is really a bug and shouldn't have been
allowed. The intent was to be able to have the same probe in
multiple functions and to let the user restrict which probes actually
get enabled by specifying a function name or glob.
2. We can avoid branching on SDT_PROBES_ENABLED() by adding the ability
to include blocks of code in the out-of-line path. For example:

if (SDT_PROBES_ENABLED()) {
int reason = CLD_EXITED;

if (WCOREDUMP(signo))
reason = CLD_DUMPED;
else if (WIFSIGNALED(signo))
reason = CLD_KILLED;
SDT_PROBE1(proc, , , exit, reason);
}

could be written

SDT_PROBE1_EXT(proc, , , exit, reason,
int reason;

reason = CLD_EXITED;
if (WCOREDUMP(signo))
reason = CLD_DUMPED;
else if (WIFSIGNALED(signo))
reason = CLD_KILLED;
);

In the future I would like to use this mechanism more generally, e.g.,
to remove branches and marshalling code used by hwpmc, and generally to
make it easier to add new tracepoint consumers without having to add
more conditional branches to hot code paths.

Reviewed by: Domagoj Stolfa, avg
MFC after: 2 months
Differential Revision: https://reviews.freebsd.org/D44483

show more ...


# 031beb4e 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 07864a8a 19-Jul-2023 Christos Margiolis <christos@FreeBSD.org>

kinst: port to arm64

Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40337


# 2d7bb03a 04-Jul-2023 Christos Margiolis <christos@FreeBSD.org>

kinst: port to riscv

Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39884


# 10eed6bc 11-Jan-2023 Mitchell Horne <mhorne@FreeBSD.org>

dtrace: include fbt module unconditionally

It is supported on all platforms.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37658


# fe4a5593 30-Oct-2022 Justin Hibbits <jhibbits@FreeBSD.org>

dtrace: Add pid provider to the build for powerpc

The fasttrap pid provider has been in place for a long time, but stopped
getting built by efe88d92da in preparation for 64-bit atomics. 32-bit
emul

dtrace: Add pid provider to the build for powerpc

The fasttrap pid provider has been in place for a long time, but stopped
getting built by efe88d92da in preparation for 64-bit atomics. 32-bit
emulation of 64-bit atomics was added in 9aafc7c05.

MFC after: 3 weeks

show more ...


# f0bc4ed1 11-Oct-2022 Christos Margiolis <christos@FreeBSD.org>

kinst: Initial revision

This is a new DTrace provider which allows arbitrary kernel instructions
to be traced. Currently it is implemented only for amd64.

kinst probes are created on demand by lib

kinst: Initial revision

This is a new DTrace provider which allows arbitrary kernel instructions
to be traced. Currently it is implemented only for amd64.

kinst probes are created on demand by libdtrace, and there is a probe
for each kernel instruction. Probes are named
kinst:<module>:<function>:<offset>, where "offset" is the offset of the
target instruction relative to the beginning of the function. Omitting
"offset" causes all instructions in the function to be traced.

kinst works similarly to FBT in that it places a breakpoint on the
target instruction and hooks into the kernel breakpoint handler.
Because kinst has to be able to trace arbitrary instructions, it does
not emulate most of them in software but rather causes the traced thread
to execute a copy of the instruction before returning to the original
code.

The provider is quite low-level and as-is will be useful mostly only to
kernel developers. However, it provides a great deal of visibility into
kernel code execution and could be used as a building block for
higher-level tooling which can in some sense translate between C sources
and generated machine code. In particular, the "regs" variable recently
added to D allows the CPU's register file to be accessed from kinst
probes.

kinst is experimental and should not be used on production systems for
now.

In collaboration with: markj
Sponsored by: Google, Inc. (GSoC 2022)
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D36851

show more ...


# c66fd95c 31-Dec-2021 Warner Losh <imp@FreeBSD.org>

mips: Remove dtrace build support

Sponsored by: Netflix


# 18b18078 25-Feb-2019 Enji Cooper <ngie@FreeBSD.org>

MFhead@r344527


# a8fe8db4 25-Feb-2019 Dimitry Andric <dim@FreeBSD.org>

Merge ^/head r344178 through r344512.


# efe88d92 21-Feb-2019 Mark Johnston <markj@FreeBSD.org>

Disconnect fasttrap from the 32-bit powerpc build.

An upcoming bug fix requires 64-bit atomics, which aren't implemented on
powerpc. The powerpc port of fasttrap is incomplete anyway and doesn't
ge

Disconnect fasttrap from the 32-bit powerpc build.

An upcoming bug fix requires 64-bit atomics, which aren't implemented on
powerpc. The powerpc port of fasttrap is incomplete anyway and doesn't
get loaded by dtraceall.ko on powerpc because of a missing dependency;
it's presumed that it's effectively unused.

Discussed with: jhibbits
MFC after: 2 weeks

show more ...


# 1e734f15 22-Jan-2025 Mark Johnston <markj@FreeBSD.org>

dtrace: Build systrace_freebsd32 only if COMPAT_FREEBSD32 is configured

MFC after: 1 week
Sponsored by: Innovate UK


# e9ac4169 15-Jul-2024 Warner Losh <imp@FreeBSD.org>

Remove residual blank line at start of Makefile

This is a residual of the $FreeBSD$ removal.

MFC After: 3 days (though I'll just run the command on the branches)
Sponsored by: Netflix


# ddf0ed09 19-Jun-2024 Mark Johnston <markj@FreeBSD.org>

sdt: Implement SDT probes using hot-patching

The idea here is to avoid a memory access and conditional branch per
probe site. Instead, the probe is represented by an "unreachable"
unconditional fun

sdt: Implement SDT probes using hot-patching

The idea here is to avoid a memory access and conditional branch per
probe site. Instead, the probe is represented by an "unreachable"
unconditional function call. asm goto is used to store the address of
the probe site (represented by a no-op sled) and the address of the
function call into a tracepoint record. Each SDT probe carries a list
of tracepoints.

When the probe is enabled, the no-op sled corresponding to each
tracepoint is overwritten with a jmp to the corresponding label. The
implementation uses smp_rendezvous() to park all other CPUs while the
instruction is being overwritten, as this can't be done atomically in
general. The compiler moves argument marshalling code and the
sdt_probe() function call out-of-line, i.e., to the end of the function.

Per gallatin@ in D43504, this approach has less overhead when probes are
disabled. To make the implementation a bit simpler, I removed support
for probes with 7 arguments; nothing makes use of this except a
regression test case. It could be re-added later if need be.

The approach taken in this patch enables some more improvements:
1. We can now automatically fill out the "function" field of SDT probe
names. The SDT macros let the programmer specify the function and
module names, but this is really a bug and shouldn't have been
allowed. The intent was to be able to have the same probe in
multiple functions and to let the user restrict which probes actually
get enabled by specifying a function name or glob.
2. We can avoid branching on SDT_PROBES_ENABLED() by adding the ability
to include blocks of code in the out-of-line path. For example:

if (SDT_PROBES_ENABLED()) {
int reason = CLD_EXITED;

if (WCOREDUMP(signo))
reason = CLD_DUMPED;
else if (WIFSIGNALED(signo))
reason = CLD_KILLED;
SDT_PROBE1(proc, , , exit, reason);
}

could be written

SDT_PROBE1_EXT(proc, , , exit, reason,
int reason;

reason = CLD_EXITED;
if (WCOREDUMP(signo))
reason = CLD_DUMPED;
else if (WIFSIGNALED(signo))
reason = CLD_KILLED;
);

In the future I would like to use this mechanism more generally, e.g.,
to remove branches and marshalling code used by hwpmc, and generally to
make it easier to add new tracepoint consumers without having to add
more conditional branches to hot code paths.

Reviewed by: Domagoj Stolfa, avg
MFC after: 2 months
Differential Revision: https://reviews.freebsd.org/D44483

show more ...


# 031beb4e 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# 07864a8a 19-Jul-2023 Christos Margiolis <christos@FreeBSD.org>

kinst: port to arm64

Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40337


# 2d7bb03a 04-Jul-2023 Christos Margiolis <christos@FreeBSD.org>

kinst: port to riscv

Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39884


# 10eed6bc 11-Jan-2023 Mitchell Horne <mhorne@FreeBSD.org>

dtrace: include fbt module unconditionally

It is supported on all platforms.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37658


# fe4a5593 30-Oct-2022 Justin Hibbits <jhibbits@FreeBSD.org>

dtrace: Add pid provider to the build for powerpc

The fasttrap pid provider has been in place for a long time, but stopped
getting built by efe88d92da in preparation for 64-bit atomics. 32-bit
emul

dtrace: Add pid provider to the build for powerpc

The fasttrap pid provider has been in place for a long time, but stopped
getting built by efe88d92da in preparation for 64-bit atomics. 32-bit
emulation of 64-bit atomics was added in 9aafc7c05.

MFC after: 3 weeks

show more ...


# f0bc4ed1 11-Oct-2022 Christos Margiolis <christos@FreeBSD.org>

kinst: Initial revision

This is a new DTrace provider which allows arbitrary kernel instructions
to be traced. Currently it is implemented only for amd64.

kinst probes are created on demand by lib

kinst: Initial revision

This is a new DTrace provider which allows arbitrary kernel instructions
to be traced. Currently it is implemented only for amd64.

kinst probes are created on demand by libdtrace, and there is a probe
for each kernel instruction. Probes are named
kinst:<module>:<function>:<offset>, where "offset" is the offset of the
target instruction relative to the beginning of the function. Omitting
"offset" causes all instructions in the function to be traced.

kinst works similarly to FBT in that it places a breakpoint on the
target instruction and hooks into the kernel breakpoint handler.
Because kinst has to be able to trace arbitrary instructions, it does
not emulate most of them in software but rather causes the traced thread
to execute a copy of the instruction before returning to the original
code.

The provider is quite low-level and as-is will be useful mostly only to
kernel developers. However, it provides a great deal of visibility into
kernel code execution and could be used as a building block for
higher-level tooling which can in some sense translate between C sources
and generated machine code. In particular, the "regs" variable recently
added to D allows the CPU's register file to be accessed from kinst
probes.

kinst is experimental and should not be used on production systems for
now.

In collaboration with: markj
Sponsored by: Google, Inc. (GSoC 2022)
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D36851

show more ...


# c66fd95c 31-Dec-2021 Warner Losh <imp@FreeBSD.org>

mips: Remove dtrace build support

Sponsored by: Netflix


# 18b18078 25-Feb-2019 Enji Cooper <ngie@FreeBSD.org>

MFhead@r344527


12345678910>>...12