home.social

#dtrace — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #dtrace, aggregated by home.social.

fetched live
  1. Am I correct in assuming that in FreeBSD you can't run dtrace in a jail? (As a guest in the jail, I'm aware the host can trace jailed processes.)

    #FreeBSD #jails #dtrace #AskFedi
  2. Am I correct in assuming that in FreeBSD you can't run dtrace in a jail? (As a guest in the jail, I'm aware the host can trace jailed processes.)

    #FreeBSD #jails #dtrace #AskFedi
  3. Fable dishing out the compliments that those of us running these systems for decades have always known and advocated for.

    "That DTrace trace was the whole game, by the way — owner identity from mdb plus lock/unlock pairing found one orphaned acquisition in 55k events and its exact stack. Nice platform to debug on."

    #illumos #dtrace #smartos

  4. Fable dishing out the compliments that those of us running these systems for decades have always known and advocated for.

    "That DTrace trace was the whole game, by the way — owner identity from mdb plus lock/unlock pairing found one orphaned acquisition in 55k events and its exact stack. Nice platform to debug on."

    #illumos #dtrace #smartos

  5. Had a play with Claude Fable 5 to see if it could improve on my previous CTF performance work.

    github.com/jperkin/illumos-gat

    Yeh, it gained another 33%, as well as finding some correctness issues. Now 42x faster than baseline, with 21x reduction in system time.

    #illumos #llm #dtrace

  6. Had a play with Claude Fable 5 to see if it could improve on my previous CTF performance work.

    github.com/jperkin/illumos-gat

    Yeh, it gained another 33%, as well as finding some correctness issues. Now 42x faster than baseline, with 21x reduction in system time.

    #illumos #llm #dtrace

  7. Holy ..... Windows Server 2025 will have DTRACE?

    #dtrace #windows

  8. Holy ..... Windows Server 2025 will have DTRACE?

    #dtrace #windows

  9. Starting to get back into illumos/arm64. Current weekend project is getting DTrace working. Some initial progress:

    # dtrace -n 'profile-997{@[stack()] = count();}' | tail
    dtrace: description 'profile-997' matched 1 probe
    genunix`taskq_thread+0x2e8
    genunix`thread_exit
    6

    0xf9400e80
    391

    0xd53b4221
    genunix`thread_exit
    3779

    Working fbt provider will be a bit harder...

    #illumos #dtrace

  10. Starting to get back into illumos/arm64. Current weekend project is getting DTrace working. Some initial progress:

    # dtrace -n 'profile-997{@[stack()] = count();}' | tail
    dtrace: description 'profile-997' matched 1 probe
    genunix`taskq_thread+0x2e8
    genunix`thread_exit
    6

    0xf9400e80
    391

    0xd53b4221
    genunix`thread_exit
    3779

    Working fbt provider will be a bit harder...

    #illumos #dtrace

  11. After fixing up the pfsense gateway (forgot some log rotation, blew out the root dataset) I discovered that my home infra needs a little better observability.

    I’d start with a timeseries db, and why not run under the new podman-on-freebsd-jails system? Should be quick and easy.

    Anyway, I’ve discovered how to do things with jails that the manual says are explicitly forbidden, and I’m finally learning corners of dtrace I’ve never touched. Pray for me.

    #freebsd #dtrace

  12. After fixing up the pfsense gateway (forgot some log rotation, blew out the root dataset) I discovered that my home infra needs a little better observability.

    I’d start with a timeseries db, and why not run under the new podman-on-freebsd-jails system? Should be quick and easy.

    Anyway, I’ve discovered how to do things with jails that the manual says are explicitly forbidden, and I’m finally learning corners of dtrace I’ve never touched. Pray for me.

    #freebsd #dtrace

  13. If you are using #DTrace on #FreeBSD, then I've got good news for you.

    I've added a new manual to FreeBSD. It's called d(7) and it is a short reference of the #D scripting language. Currently, it covers only a subset of all variables and functions, but we'll add more iteratively.

    Here are some previews for you:

    HTML: people.freebsd.org/~0mp/d.7.ht

    MDOC (view with man(1)): people.freebsd.org/~0mp/d.7

    Have fun tracing your systems!

    #osdev #tracing #foss #mdoc

  14. If you are using #DTrace on #FreeBSD, then I've got good news for you.

    I've added a new manual to FreeBSD. It's called d(7) and it is a short reference of the #D scripting language. Currently, it covers only a subset of all variables and functions, but we'll add more iteratively.

    Here are some previews for you:

    HTML: people.freebsd.org/~0mp/d.7.ht

    MDOC (view with man(1)): people.freebsd.org/~0mp/d.7

    Have fun tracing your systems!

    #osdev #tracing #foss #mdoc

  15. @monospace Sounds pretty cool. It might be interesting to add a similar functionality as a #dwatch profile to #FreeBSD.

    #DTrace

  16. @monospace Sounds pretty cool. It might be interesting to add a similar functionality as a #dwatch profile to #FreeBSD.

    #DTrace

  17. Finally have a system with #dtrace on it, maybe when I watch dtrace.conf(28) i'll know wtf they are talking about.
    #runbsd #freebsd

  18. Finally have a system with #dtrace on it, maybe when I watch dtrace.conf(28) i'll know wtf they are talking about.
    #runbsd #freebsd

  19. everytime someone mentions #dtrace on the internet @briancantrell drinks a diet coke

  20. everytime someone mentions #dtrace on the internet @briancantrell drinks a diet coke

  21. One thing i'm looking forward to is playing with #dtrace on #freebsd #runbsd

  22. One thing i'm looking forward to is playing with #dtrace on #freebsd #runbsd

  23. I've just committed a new manual page to #FreeBSD: tracing(7), an introduction to #tracing and #performance #monitoring facilities.

    It'll take a moment before it is available for readers on man.freebsd.org, so for the time being you can grab a copy from here (cgit.freebsd.org/src/plain/sha) and open it with man(1).

    #DTrace #dwatch #ktrace #osdev #foss #ptrace #utrace #truss #boottrace #tslog

  24. I've just committed a new manual page to #FreeBSD: tracing(7), an introduction to #tracing and #performance #monitoring facilities.

    It'll take a moment before it is available for readers on man.freebsd.org, so for the time being you can grab a copy from here (cgit.freebsd.org/src/plain/sha) and open it with man(1).

    #DTrace #dwatch #ktrace #osdev #foss #ptrace #utrace #truss #boottrace #tslog

  25. Enabling DTrace in Python on FreeBSD (again)

    antranigv.am/posts/2025/02/dtr

    Last night I was running our usual Greybeard AMA on FreeBSD’s Discord server, when someone asked “I’ve been using Linux for years, but I also like FreeBSD. what can I do for FreeBSD, and what can FreeBSD do for me, as a Python Full Stack Developer?”

    I started talking about FreeBSD Jails, ZFS, Boot Environments and more, but I also wanted to focus on DTrace. The ability to dynamically trace on production still sounds like magic to me. I know it isn’t, I’ve read the code and the papers, but the fact that I can ask the operating system questions on the fly, without recompiling, is amazing.

    So when I was demoing DTrace, I also wanted to show the DTrace integrations with Python. Little did I know that the Python package on FreeBSD was not compiled with the --with-dtrace option.

    As a sane person, I setup a Jail (using Jailer, of course), cloned the FreeBSD ports tree and added the --with-dtrace option back. It did not compile.

    The first issue that we encountered was the following:

    --- Include/pydtrace_probes.h ---dtrace: option requires an argument -- s

    ah yes, looking over the Makefile we see the following

    Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d    $(MKDIR_P) Include    $(DTRACE) $(DFLAGS) -o $@ -h -s $<    : sed in-place edit with POSIX-only tools    sed 's/PYTHON_/PyDTrace_/' $@ > [email protected]    mv [email protected] $@

    (you can also view the source here)

    As far as I can tell, the $< thingie does not work with BSD Make, so how about if we try using gmake instead?

    I did the following changes to the Makefile in the FreeBSD Ports tree. Basically adding gmake into USES=.

     USES=          compiler:c11 cpe ncurses pathfix pkgconfig \-               python:${PYTHON_DISTVERSION:R},env readline shebangfix ssl tar:xz+               python:${PYTHON_DISTVERSION:R},env readline shebangfix ssl tar:xz gmake

    Now let’s try compiling again.

    We get the following errors now:

    ld: error: undefined symbol: __dtraceenabled_python___function__entry

    Ah yes, linking issues.

    After an hour of digging we learned that the DTRACE_OBJS= variable is set to… nothing. But it needs to be set to Python/pydtrace.o. I was not able to fix this issue properly (in configure, configure.ac, or whatever madness that GNU Autotools use), so I just changed the line manually in the Makefile.

    Now let’s try compiling again.

    We get the following error:

    ./Python/sysmodule.c:223:24: warning: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]

    Someone in the Discord chat recommended that I disable the LTO (Link-Time Optimization) option.

    I did make clean, I patched that line again, and here we go, one more time.

    It’s compiling, it’s compiling, it’s compiling… aaaaand we’re done! Let’s do make install

    ===>  Installing for python311-3.11.11===>  Checking if python311 is already installed===>   Registering installation for python311-3.11.11[python.srv0.hackerspace.am] Installing python311-3.11.11...

    good! now let’s try DTrace with Python!

    In one terminal, I ran Python, and in another one I got the following

    # dtrace -l -n 'python*:::'   ID   PROVIDER            MODULE                          FUNCTION NAME85302 python8737 libpython3.11.so.1.0                         sys_audit audit85303 python8737 libpython3.11.so.1.0                  sys_audit_tstate audit85304 python8737 libpython3.11.so.1.0          _PyEval_EvalFrameDefault function-entry85305 python8737 libpython3.11.so.1.0            dtrace_function_return function-return85306 python8737 libpython3.11.so.1.0          _PyEval_EvalFrameDefault function-return85307 python8737 libpython3.11.so.1.0                   gc_collect_main gc-done85308 python8737 libpython3.11.so.1.0                   gc_collect_main gc-start85309 python8737 libpython3.11.so.1.0  PyImport_ImportModuleLevelObject import-find-load-done85310 python8737 libpython3.11.so.1.0  PyImport_ImportModuleLevelObject import-find-load-start85311 python8737 libpython3.11.so.1.0          _PyEval_EvalFrameDefault line

    Woohoo! Now I’m happy!

    Okay, so what did we learn?

    • There’s a little bit of GNUMake-ism in Python’s Makefile. Either we have to use gmake in FreeBSD when building Python or we need to submit an alternative to the upstream
    • Die GNU Autotools… I mean… the GNU Autotools usage in Python has an issue, where the generated Makefile does not set the DTRACE_OBJS correctly. Can anyone help with this? As a Pascal guy, reading GNU configure files makes me wanna die.
    • LTO is problematic. Solutions?

    The real question is, how can we enable DTrace by default in FreeBSD packages for Python. DTrace is one of our market advantages and we should find a way to enable it everywhere we can.

    This was a fun Greybeard AMA, where we touched multiple parts of the system. Looking forward for next week!

    That’s all folks…

    Reply via email.

    #debugging #DTrace #FreeBSD #GNU #Python

  26. Hard to believe it’s been 20 years since the first publication of source code with the source release:

    web.archive.org/web/2005020801

  27. It arrived! Huge thanks to @danmcd for arranging shipping to the UK.

    #dtrace #dtraceconf24

  28. Star Wars reference at dtrace.conf? It's like my two favorite things merging into the same universe.

    #DTrace #StarWars

  29. Messing around with the new 3D printer and decided to do some coasters before dtrace.conf tomorrow! #illumos #dtrace