Page MenuHomeFreeBSD
Feed Advanced Search

Jan 10 2024

markj closed D41745: dtrace: Add the 'oformat' libdtrace option..
Jan 10 2024, 11:33 PM · DTrace

Jan 2 2024

domagoj.stolfa_gmail.com updated the diff for D41745: dtrace: Add the 'oformat' libdtrace option..

Missing comma in man page.

Jan 2 2024, 7:35 PM · DTrace
domagoj.stolfa_gmail.com updated the diff for D41745: dtrace: Add the 'oformat' libdtrace option..

Address @markj's comments.

Jan 2 2024, 7:31 PM · DTrace

Dec 28 2023

phil added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

If I compile usr.sbin/dtrace with this patch applied, I get:

In file included from /home/markj/src/freebsd/cddl/contrib/opensolaris/cmd/dtrace/dtrace.c:59:
/usr/include/libxo/xo.h:31:9: error: 'NORETURN' macro redefined [-Werror,-Wmacro-redefined]
   31 | #define NORETURN __dead2
      |         ^
/home/markj/src/freebsd/sys/contrib/openzfs/lib/libspl/include/assert.h:44:9: note: previous definition is here
   44 | #define NORETURN        __attribute__((__noreturn__))
      |         ^
1 error generated.
*** Error code 1

Stop.
make: stopped in /home/markj/src/freebsd/cddl/usr.sbin/dtrace

I tend to think that xo.h should undefine those symbols (NORETURN and PRINTFLIKE) at the end, or give them a XO_ namespace prefix. I'll fix it up locally and keep testing, but we need some solution for this before committing. (Or am I doing something wrong?)

Dec 28 2023, 5:39 PM · DTrace

Dec 22 2023

markj added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

Overall I think this is in good shape and can land soon. Thank you for writing test cases and thorough documentation. My inline comments are just nitpicking for the man page.

Dec 22 2023, 5:23 PM · DTrace
markj added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

If I compile usr.sbin/dtrace with this patch applied, I get:

Dec 22 2023, 4:50 PM · DTrace

Dec 8 2023

domagoj.stolfa_gmail.com updated the diff for D41745: dtrace: Add the 'oformat' libdtrace option..

Update the diff to address a few output alignment issues when not using structured output via xo_emit(). Without the added xo_flush() calls, the output from xo_emit() would be printed after all the other output is printed via fprintf(). Also added a comment explaining why xo_flush() is called in those situations.

Dec 8 2023, 4:05 PM · DTrace

Nov 1 2023

domagoj.stolfa_gmail.com added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

That's pretty terrible, given that all flavors of xo_emit* turn into the same codepath (xo_do_emit). Can you isolate this into something I can debug, or send me your current patch (phil@freebsd.org) and I'll see if I can do it?

Nov 1 2023, 5:44 PM · DTrace
phil added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

$ sudo dtrace -n 'BEGIN { mod(0xffffffff8261a000); exit(0); }'
dtrace: description 'BEGIN ' matched 1 probe
CPU ID FUNCTION:NAME

6      1                           :BEGIN

opensolaris.ko
Nov 1 2023, 5:41 PM · DTrace
domagoj.stolfa_gmail.com added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

@phil I've tried to do a basic implementation using xo_create_to_file and then implementing dt_emit() by redirecting buffered output and sprintf output to the regular printf output (it becomes dt_vprintf since i have a va_list instead of variadic arguments). However, I've noticed that if I do regular text output using

Nov 1 2023, 3:00 PM · DTrace

Oct 29 2023

christos added inline comments to D38825: libdtrace: implement inline function tracing for kinst.
Oct 29 2023, 7:38 PM · DTrace

Oct 23 2023

markj added inline comments to D41745: dtrace: Add the 'oformat' libdtrace option..
Oct 23 2023, 1:55 PM · DTrace

Oct 20 2023

phil added inline comments to D41745: dtrace: Add the 'oformat' libdtrace option..
Oct 20 2023, 8:53 PM · DTrace
domagoj.stolfa_gmail.com added inline comments to D41745: dtrace: Add the 'oformat' libdtrace option..
Oct 20 2023, 7:56 PM · DTrace
phil added inline comments to D41745: dtrace: Add the 'oformat' libdtrace option..
Oct 20 2023, 4:59 PM · DTrace
domagoj.stolfa_gmail.com added inline comments to D41745: dtrace: Add the 'oformat' libdtrace option..
Oct 20 2023, 10:16 AM · DTrace
phil added inline comments to D41745: dtrace: Add the 'oformat' libdtrace option..
Oct 20 2023, 12:18 AM · DTrace

Oct 19 2023

domagoj.stolfa_gmail.com updated the diff for D41745: dtrace: Add the 'oformat' libdtrace option..

Update the diff. This diff should address the following:

Oct 19 2023, 1:29 PM · DTrace

Oct 18 2023

domagoj.stolfa_gmail.com added inline comments to D41745: dtrace: Add the 'oformat' libdtrace option..
Oct 18 2023, 7:23 PM · DTrace
phil added inline comments to D41745: dtrace: Add the 'oformat' libdtrace option..
Oct 18 2023, 6:43 PM · DTrace
domagoj.stolfa_gmail.com added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

Thanks for the detailed reviews @markj and @phil! The libxo clarifications have been very helpful, much appreciated. I've added a few comments in places that can be discussed independently and will aim to update the diff addressing the comments sometime this week.

Oct 18 2023, 3:59 PM · DTrace
phil added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

I suggest to think about adding --libxo foo as an alias to -x oformat=foo to make things more inline with what is actually done for, e.g., netstat(1).

Thanks for the feedback! I don't take a strong view on whether or not xo_parse_args() should be called at the start, though it might require some finessing to make it work happily with libdtrace because xo_parse_args() sets a number of flags for libxo that I don't with -x oformat (such as colored output in some cases). Another thing worth pondering is that this is also an argument to libdtrace rather than dtrace(1), so one would inevitably need to still call dtrace_setopt(). Now, however libxo configuration would be performed twice: once in dtrace(1), and once in libdtrace. dtrace(1) itself would explicitly need to include libxo and link against it, but this isn't a big issue IMO, it just "feels" cleaner to me for it to only link against libdtrace and for libdtrace to provide all the libxo handling and configuration and for any consumer code (including dtrace(1)) to simply request it.

