Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape Nodelet/tag names for Dot as well #568

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Commits on Oct 3, 2020

  1. Add missing escapeForDot() to labels for function names

    In some programming languages, e.g. JuliaLang, function names can
    contain arbitrary characters. These are represented via the string macro
    `var"..."`, which allows constructing identifiers that wouldn't
    otherwise parse.
    
    These names are handled correctly by `pprof` in the FlameGraph view, but
    before this commit, they would produce an invalid dot file.
    
    This fixes the dot graph export for names that contain `"`.
    NHDaly committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    0b75a10 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    866a19c View commit details
    Browse the repository at this point in the history
  3. Apply escapeStringForDot() in more places, to cover more cases of p…

    …otentially harmful string labels.
    
    Remove mistaken `escapeStringForDot()` around tag names
    NHDaly committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    5d0860e View commit details
    Browse the repository at this point in the history
  4. gofmt cleanups

    NHDaly committed Oct 3, 2020
    Configuration menu
    Copy the full SHA
    04c65fd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    72389be View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2020

  1. Configuration menu
    Copy the full SHA
    dff1afc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    956deb6 View commit details
    Browse the repository at this point in the history
  3. Escape Nodelet/tag names for Dot as well.

    This escaping requirement was previously leaking into the implementation
    of `graph.go`, by writing `\n` directly instead of "\n". This meant that
    if it was displayed in a different program besides `dot`, it would have
    been potentially incorrectly escaped.
    
    Now, this commit moves all the escaping directly into dotgraph, which is
    more encapsulated, and also allows us to escape other characters in the
    name which need escaping.
    NHDaly committed Oct 5, 2020
    Configuration menu
    Copy the full SHA
    ce716bd View commit details
    Browse the repository at this point in the history
  4. Add justify option to escapeForDot to preserve old behavior

    This allows tag newlines to stay center justified, and legend label
    newlines to stay left justified, as they were before we started escaping
    them for Dot.
    
    Also ran gofmt
    NHDaly committed Oct 5, 2020
    Configuration menu
    Copy the full SHA
    e739e7e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8c597aa View commit details
    Browse the repository at this point in the history