Page MenuHomeFreeBSD

DTraceUmbrella
ActivePublic

Recent Activity

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