However I do agree with the general point that there is an inconsistency with the rest of the base system when it comes to libxo integration (though it's inconsistent in a fair bit of other ways too). One way to work around the issue without xo_parse_args() would be perhaps to add a - flag and manually parse out the -libxo ... that follows? I'm not sure what the best approach would be that doesn't get slightly messy.

Oct 18 2023, 4:50 AM · DTrace

Oct 16 2023

markj updated subscribers of D41745: dtrace: Add the 'oformat' libdtrace option..

I suggest to think about adding --libxo foo as an alias to -x oformat=foo to make things more inline with what is actually done for, e.g., netstat(1).

Thanks for the feedback! I don't take a strong view on whether or not xo_parse_args() should be called at the start, though it might require some finessing to make it work happily with libdtrace because xo_parse_args() sets a number of flags for libxo that I don't with -x oformat (such as colored output in some cases).

Oct 16 2023, 1:51 PM · DTrace

Sep 23 2023

christos updated the diff for D38825: libdtrace: implement inline function tracing for kinst.

Fix off->val type causing a build failure.

Sep 23 2023, 12:31 PM · DTrace

Sep 15 2023

christos updated the diff for D38825: libdtrace: implement inline function tracing for kinst.

Fix struct indentation.

Sep 15 2023, 2:55 PM · DTrace

Sep 8 2023

domagoj.stolfa_gmail.com updated the diff for D41745: dtrace: Add the 'oformat' libdtrace option..

Add missing information to the man page and fix some bits in it (e.g. using .Fn for action names).

Sep 8 2023, 12:39 AM · DTrace
domagoj.stolfa_gmail.com updated the summary of D41745: dtrace: Add the 'oformat' libdtrace option..
Sep 8 2023, 12:17 AM · DTrace
domagoj.stolfa_gmail.com updated the diff for D41745: dtrace: Add the 'oformat' libdtrace option..

Updated the diff with documentation in the dtrace(1) man page, as well as a bug fix when it comes to naming aggregations. Namely, min, max, sum and count were all called count in the final output due to missing checks. These are now addressed.

Sep 8 2023, 12:16 AM · DTrace

Sep 7 2023

gnn accepted D41745: dtrace: Add the 'oformat' libdtrace option..

Please address the comments from markj@ but otherwise this looks good, and more extensive than what we came up with on CADETS.

Sep 7 2023, 1:10 PM · DTrace
domagoj.stolfa_gmail.com added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

I suggest to think about adding --libxo foo as an alias to -x oformat=foo to make things more inline with what is actually done for, e.g., netstat(1).

Sep 7 2023, 12:15 PM · DTrace
stephane.rochoy_stormshield.eu added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

I suggest to think about adding --libxo foo as an alias to -x oformat=foo to make things more inline with what is actually done for, e.g., netstat(1).

Sep 7 2023, 6:19 AM · DTrace

Sep 6 2023

domagoj.stolfa_gmail.com updated the diff for D41745: dtrace: Add the 'oformat' libdtrace option..

Attempt #2 at addressing @markj's comments... Forgot one gettimeofday

Sep 6 2023, 6:25 PM · DTrace
domagoj.stolfa_gmail.com updated the diff for D41745: dtrace: Add the 'oformat' libdtrace option..

Address some comments by @markj. The man page comment is still true, as I will be updating that when all the documentation comes in.

Sep 6 2023, 6:21 PM · DTrace
domagoj.stolfa_gmail.com added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

I don't see a reason to avoid adding it to dtrace.1?

Sep 6 2023, 5:18 PM · DTrace
markj added a comment to D41745: dtrace: Add the 'oformat' libdtrace option..

Perhaps its own man page is warranted in order to avoid polluting dtrace(1)?

Sep 6 2023, 2:46 PM · DTrace

Sep 5 2023

domagoj.stolfa_gmail.com updated the summary of D41745: dtrace: Add the 'oformat' libdtrace option..
Sep 5 2023, 8:58 PM · DTrace
domagoj.stolfa_gmail.com updated the summary of D41745: dtrace: Add the 'oformat' libdtrace option..
Sep 5 2023, 8:38 PM · DTrace
domagoj.stolfa_gmail.com requested review of D41745: dtrace: Add the 'oformat' libdtrace option..
Sep 5 2023, 8:36 PM · DTrace

Aug 27 2023

christos updated the diff for D38825: libdtrace: implement inline function tracing for kinst.

Fix return offset handling.

Aug 27 2023, 3:28 PM · DTrace

Aug 25 2023

imp closed D41595: dtrace: Remove $FreeBSD$ from genmakefiles.sh..
Aug 25 2023, 8:58 PM · DTrace
imp accepted D41595: dtrace: Remove $FreeBSD$ from genmakefiles.sh..
Aug 25 2023, 6:59 PM · DTrace
domagoj.stolfa_gmail.com requested review of D41595: dtrace: Remove $FreeBSD$ from genmakefiles.sh..
Aug 25 2023, 6:35 PM · DTrace

Jul 19 2023

christos closed D40337: kinst: port to arm64.
Jul 19 2023, 3:01 PM · arm64, DTrace
christos added inline comments to D40337: kinst: port to arm64.
Jul 19 2023, 2:11 PM · arm64, DTrace
markj accepted D40337: kinst: port to arm64.

Approved.

Jul 19 2023, 1:47 PM · arm64, DTrace

Jul 16 2023

christos updated the diff for D40337: kinst: port to arm64.

Address comments, fix stuff that was also fixed in riscv.

Jul 16 2023, 4:28 PM · arm64, DTrace

Jul 14 2023

markj added inline comments to D40337: kinst: port to arm64.
Jul 14 2023, 2:03 PM · arm64, DTrace

Jul 13 2023

christos updated the diff for D39259: fbt: allow tracing of dtrace_test.ko functions.

Update

Jul 13 2023, 10:27 PM · DTrace
christos retitled D39259: fbt: allow tracing of dtrace_test.ko functions from fbt(4): allow tracing in dtrace_test.ko if it was loaded after fbt to fbt: allow tracing of dtrace_test.ko functions.
Jul 13 2023, 10:24 PM · DTrace
christos updated the summary of D40337: kinst: port to arm64.
Jul 13 2023, 10:11 PM · arm64, DTrace
christos updated the diff for D40337: kinst: port to arm64.

Address Mark's comments. Depends on D40962.

Jul 13 2023, 10:11 PM · arm64, DTrace
markj added inline comments to D40337: kinst: port to arm64.
Jul 13 2023, 6:34 PM · arm64, DTrace
christos added inline comments to D40337: kinst: port to arm64.
Jul 13 2023, 6:12 PM · arm64, DTrace
markj added inline comments to D40337: kinst: port to arm64.
Jul 13 2023, 5:50 PM · arm64, DTrace

Jul 12 2023

christos updated the diff for D40337: kinst: port to arm64.

Disable adr/adrp emulation.

Jul 12 2023, 12:38 PM · arm64, DTrace

Jul 10 2023

christos updated the diff for D40337: kinst: port to arm64.

Use per-probe trampolines. Depends on D40962

Jul 10 2023, 8:42 PM · arm64, DTrace

Jul 7 2023

christos updated the diff for D40337: kinst: port to arm64.

Updated description, still some unsolved bugs, but mostly done.

Jul 7 2023, 5:36 PM · arm64, DTrace

Jul 4 2023

markj added a comment to D39884: kinst: port to riscv.

This provider can trigger what appears to be a QEMU/TCG bug. The test case:

  • boot a riscv VM with more than one vCPU
  • run dtrace -q -n 'kinst::riscv_cpu_intr:', i.e., trace all instructions in riscv_cpu_intr()

Seems I was a bit slow to report my findings, but I did observe some of the same kinds of panics on real hardware that I saw in QEMU. I will update to the committed version and provide a more detailed answer of what is still not working.

Can you recompile kinst with this patch applied? https://reviews.freebsd.org/P592
If we run it with a single trampoline per page, the crashes seem to go away.

Is it just a case of needing to smp_rendezvous a fence_i since it's not broadcast by the hardware like on arm64?

Jul 4 2023, 5:03 PM · riscv, DTrace
christos added a comment to D39884: kinst: port to riscv.

Is it just a case of needing to smp_rendezvous a fence_i since it's not broadcast by the hardware like on arm64?

Jul 4 2023, 4:55 PM · riscv, DTrace
jrtc27 added a comment to D39884: kinst: port to riscv.

This provider can trigger what appears to be a QEMU/TCG bug. The test case:

  • boot a riscv VM with more than one vCPU
  • run dtrace -q -n 'kinst::riscv_cpu_intr:', i.e., trace all instructions in riscv_cpu_intr()

Seems I was a bit slow to report my findings, but I did observe some of the same kinds of panics on real hardware that I saw in QEMU. I will update to the committed version and provide a more detailed answer of what is still not working.

Can you recompile kinst with this patch applied? https://reviews.freebsd.org/P592
If we run it with a single trampoline per page, the crashes seem to go away.

Jul 4 2023, 4:40 PM · riscv, DTrace
christos added a comment to D39884: kinst: port to riscv.

This provider can trigger what appears to be a QEMU/TCG bug. The test case:

  • boot a riscv VM with more than one vCPU
  • run dtrace -q -n 'kinst::riscv_cpu_intr:', i.e., trace all instructions in riscv_cpu_intr()

Seems I was a bit slow to report my findings, but I did observe some of the same kinds of panics on real hardware that I saw in QEMU. I will update to the committed version and provide a more detailed answer of what is still not working.

Jul 4 2023, 4:11 PM · riscv, DTrace
christos updated the diff for D38825: libdtrace: implement inline function tracing for kinst.

Updates.

Jul 4 2023, 4:03 PM · DTrace
markj added a comment to D39884: kinst: port to riscv.

This provider can trigger what appears to be a QEMU/TCG bug. The test case:

  • boot a riscv VM with more than one vCPU
  • run dtrace -q -n 'kinst::riscv_cpu_intr:', i.e., trace all instructions in riscv_cpu_intr()

Seems I was a bit slow to report my findings, but I did observe some of the same kinds of panics on real hardware that I saw in QEMU. I will update to the committed version and provide a more detailed answer of what is still not working.

Jul 4 2023, 3:58 PM · riscv, DTrace
mhorne added a comment to D39884: kinst: port to riscv.

This provider can trigger what appears to be a QEMU/TCG bug. The test case:

  • boot a riscv VM with more than one vCPU
  • run dtrace -q -n 'kinst::riscv_cpu_intr:', i.e., trace all instructions in riscv_cpu_intr()
Jul 4 2023, 3:56 PM · riscv, DTrace
christos closed D39884: kinst: port to riscv.
Jul 4 2023, 3:39 PM · riscv, DTrace
markj accepted D39884: kinst: port to riscv.
Jul 4 2023, 2:48 PM · riscv, DTrace
christos updated the diff for D39884: kinst: port to riscv.

Retain CDDL license.

Jul 4 2023, 2:47 PM · riscv, DTrace
markj accepted D39884: kinst: port to riscv.
Jul 4 2023, 2:37 PM · riscv, DTrace
christos updated the diff for D39884: kinst: port to riscv.

Restore original trampoline size.

Jul 4 2023, 1:58 PM · riscv, DTrace
markj accepted D39884: kinst: port to riscv.

Approved.

Jul 4 2023, 1:16 PM · riscv, DTrace
christos updated the diff for D40337: kinst: port to arm64.

WIP.

Jul 4 2023, 9:43 AM · arm64, DTrace
christos updated the diff for D39884: kinst: port to riscv.

Address comments, update LICENSE headers, split some changes to other PRs.

Jul 4 2023, 9:39 AM · riscv, DTrace

Jun 28 2023

markj added a comment to D39884: kinst: port to riscv.

This provider can trigger what appears to be a QEMU/TCG bug. The test case:

  • boot a riscv VM with more than one vCPU
  • run dtrace -q -n 'kinst::riscv_cpu_intr:', i.e., trace all instructions in riscv_cpu_intr()
Jun 28 2023, 8:44 PM · riscv, DTrace

Jun 27 2023

christos updated the diff for D39884: kinst: port to riscv.

Address comments, fix undefined behavior when working with potentially unaligned pointers.

Jun 27 2023, 12:06 PM · riscv, DTrace

Jun 25 2023

markj added inline comments to D39884: kinst: port to riscv.
Jun 25 2023, 10:39 PM · riscv, DTrace
markj added inline comments to D39884: kinst: port to riscv.
Jun 25 2023, 10:15 PM · riscv, DTrace

May 31 2023

christos retitled D39884: kinst: port to riscv from kinst: port to RISC-V to kinst: port to riscv.
May 31 2023, 8:24 PM · riscv, DTrace
christos retitled D40337: kinst: port to arm64 from kinst: port to ARM64 to kinst: port to arm64.
May 31 2023, 8:24 PM · arm64, DTrace
christos updated the diff for D40337: kinst: port to arm64.

Address comments.

May 31 2023, 8:19 PM · arm64, DTrace
christos updated the diff for D39884: kinst: port to riscv.

Address comments.

May 31 2023, 8:19 PM · riscv, DTrace
christos added inline comments to D40337: kinst: port to arm64.
May 31 2023, 7:56 PM · arm64, DTrace
christos added inline comments to D39884: kinst: port to riscv.
May 31 2023, 7:31 PM · riscv, DTrace
christos added inline comments to D40337: kinst: port to arm64.
May 31 2023, 6:39 PM · arm64, DTrace
markj added a comment to D39884: kinst: port to riscv.

I've been doing some testing in QEMU again. I'm occasionally able to trigger random "impossible" panics by running dtrace -n 'kinst::vm_fault:' -q & and running various programs in the foreground. top(1), running tests, etc.. It's rather difficult to reproduce though. :(

May 31 2023, 6:34 PM · riscv, DTrace
markj added inline comments to D40337: kinst: port to arm64.
May 31 2023, 2:12 PM · arm64, DTrace
markj added a comment to D39884: kinst: port to riscv.

I've been doing some testing in QEMU again. I'm occasionally able to trigger random "impossible" panics by running dtrace -n 'kinst::vm_fault:' -q & and running various programs in the foreground. top(1), running tests, etc.. It's rather difficult to reproduce though. :(

May 31 2023, 1:51 PM · riscv, DTrace

May 30 2023

christos updated the summary of D40337: kinst: port to arm64.
May 30 2023, 3:43 PM · arm64, DTrace
christos requested review of D40337: kinst: port to arm64.
May 30 2023, 3:40 PM · arm64, DTrace
christos updated the diff for D39884: kinst: port to riscv.

Check for the function prologue.

May 30 2023, 3:32 PM · riscv, DTrace
christos added inline comments to D39884: kinst: port to riscv.
May 30 2023, 3:28 PM · riscv, DTrace

May 26 2023

christos updated the diff for D39884: kinst: port to riscv.

Do not use kinst_memcpy outside of probe context.

May 26 2023, 3:38 PM · riscv, DTrace
christos updated the diff for D39884: kinst: port to riscv.

Use kinst_memcpy() and also add kinst_md_excluded().

May 26 2023, 3:11 PM · riscv, DTrace
christos closed D39229: kinst: add kinst_excluded().

Closed by commit 9c80ad6839cd30ecfeff2fb946d86888815da600, but had to do it manually because the commit message ate up the 'D' from 'Differential Revision'...

May 26 2023, 1:58 PM · DTrace
markj accepted D39229: kinst: add kinst_excluded().

Approved

May 26 2023, 1:51 PM · DTrace
christos updated the diff for D39229: kinst: add kinst_excluded().

Remove cpu_switch() from kinst_excluded().

May 26 2023, 1:41 PM · DTrace
markj added inline comments to D39229: kinst: add kinst_excluded().
May 26 2023, 1:36 PM · DTrace
markj added inline comments to D39884: kinst: port to riscv.
May 26 2023, 1:35 PM · riscv, DTrace
christos updated the diff for D39229: kinst: add kinst_excluded().

Add kinst_md_excluded() as well.

May 26 2023, 1:29 PM · DTrace
christos updated the diff for D39229: kinst: add kinst_excluded().

Remove amd64 exception handlers.

May 26 2023, 1:14 PM · DTrace
christos updated the summary of D39229: kinst: add kinst_excluded().
May 26 2023, 1:12 PM · DTrace