Skip to content
  • Ell's avatar
    tools: in performance-log-viewer.py, allow viewing source files ... · 33269cc8
    Ell authored
    ... in backtraces
    
    In the performance-log viewer's backtrace viewer, show a document
    icon next to stack frames with source-location information, whose
    source file is found locally.  Clicking the icon opens the source
    file in a text editor at the relevant line.
    
    Two environment variables control this feature:
    
      - PERFORMANCE_LOG_VIEWER_PATH is a list of colon-separated
        directories in which to look for source files.  If this
        variable is undefined, the current directory is used.
    
      - PERFORMANCE_LOG_VIEWER_EDITOR is the command to use to launch
        the text editor, for editing a specific file at a specific
        line.  The special strings "{file}" and "{line}" are replaced
        with the filename and line-number, respectively.  If this
        variable is undefined, "xdg-open {file}" is used.
    
    (cherry picked from commit 0f387092)
    33269cc8