Skip to content
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 usage examples in docs are incorrect #72658

Closed
malor mannequin opened this issue Oct 18, 2016 · 2 comments
Closed

SystemTap usage examples in docs are incorrect #72658

malor mannequin opened this issue Oct 18, 2016 · 2 comments
Labels
3.7 (EOL) end of life docs Documentation in the Doc dir

Comments

@malor
Copy link
Mannequin

malor mannequin commented Oct 18, 2016

BPO 28472
Nosy @ambv, @malor
Files
  • patch.diff: a patch fixing both problems
  • 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:

    assignee = None
    closed_at = <Date 2016-10-19.06:33:32.732>
    created_at = <Date 2016-10-18.22:14:47.093>
    labels = ['3.7', 'docs']
    title = 'SystemTap usage examples in docs are incorrect'
    updated_at = <Date 2016-10-19.06:33:32.729>
    user = 'https://github.com/malor'

    bugs.python.org fields:

    activity = <Date 2016-10-19.06:33:32.729>
    actor = 'python-dev'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2016-10-19.06:33:32.732>
    closer = 'python-dev'
    components = ['Documentation']
    creation = <Date 2016-10-18.22:14:47.093>
    creator = 'rpodolyaka'
    dependencies = []
    files = ['45138']
    hgrepos = []
    issue_num = 28472
    keywords = ['patch']
    message_count = 2.0
    messages = ['278944', '278961']
    nosy_count = 4.0
    nosy_names = ['docs@python', 'lukasz.langa', 'python-dev', 'rpodolyaka']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue28472'
    versions = ['Python 3.6', 'Python 3.7']

    @malor
    Copy link
    Mannequin Author

    malor mannequin commented Oct 18, 2016

    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.

    @malor malor mannequin assigned docspython Oct 18, 2016
    @malor malor mannequin added the docs Documentation in the Doc dir label Oct 18, 2016
    @ned-deily ned-deily added the 3.7 (EOL) end of life label Oct 19, 2016
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 19, 2016

    New changeset 5c21df505684 by Benjamin Peterson in branch '3.6':
    always use double quotes for SystemTap string literals (closes bpo-28472)
    https://hg.python.org/cpython/rev/5c21df505684

    New changeset dc10bd89473b by Benjamin Peterson in branch 'default':
    merge 3.6 (bpo-28472)
    https://hg.python.org/cpython/rev/dc10bd89473b

    @python-dev python-dev mannequin closed this as completed Oct 19, 2016
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant