Skip to content

Pass arbitrary arguments to perf? #391

Description

@alfaix

Hey,

I use flamegraph to build flamegraph for perf.data recorded on a different machine (in a production environment). My kernel symbols do not match locally.

I was wondering if there's a way to read a specific kallsyms (i.e., pass --kallsyms=<...> to perf script). This works with the original perl flamegraph since perf script is run manually.

This makes me think that this is probably a broader topic of passing arguments to perf, not the profiled executable.

Would a PR for something like this be ok? How would you recommend to structure this? I see that e.g., --freq is introduced as a specific option, but copying all options from perf one-by-one is probably not a good idea, especially with versioning concerns. Perhaps an environment variable, or a --perf-args='--kallsyms=... [--... ]'? And then a blacklist of things that would interfere with flamegraph's work (e.g., --no-inline or --call-graph=)

Or if there's already a way to do this and I missed it, would you please show me to it. Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions