| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reviewed by: avg
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D46674
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
|
|
|
|
| |
In particular, avoid loading the user's .profile file, since that can
have undesirable side effects. Most tests were already careful to do
this.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This option can be used to specify a format to use in DTrace output.
The following formats are supported:
- json
- xml
- html
- none (default DTrace output)
This is implemented using libxo and integrated into libdtrace. Client
code only works with the following API:
- dtrace_oformat_setup(dtrace_hdl_t *) -- to be called when output is starting.
- dtrace_oformat_teardown(dtrace_hdl_t *) -- to be called when output is finished
- dtrace_oformat(dtrace_hdl_t *) -- check if oformat is enabled.
- dtrace_set_outfp(FILE *) -- sets the output file for oformat.
- Ensure that oformat is correctly checked in the drop handler and record
processing callbacks.
This commit also adds tests which check if the generated output is
valid (JSON, XML) and extends the dtrace(1) describing the structured output.
Reviewed by: markj
Discussed with: phil
MFC after: 2 months
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D41745
|
|
|
|
|
|
|
| |
Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40414
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
This is follow up of d500a85e640d1cd270747c12e17c511b53864436
PR: 262415
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
getf() on FreeBSD calls _sx_slock(), _sx_sunlock() and fget_locked().
Furthermore, it does not set the per-core fault flag, meaning it
usually ends up in a double fault panic once getf() does get called,
especially from fbt.
Reviewing the DTrace Toolkit + a number of other scripts scattered
around FreeBSD, I have not been able to find one use of getf(). Given
how broken the implementation currently is, we disable it until it
can be implemented properly.
Also comment out a test in aggs/tst.subr.d for getf().
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33378
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
| |
- quiet -Wstrict-prototypes
- provide prototypes for weak aliases
Reviewed by: markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28036
|
|
|
|
|
|
|
|
| |
Reported by: Jenkins
MFC after: 1 week
Notes:
svn path=/head/; revision=365907
|
|
|
|
|
|
|
|
|
|
| |
Failure test case:
cddl.usr.sbin.dtrace.common.ip.t_dtrace_contrib.tst_ipv6localicmp_ksh
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=351644
|
|
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=351643
|
|
|
|
|
|
|
|
|
|
|
| |
This is added for letting these long failing test case pass, and for
consistency. The test code should be fixed later to not output this extra
empty line.
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=346873
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
server in the background. However, when running in the background,
stdin is closed and ncat initiates a graceful shutdown of the SCTP
association. This is not expected by the client. Therefore, the
ncat-based discard server is replaced by a perl-based one.
In addition, to remove the dependency from ncat, which needs to be
installed via the nmap port, also the code testing for a free SCTP port
is changed to use the perl-based client.
Finally, remove some debug output from the report generated.
Reviewed by: lwhsu@
Differential Revision: https://reviews.freebsd.org/D20086
Notes:
svn path=/head/; revision=346854
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using __syscall(2), the offset argument is passed on the stack on
amd64. Previously only 32 bits were written, so the upper 32 bits were
garbage and could cause the test to fail.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=345355
|
|
|
|
|
|
|
|
|
|
|
|
| |
SCTP. They are based on what is specified in the Solaris DTrace manual
for Solaris 11.4.
Reviewed by: 0mp, dteske, markj
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D16839
Notes:
svn path=/head/; revision=338213
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The dtrace provider for UDP-Lite is modeled after the UDP provider.
This fixes the bug that UDP-Lite packets were triggering the UDP
provider.
Thanks to dteske@ for providing the dwatch module.
Reviewed by: dteske@, markj@, rrs@
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D16377
Notes:
svn path=/head/; revision=337018
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensure that the TCP connections are terminated gracefully as expected
by the test. Use appropriate numbers for sent/received packets.
In addition, enable tst.localtcpstate.ksh, which should pass, but
doesn't until https://reviews.freebsd.org/D16369 is committed.
Reviewed by: markj@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16288
Notes:
svn path=/head/; revision=336597
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This test ensures that the fix committed in
https://svnweb.freebsd.org/changeset/base/336551
actually works.
Reviewed by: dteske@, markj@, rrs@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16046
Notes:
svn path=/head/; revision=336552
|
|
|
|
|
|
|
| |
Sponsored by: Netflix, Inc.
Notes:
svn path=/head/; revision=336317
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is similar to the one done in r286171 for
tst.ipv4localtcp.ksh. This not only reduces the requirements on the
system used for testing but results also in a graceful teardown of
the TCP connection.
Reviewed by: gnn@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16276
Notes:
svn path=/head/; revision=336316
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The code imported from opensolaris was depending on ping supporting
UDP for sending probes. Since this is not supported by ping on FreeBSD
use a perl script instead.
The remote test requires the usage of ksh93, so state that in the
sheband.
Enable the local test, but keep the remote test disabled, since it
requires a remote machine on the LAN.
Reviewed by: markj@, gnn@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16268
Notes:
svn path=/head/; revision=336315
|
|
|
|
|
|
|
|
|
|
| |
This bug was spotted by markj@ in D16268 because I copied this code part
and used it there. So fix it.
Sponsored by: Netflix, Inc.
Notes:
svn path=/head/; revision=336293
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we don't have /usr/bin/ksh, use a generic way of specifying
ksh. Some of the tests only run with ksh93, so use this shell
for these tests. Two of the tests don't have the execute bit set,
so fix this, too.
Reviewed by: markj@
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D16270
Notes:
svn path=/head/; revision=336291
|
|
|
|
|
|
|
|
|
| |
Some of mmap(2)'s arguments are 64 bits wide.
MFC after: 3 days
Notes:
svn path=/head/; revision=331135
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These return the jail ID and jail name for the traced process,
respectively, and are analogous to "zonename" on Solaris/illumos.
"zonename" is now aliased to "jailname".
Also add some stress tests for the new variables.
Submitted by: Domagoj Stolfa <domagoj.stolfa@gmail.com>
Reviewed by: dteske (previous version)
MFC after: 2 weeks
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D13877
Notes:
svn path=/head/; revision=327888
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=327795
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows one to override the environment for processes created with
dtrace -c. By default, the environment is inherited.
This support was originally merged from illumos in r249367 but was lost
when the commit was later reverted and then brought back piecemeal.
Reported by: Samuel Lepetit <slepetit@apple.com>
MFC after: 2 weeks
Notes:
svn path=/head/; revision=326499
|
|
|
|
|
|
|
|
|
| |
We can't link an executable using -m32 until the lib32 phase of a
buildworld, though the build works fine when executing make from
cddl/usr.sbin/dtrace/tests. Some other solution will need to be found.
Notes:
svn path=/head/; revision=326285
|
|
|
|
|
|
|
|
|
| |
The err.user64mode.ksh test expects it to run as a 32-bit process.
MFC after: 1 week
Notes:
svn path=/head/; revision=326181
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=326061
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- The exit probe was not appropriately filtered to only the known pid so it
was firing on any random process that would exit rather the only the one
we cared about.
- The dtest script executes the tst.raise*.exe in the background from
POSIX sh without jobs control. POSIX mandates that SIGINT be set to
SIG_IGN in this case. The test executable never actually tested that
SIGINT could be caught despite trying to block and delay the signal.
So the SIGINT sent from raise() is never actually received since it
is ignored. This could be fixed by calling 'trap - INT' from dtest
before running the executable but I've opted to just use SIGUSR1
instead in these specific tests rather than adding more logic to
test that SIGINT is not ignored at startup.
These 2 issues meant that the tests would randomly work but only if a process
coincidentally exited during the test.
Reviewed by: markj
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=323620
|
|
|
|
|
|
|
|
|
|
|
| |
We have D definitions for the named values in socket.h after r323253. Remove
them in test script to prevent compiling failure.
Reviewed by: markj, gnn
Differential Revision: https://reviews.freebsd.org/D12334
Notes:
svn path=/head/; revision=323499
|
|
|
|
|
|
|
|
| |
Reported by: Yuri Pankov <yuripv@gmx.com>
X-MFC with: r322774
Notes:
svn path=/head/; revision=322775
|
|
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=322774
|
|
|
|
|
|
|
|
|
|
|
| |
This test is also timeout on a quiet system because there is nobody triggering
read probefunc while test execution.
Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11731
Notes:
svn path=/head/; revision=321518
|
|
|
|
|
|
|
|
| |
Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11713
Notes:
svn path=/head/; revision=321470
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Solaris, basename(1) and basename(3) both return "." while being given an
empty string (""), while in BSD (and Linux) basename(1) returns "" and
basename(3) returns "."
While here, also change #!/usr/bin/ksh to #!/usr/bin/env ksh to find ksh in
$PATH
Reviewed by: gnn, markj (earlier version), ngie (earlier version)
Differential Revision: https://reviews.freebsd.org/D11707
Notes:
svn path=/head/; revision=321469
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We added too many variable assignments in BEGIN block, which will run out of
default auto-configured variable buffer space. The test VM has 4G RAM which
should be enough for most cases so it's reasonable to increase limitation to
these case.
Reviewed by: gnn
Differential Revision: https://reviews.freebsd.org/D11676
Notes:
svn path=/head/; revision=321468
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We added too many variable assignments in BEGIN block, which will run out of
default auto-configured variable buffer space. The test VM has 4G RAM which
should be enough for most cases so it's reasonable to increase limitation to
these case.
Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11674
Notes:
svn path=/head/; revision=321467
|
|
|
|
|
|
|
|
| |
Reviewed by: gnn, ngie
Differential Revision: https://reviews.freebsd.org/D11673
Notes:
svn path=/head/; revision=321466
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testing.
This test times-out on a quiet system because there is nobody triggers
syscall::open:entry or syscall::: probe while test execution.
Reviewed by: gnn, markj (earlier version)
Differential Revision: https://reviews.freebsd.org/D11671
Notes:
svn path=/head/; revision=321465
|
|
|
|
|
|
|
|
|
|
|
| |
This test timeout on a quiet system because there is nobody triggers
'syscall::*wait*:entry' probe while test execution.
Reviewed by: gnn, markj, ngie
Differential Revision: https://reviews.freebsd.org/D11668
Notes:
svn path=/head/; revision=321464
|
|
|
|
|
|
|
|
|
| |
to find ksh instead
MFC after: 1 month
Notes:
svn path=/head/; revision=321387
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
illumos/illumos-gate@79809f9cf402f130667349b2d4007ecd65d63c6f
https://github.com/illumos/illumos-gate/commit/79809f9cf402f130667349b2d4007ecd65d63c6f
https://www.illumos.org/issues/8269
It seems that currently normalization of stddev aggregation is done
incorrectly.
We divide both the sum of values and the sum of their squares by the
normalization factor. But we should divide the sum of squares by the
normalization factor squared to scale the original values properly.
FreeBSD note: the actual change was committed in r316853, this commit
adds the test files and record merge information.
Reviewed by: Bryan Cantrill <bryan@joyent.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Andriy Gapon <avg@FreeBSD.org>
MFC after: 1 week
Sponsored by: Panzura
Notes:
svn path=/head/; revision=319746
|
|
|
|
|
|
|
|
|
|
|
| |
sleep(1) is capsicumized, which means that we cannot rely on it to dump
core as required by the test.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=318680
|