classification
Title: SystemTap usage examples in docs are incorrect
Type: Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, lukasz.langa, python-dev, rpodolyaka
Priority: normal Keywords: patch

Created on 2016-10-18 22:14 by rpodolyaka, last changed 2016-10-19 06:33 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
patch.diff rpodolyaka, 2016-10-18 22:14 a patch fixing both problems review
Messages (2)
msg278944 - (view) Author: Roman Podoliaka (rpodolyaka) * Date: 2016-10-18 22:14
There are a couple of errors in SystemTap examples from "Instrumenting CPython with DTrace and SystemTap" page (https://docs.python.org/dev/howto/instrumentation.html):

1) in SystemTap double quotes are used to denote string literals. As is examples fail with:

    parse error: expected literal string or number
            saw: operator ''' at show_call.stp:1:15
         source: probe process('python').mark("function__entry") {

2) stap -c option expects a command as a single string argument, not as a list of strings. As is the following example:

$ stap \
  show-call-hierarchy.stp \
  -c ./python test.py

will not run a test.py script, but instead ./python without any args, thus it will print a
prompt (i.e. >>>) and wait for user input.
msg278961 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-10-19 06:33
New changeset 5c21df505684 by Benjamin Peterson in branch '3.6':
always use double quotes for SystemTap string literals (closes #28472)
https://hg.python.org/cpython/rev/5c21df505684

New changeset dc10bd89473b by Benjamin Peterson in branch 'default':
merge 3.6 (#28472)
https://hg.python.org/cpython/rev/dc10bd89473b
History
Date User Action Args
2016-10-19 06:33:32python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg278961

resolution: fixed
stage: resolved
2016-10-19 01:44:26ned.deilysetnosy: + lukasz.langa

versions: + Python 3.7
2016-10-18 22:14:47rpodolyakacreate