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

Profiling depends on whether **kwargs is given #78306

Closed
jdemeyer opened this issue Jul 16, 2018 · 5 comments
Closed

Profiling depends on whether **kwargs is given #78306

jdemeyer opened this issue Jul 16, 2018 · 5 comments
Labels
3.7 (EOL) end of life 3.8 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs)

Comments

@jdemeyer
Copy link
Contributor

BPO 34125
Nosy @vstinner, @rbtcollins, @jdemeyer, @miss-islington
PRs
  • bpo-34125: Enable profiling of method_descriptor in all cases #8416
  • 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 2018-09-20.10:04:04.327>
    created_at = <Date 2018-07-16.17:16:00.492>
    labels = ['interpreter-core', '3.7', '3.8']
    title = 'Profiling depends on whether **kwargs is given'
    updated_at = <Date 2019-05-22.10:05:14.702>
    user = 'https://github.com/jdemeyer'

    bugs.python.org fields:

    activity = <Date 2019-05-22.10:05:14.702>
    actor = 'rbcollins'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-09-20.10:04:04.327>
    closer = 'jdemeyer'
    components = ['Interpreter Core']
    creation = <Date 2018-07-16.17:16:00.492>
    creator = 'jdemeyer'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 34125
    keywords = ['patch']
    message_count = 5.0
    messages = ['321746', '322784', '325740', '343162', '343165']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'rbcollins', 'jdemeyer', 'miss-islington']
    pr_nums = ['8416']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue34125'
    versions = ['Python 3.7', 'Python 3.8']

    @jdemeyer
    Copy link
    Contributor Author

    Enable profiling for C functions:

        >>> def prof(frame, typ, arg):
        ...     if typ.startswith("c_"):
        ...         print(arg, typ)
        >>> import sys; sys.setprofile(prof)

    and notice how profiling depends on **kwargs:

        >>> list.append([], None)
        <built-in method append of list object at 0x7f52da2a2dd0> c_call
        <built-in method append of list object at 0x7f52da2a2dd0> c_return
        
        >>> list.append([], None, **{})

    There is no specification of what should be profiled and what not, so it's not clear what is the "correct" behavior. For the record: in Python 3.6, neither of these were profiled.

    @jdemeyer jdemeyer added 3.7 (EOL) end of life 3.8 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Jul 16, 2018
    @vstinner
    Copy link
    Member

    I opened a wider discussion: bpo-29502. The discussion didn't go anywhere yet.

    @miss-islington
    Copy link
    Contributor

    New changeset e89de73 by Miss Islington (bot) (jdemeyer) in branch 'master':
    bpo-34125: Enable profiling of method_descriptor in all cases (GH-8416)
    e89de73

    @jdemeyer
    Copy link
    Contributor Author

    This is missing a testcase: PR 13461

    @rbtcollins
    Copy link
    Member

    New changeset b892d3e by Robert Collins (Jeroen Demeyer) in branch 'master':
    bpo-36994: add test for profiling method_descriptor with **kwargs (GH-13461)
    b892d3e

    @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 3.8 (EOL) end of life interpreter-core (Objects, Python, Grammar, and Parser dirs)
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants