| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
MFC after: 1 week
Fixes: e7e964cb2ebd ("syscalls: normalize _exit(2) declerations")
|
| |
|
|
|
|
|
|
| |
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: markj
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1907
|
| |
|
|
|
|
|
|
| |
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: markj
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1907
|
| |
|
|
|
|
|
|
| |
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: markj
MFC after: 1 week
Pull Request: https://github.com/freebsd/freebsd-src/pull/1907
|
| |
|
|
|
|
| |
Fixes: 6efcc2f26ab0 Add static tracing for privilege checking
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D53630
|
| |
|
|
|
|
| |
Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D53627
|
| |
|
|
|
|
| |
There should be no space between -x's "arg" and "=value".
MFC after: 3 days
|
| |
|
|
|
| |
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D51287
|
| |
|
|
|
|
| |
MFC after: 2 weeks
Fixes: 91dd9aae1ab8 Add explicit static DTrace tracing to the callout mechanism
Differential Revision: https://reviews.freebsd.org/D51397
|
| |
|
|
|
|
| |
Reviewed by: bcr
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51317
|
| |
|
|
|
|
|
|
| |
PR: 288284
Reviewed by: bcr, markj
MFC after: 3 days
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D51633
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Symbols defined using assembler directives lack type info, but in this
case one ought to be able to cast a pointer to the symbol and
dereference the pointer to get a value. Without this change, D
disallows this trick since it requires all identifiers to have a type.
Relax the rules slightly and allow an identifier to have type "void" if
we know we're just taking its address.
As a result, the following dtrace invocation works:
dtrace -n 'tick-1s {printf("%d", *(int *)&`ticks);}'
In particular, since commit b2b974f7ef4c ("clock: Simplify subr_ticks
and rename"), "ticks" does not have any type info associated with it, so
its value couldn't be printed. This trick provides a workaround and is
probably generally useful.
Add a regression test which exercises this functionality.
PR: 287752
Reviewed by: avg
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D51417
|
| |
|
|
|
|
|
|
|
| |
Reported by: markj
Reviewed by: christos, markj (earlier version), ziaee
Obtained from: Mark Johnston, DTrace, FreeBSD Journal, May 2014
Obtained from: https://wiki.freebsd.org/DTrace/One-Liners
MFC after: 2 weeks
Relnotes: yes
|
| |
|
|
|
|
| |
Reviewed by: christos, ziaee
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D51301
|
| |
|
|
|
|
|
| |
Event: Berlin Hackathon 202507
Reviewed by: bcr, christos
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D51278
|
| |
|
|
|
|
|
| |
Reviewed by: bcr, christos, ziaee
Event: Berlin Hackathon 202507
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D51268
|
| |
|
|
|
|
|
| |
Reviewed by: bcr, christos
Event: Berlin Hackathon 202507
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D51267
|
| |
|
|
|
| |
Reviewed by: bcr
Event: Berlin 2025 Hackathon
|
| |
|
|
|
|
|
| |
Reviewed by: bnovkov, christos, markj
Approved by: bnovkov (mentor), christos (mentor), markj (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50852
|
| |
|
|
|
|
|
|
| |
Otherwise these tests fail spuriously, depending on which compiler is
installed as cc.
MFC after: 2 weeks
Sponsored by: Innovate UK
|
| |
|
|
|
|
|
|
|
|
| |
Make it easier to support data models other than ILP32 and LP64 by
avoiding constructs which assume that it must be one or the other.
No functional change intended.
MFC after: 2 weeks
Sponsored by: Innovate UK
|
| |
|
|
|
|
| |
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
|
| |
|
|
|
|
| |
Approved by: markj (cddl/contrib changes)
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41961
|
| |
|
|
|
|
|
| |
Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40414
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Tracing memcpy() would crash the kernel, because we'd also trace the
memcpy() calls from kinst_invop(). To fix this, introduce kinst_memcpy()
whose arguments are 'volatile', so that we avoid having the compiler
replace it with a regular memcpy().
Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40284
|
| |
|
|
|
|
| |
Reviewed by: markj
Approved by: markj (mentor)
Differential Revision: https://reviews.freebsd.org/D40230
|
| |
|
|
|
|
|
|
|
|
|
| |
By specifying the -d flag, libdtrace will dump the D script after it has
applied syntactical sugar transformations (e.g if/else). This is useful
for both understanding what dt_sugar does, as well as debugging it.
Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38732
|
| |
|
|
| |
Trace a function which disables interrupts.
|
| |
|
|
|
|
|
| |
The test instruments a number of large, frequently called kernel
functions while generating load in the background.
MFC after: 3 months
|
| |
|
|
|
| |
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
|
| |
|
|
|
|
| |
Suggested by: swills
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
| |
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
| |
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
| |
|
|
|
| |
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29541
|
| |
|
|
|
|
|
|
|
| |
- quiet -Wstrict-prototypes
- provide prototypes for weak aliases
Reviewed by: markj
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D28036
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Note that the public documentation on dtrace.org fails to mention %T and
incorrectly documents %Y. The latter actually uses format "%Y %b %e %T"
where %b is always in C locale.
Discussed with: markj
MFC after: 1 month
Sponsored by: Panzura
Notes:
svn path=/head/; revision=368300
|
| |
|
|
|
|
|
|
| |
Reported by: Jenkins
MFC after: 1 week
Notes:
svn path=/head/; revision=365907
|
| |
|
|
|
|
|
|
|
|
| |
Reviewed by: bcr (mentor)
Approved by: bcr (mentor)
MFC after: 7 days
Differential Revision: https://reviews.freebsd.org/D23833
Notes:
svn path=/head/; revision=362170
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The DOF file output by dtrace -A contains only the loadable sections.
However, as it was created by a call to dtrace_dof_create() without
flags, the original DOF was created with the loadable sections. The
result is that the DOF includes the section headers for the unloadable
sections (COMMENTS and UTSNAME) without these sections actually being
present. This is inconsistent.
A simple change to anon_prog() ensures that the missing sections are
present in the outputted DOF. Alternatively, the call to
dtrace_dof_create() could pass the DTRACE_D_STRIP flag stripping out the
loadable sections. As the unloadable sections contain info useful for
debugging purposes they haven't been stripped.
Submitted by: Graeme Jenkinson <graeme.jenkinson@cl.cam.ac.uk>
MFC after: 1 week
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D21875
Notes:
svn path=/head/; revision=354822
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Create two tests checking if we can read urgs registers and if the
rax register returns a correct number.
Reviewed by: markj
Discussed with: lwhsu
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D20364
Notes:
svn path=/head/; revision=348706
|