mastodon.uno è uno dei tanti server Mastodon indipendenti che puoi usare per partecipare al fediverso.
Mastodon.Uno è la principale comunità mastodon italiana. Con 77.000 iscritti è il più grande nodo Mastodon italiano: anima ambientalista a supporto della privacy e del mondo Open Source.

Statistiche del server:

6,3K
utenti attivi

#dtrace

0 post0 partecipanti0 post oggi
Claudius Link<p><span class="h-card" translate="no"><a href="https://mastodon.social/@mhoye" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>mhoye</span></a></span> <br><a href="https://infosec.exchange/tags/SystemTap" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SystemTap</span></a> or <a href="https://infosec.exchange/tags/DTrace" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DTrace</span></a> might offer what you are looking for<br><a href="https://sourceware.org/systemtap/wiki" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">sourceware.org/systemtap/wiki</span><span class="invisible"></span></a><br><a href="https://www.brendangregg.com/dtrace.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://www.</span><span class="">brendangregg.com/dtrace.html</span><span class="invisible"></span></a></p>
Antranig Vartanian<p><strong>Enabling DTrace in Python on FreeBSD (again)</strong></p><p><a href="https://antranigv.am/posts/2025/02/dtrace-python-freebsd-again/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">antranigv.am/posts/2025/02/dtr</span><span class="invisible">ace-python-freebsd-again/</span></a></p><p>Last night I was running our usual Greybeard AMA on <a href="https://wiki.freebsd.org/Discord/DiscordServer" rel="nofollow noopener noreferrer" target="_blank">FreeBSD’s Discord server</a>, 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?”</p><p>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.</p><p>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 <code>--with-dtrace</code> option.</p><p>As a sane person, I setup a Jail (using <a href="https://jailer.dev/" rel="nofollow noopener noreferrer" target="_blank">Jailer</a>, of course), cloned the FreeBSD ports tree and added the <code>--with-dtrace</code> option back. It did not compile.</p><p>The first issue that we encountered was the following:</p><pre>--- Include/pydtrace_probes.h ---dtrace: option requires an argument -- s</pre><p>ah yes, looking over the Makefile we see the following</p><pre>Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d $(MKDIR_P) Include $(DTRACE) $(DFLAGS) -o $@ -h -s $&lt; : sed in-place edit with POSIX-only tools sed 's/PYTHON_/PyDTrace_/' $@ &gt; $@.tmp mv $@.tmp $@</pre><p>(you can also view the source <a href="https://github.com/python/cpython/blob/v3.11.11/Makefile.pre.in#L1454C1-L1459C99" rel="nofollow noopener noreferrer" target="_blank">here</a>)</p><p>As far as I can tell, the <code>$&lt;</code> thingie does not work with BSD Make, so how about if we try using <code>gmake</code> instead?</p><p>I did the following changes to the <code>Makefile</code> in the FreeBSD Ports tree. Basically adding <code>gmake</code> into <code>USES=</code>.</p><pre> 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</pre><p>Now let’s try compiling again.</p><p>We get the following errors now:</p><pre>ld: error: undefined symbol: __dtraceenabled_python___function__entry</pre><p>Ah yes, linking issues.</p><p>After an hour of digging we learned that the <code>DTRACE_OBJS=</code> variable is set to… nothing. But it needs to be set to <code>Python/pydtrace.o</code>. I was not able to fix this issue properly (in <code>configure</code>, <code>configure.ac</code>, or whatever madness that GNU Autotools use), so I just changed the line manually in the <code>Makefile</code>.</p><p>Now let’s try compiling again.</p><p>We get the following error:</p><pre>./Python/sysmodule.c:223:24: warning: passing 'const char *' to parameter of type 'char *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]</pre><p>Someone in the Discord chat recommended that I disable the LTO (Link-Time Optimization) option.</p><p>I did <code>make clean</code>, I patched that line again, and here we go, one more time.</p><p>It’s compiling, it’s compiling, it’s compiling… aaaaand we’re done! Let’s do <code>make install</code></p><pre>===&gt; Installing for python311-3.11.11===&gt; Checking if python311 is already installed===&gt; Registering installation for python311-3.11.11[python.srv0.hackerspace.am] Installing python311-3.11.11...</pre><p>good! now let’s try DTrace with Python!</p><p>In one terminal, I ran Python, and in another one I got the following</p><pre># 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</pre><p>Woohoo! Now I’m happy!</p><p>Okay, so what did we learn?</p><ul><li>There’s a little bit of GNUMake-ism in Python’s Makefile. Either we have to use <code>gmake</code> in FreeBSD when building Python or we need to submit an alternative to the upstream</li><li>Die GNU Autotools… I mean…&nbsp;<em>the</em> GNU Autotools usage in Python has an issue, where the generated Makefile does not set the <code>DTRACE_OBJS</code> correctly. Can anyone help with this? As a Pascal guy, reading GNU configure files makes me wanna die.</li><li>LTO is problematic. Solutions?</li></ul><p>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.</p><p>This was a fun Greybeard AMA, where we touched multiple parts of the system. Looking forward for next week!</p><p><em>That’s all folks…</em></p><p>Reply via email.</p><p><a rel="nofollow noopener noreferrer" class="hashtag u-tag u-category" href="https://antranigv.am/tags/debugging/" target="_blank">#debugging</a> <a rel="nofollow noopener noreferrer" class="hashtag u-tag u-category" href="https://antranigv.am/tags/dtrace/" target="_blank">#DTrace</a> <a rel="nofollow noopener noreferrer" class="hashtag u-tag u-category" href="https://antranigv.am/tags/freebsd/" target="_blank">#FreeBSD</a> <a rel="nofollow noopener noreferrer" class="hashtag u-tag u-category" href="https://antranigv.am/tags/gnu/" target="_blank">#GNU</a> <a rel="nofollow noopener noreferrer" class="hashtag u-tag u-category" href="https://antranigv.am/tags/python/" target="_blank">#Python</a></p>
Solaris Diaspora<p>Hard to believe it’s been 20 years since the first publication of <a href="https://techhub.social/tags/OpenSolaris" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OpenSolaris</span></a> source code with the <a href="https://techhub.social/tags/DTrace" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DTrace</span></a> source release: </p><p><a href="https://web.archive.org/web/20050208015516/http://www.sun.com/smi/Press/sunflash/2005-01/sunflash.20050125.1.html" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">web.archive.org/web/2005020801</span><span class="invisible">5516/http://www.sun.com/smi/Press/sunflash/2005-01/sunflash.20050125.1.html</span></a></p>
Jonathan Perkin<p>It arrived! Huge thanks to <span class="h-card" translate="no"><a href="https://hostux.social/@danmcd" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>danmcd</span></a></span> for arranging shipping to the UK.</p><p><a href="https://federate.me.uk/tags/dtrace" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dtrace</span></a> <a href="https://federate.me.uk/tags/dtraceconf24" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dtraceconf24</span></a></p>
Antranig Vartanian :freebsd:<p>Star Wars reference at dtrace.conf? It's like my two favorite things merging into the same universe.</p><p><a href="https://sigin.fo/tags/DTrace" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DTrace</span></a> <a href="https://sigin.fo/tags/StarWars" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StarWars</span></a></p>
Mike Zeller :aim_logo:<p>Messing around with the new 3D printer and decided to do some coasters before dtrace.conf tomorrow! <a href="https://hachyderm.io/tags/illumos" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>illumos</span></a> <a href="https://hachyderm.io/tags/dtrace" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dtrace</span></a></p>
linuxDTrace 2.0 Arrives On Gentoo Linux DTrace 2.0, the powerful dynamic tracing tool, is now availabl...<br><br><a href="https://www.linuxconsultant.org/dtrace-2-0-arrives-on-gentoo-linux/" rel="nofollow noopener noreferrer" target="_blank">https://www.linuxconsultant.org/dtrace-2-0-arrives-on-gentoo-linux/</a><br><br><a rel="nofollow noopener noreferrer" class="mention hashtag" href="https://mastodon.social/tags/blog" target="_blank">#blog</a> <a rel="nofollow noopener noreferrer" class="mention hashtag" href="https://mastodon.social/tags/DTrace" target="_blank">#DTrace</a><br><br><a href="https://awakari.com/pub-msg.html?id=2o5uQBHoYGTdu6Qw28R1VRFE5Cr" rel="nofollow noopener noreferrer" target="_blank">Event Attributes</a>
linuxDTrace 2.0 Arrives On Gentoo Linux DTrace 2.0, the powerful dynamic tracing tool, is now availabl...<br><br><a href="https://www.linuxtoday.com/blog/dtrace-2-0-arrives-on-gentoo-linux/" rel="nofollow noopener noreferrer" target="_blank">https://www.linuxtoday.com/blog/dtrace-2-0-arrives-on-gentoo-linux/</a><br><br><a rel="nofollow noopener noreferrer" class="mention hashtag" href="https://mastodon.social/tags/Blog" target="_blank">#Blog</a> <a rel="nofollow noopener noreferrer" class="mention hashtag" href="https://mastodon.social/tags/DTrace" target="_blank">#DTrace</a><br><br><a href="https://awakari.com/pub-msg.html?id=2o5nQrE8Bbhysdj3cNp7X0UQqNS" rel="nofollow noopener noreferrer" target="_blank">Event Attributes</a>
🦀 RustLab Conference<p>🎤 We’re excited to have Adam Leventhal, one of the original authors of DTrace, at <a href="https://mastodon.uno/tags/RustLab2024" class="mention hashtag" rel="tag">#<span>RustLab2024</span></a>! 🌟<br />Join the talk &quot;DTrace for Rust... and Everything Else Too!&quot; <br />👉 <a href="https://rustlab.it/speakers/adam-leventhal" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">rustlab.it/speakers/adam-leven</span><span class="invisible">thal</span></a><br /><a href="https://mastodon.uno/tags/RustLang" class="mention hashtag" rel="tag">#<span>RustLang</span></a> <a href="https://mastodon.uno/tags/DTrace" class="mention hashtag" rel="tag">#<span>DTrace</span></a> <span class="h-card" translate="no"><a href="https://mastodon.social/@ahl" class="u-url mention">@<span>ahl</span></a></span></p>