[Python-checkins] [python/cpython] 93fac8: bpo-29676: fix lsprof can't profile C method call....

GitHub noreply at github.com
Tue Mar 7 00:24:38 EST 2017


  Branch: refs/heads/master
  Home:   https://github.com/python/cpython
  Commit: 93fac8dd358cd0e85e7b59115db226ce685d3f6f
      https://github.com/python/cpython/commit/93fac8dd358cd0e85e7b59115db226ce685d3f6f
  Author: INADA Naoki <methane at users.noreply.github.com>
  Date:   2017-03-07 (Tue, 07 Mar 2017)

  Changed paths:
    M Python/ceval.c

  Log Message:
  -----------
  bpo-29676: fix lsprof can't profile C method call. (GH523)

When LOAD_METHOD is used for calling C mehtod, PyMethodDescrObject
was passed to profilefunc from 5566bbb.
But lsprof traces only PyCFunctionObject. Additionally, there can be
some third party extension which assumes passed arg is
PyCFunctionObject without calling PyCFunction_Check().

So make PyCFunctionObject from PyMethodDescrObject when
tstate->c_profilefunc is set.




More information about the Python-checkins mailing list