-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Systemtap and DTrace support #65789
Comments
This is a tracking bug for development of combined systemtap and dtrace patch for Python. The separate patches were submitted at [1] (systemtap) and [2] (dtrace). [1] http://bugs.python.org/issue14776 |
Bohuslav, do you have Jabber/XMPP?. Mine is "jcea@jabber.org". This thing will require real time communication. I rather prefer XMPP/Jabber, but I could accept IRC :-) |
I'd really prefer IRC, if at all possible for you :) Sorry for the delays in communication, I've got a lot on my plate right now and I'll probably not be very quick to respond |
Since it looks like development on this has stalled, I took the liberty of compiling all prior patches
and am actively working on merging them into one superpatch. I am neither a Python nor a DTrace expert, so I'm happy to step aside should one of you more experienced folks have something ready. A few thoughts so far:
Cheers! |
Landed during the 3.6 beta1 sprint: Thanks all for the preliminary tasks! I rebuilt the patch from first principles, reusing large parts of Jesús' work, as well as work by Dave and Nikhil. Things deliberately left out for simplicity:
All of those might be added later. I also left out instance new/delete probes for now since I had problems making them stable. We might still be able to squeeze them in if we're quick about it. Dave, if you have an idea how to integrate your FrameObject pointer in a way that compiles for DTrace, too, this is the time to speak up :) Jesús, if you'd like to add the ustack helper back in a separate patch and add to the documentation how this can be tested, that's great, too. I just didn't feel comfortable committing code myself that I have no way of testing, especially that it required more code (the offsets, including the generated .h here and there, etc.). |
@Łukasz in case you're not aware, all koobs-freebsd* bots are DTrace enabled, and can be tested with the custom builder. I'm on IRC (python-dev) if you need anything from me to help progress this |
Building the documentation on Ubuntu 16.10, I started getting the following warnings: /Doc/howto/instrumentation.rst:58: WARNING: Could not lex literal_block as "python3". Highlighting skipped. I guess the trick of using c for systemtap doesn't work anymore, not entirely sure what's the problem with the python3 highlighting. |
Here is the patch that fixes warning in /Doc/howto/instrumentation.rst as well as cleans up a few nits here and there. I've removed attempt at highlighting using c since that doesn't work in practice. |
Fedora so far has been using the systemtap patch downstream from dmalcolm [0]. So for 3.6 by removing the systemtap patch (it cannot be applied anymore cleanly) and by enabling the --with-dtrace configure flag I get this error [1]: If however I touch the pydtrace_probes.h file I get various undefined references [2] and also: [0] http://pkgs.fedoraproject.org/cgit/rpms/python3.git/tree/00055-systemtap.patch |
New changeset d05d312161f2 by Berker Peksag in branch '3.6': New changeset 442453fa3370 by Berker Peksag in branch 'default': |
Thanks. SilentGhost. I went with ".. highlight:: shell-session" to simplify the patch a bit. Łukasz, can we close this one and create new issues for further improvements now? |
Yes, let's close this. @Charalampos, the error in your build comes from the /usr/bin/dtrace wrapper:
Traceback (most recent call last):
File "/usr/bin/dtrace", line 440, in <module>
sys.exit(main())
File "/usr/bin/dtrace", line 385, in main
providers.probe_write(s_filename, filename + suffix)
File "/usr/bin/dtrace", line 181, in probe_write
hdr = open(header, mode='w')
FileNotFoundError: [Errno 2] No such file or directory: 'Include/pydtrace_probes.h' For some reason the path Include/pydtrace_probes.h is not writable. Maybe this is RPM-specific? |
@Łukasz Dug a bit more to it. Yes it is RPM specific for that case, in the sense that we create different subfolders for the debug and the normal(optimized) builds under the build/ dir, where the Include directory does not exist. the dtrace wrapper assumes that the directory already exists. The issue of course can be reproduced with any packaging system (or ways to compile python) that follow this approach, although I am not aware currently if this can happen or might be happening anywhere else. By creating the directory (if it doesn't exist) at the Makefile rule for generating pydtrace_probes.h, this can be circumvented. Attaching a patch that fixes this issue for consideration. |
@Łukasz Would it be possible to review the patch? Or is it preferable to open a new issue? |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: