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
  • Steven Rostedt (VMware)'s avatar
    perf scripting engines: Iterate on tep event arrays directly · a5e05abc
    Steven Rostedt (VMware) authored Oct 17, 2019
    
    
    Instead of calling a useless (and broken) helper function to get the
    next event of a tep event array, just get the array directly and iterate
    over it.
    
    Note, the broken part was from trace_find_next_event() which after this
    will no longer be used, and can be removed.
    
    Committer notes:
    
    This fixes a segfault when generating python scripts from perf.data
    files with multiple tracepoint events, i.e. the following use case is
    fixed by this patch:
    
      # perf record -e sched:* sleep 1
      [ perf record: Woken up 31 times to write data ]
      [ perf record: Captured and wrote 0.031 MB perf.data (9 samples) ]
      # perf script -g python
      Segmentation fault (core dumped)
      #
    
    Reported-by: default avatarDaniel Bristot de Oliveira <bristot@redhat.com>
    Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Tzvetomir Stoyanov <tstoyanov@vmware.com>
    Cc: linux-trace-devel@vger.kernel.org
    Link: http://lkml.kernel.org/r/20191017153733.630cd5eb@gandalf.local.home
    Link: http://lore.kernel.org/lkml/20191017210636.061448713@goodmis.org
    
    
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    a5e05abc
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7