Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
  • linux
  • tools
  • perf
  • util
  • scripting-engines
  • trace-event-python.c
Find file BlameHistoryPermalink
  • Janne Huttunen's avatar
    perf script python: Fix dict reference counting · db0ba84c
    Janne Huttunen authored Jul 09, 2018
    
    
    The dictionaries are attached to the parameter tuple that steals the
    references and takes care of releasing them when appropriate.  The code
    should not decrement the reference counts explicitly.  E.g. if libpython
    has been built with reference debugging enabled, the superfluous DECREFs
    will trigger this error when running perf script:
    
      Fatal Python error: Objects/tupleobject.c:238 object at
      0x7f10f2041b40 has negative ref count -1
      Aborted (core dumped)
    
    If the reference debugging is not enabled, the superfluous DECREFs might
    cause the dict objects to be silently released while they are still in
    use. This may trigger various other assertions or just cause perf
    crashes and/or weird and unexpected data changes in the stored Python
    objects.
    
    Signed-off-by: default avatarJanne Huttunen <janne.huttunen@nokia.com>
    Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
    Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jaroslav Skarvada <jskarvad@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/1531133990-17485-1-git-send-email-janne.huttunen@nokia.com
    
    
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    db0ba84c
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7