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
You need to sign in or sign up before continuing.
  • linux
  • tools
  • perf
  • util
  • python.c
Find file BlameHistoryPermalink
  • Jiri Olsa's avatar
    perf python: Put perf.event objects into dictionary · 85e37de3
    Jiri Olsa authored Jul 10, 2016
    
    
    Make perf.event object parts of the perf module dictionary so we can
    address them by name.
    
    The following objects/names are added:
    
      mmap_event
      lost_event
      comm_event
      task_event
      throttle_event
      task_event
      read_event
      sample_event
      switch_event
    
    We can now use it in python script like:
      ...
      event = evlist.read_on_cpu(cpu)
      ...
      if not isinstance(event, perf.sample_event):
    
    Signed-off-by: default avatarJiri Olsa <jolsa@kernel.org>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Link: http://lkml.kernel.org/r/1468148882-10362-6-git-send-email-jolsa@kernel.org
    
    
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    85e37de3
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7