Skip to content

perfetto: Add InstrumentedSamplingConfig to GpuCounterConfig#5358

Open
dreveman wants to merge 1 commit intomainfrom
dev/reveman/gpu-inst-cfg
Open

perfetto: Add InstrumentedSamplingConfig to GpuCounterConfig#5358
dreveman wants to merge 1 commit intomainfrom
dev/reveman/gpu-inst-cfg

Conversation

@dreveman
Copy link
Copy Markdown
Collaborator

@dreveman dreveman commented Mar 31, 2026

Add counter_names field to GpuCounterConfig as an alternative to
counter_ids for selecting counters by name.

Add InstrumentedSamplingConfig with activity filtering support:

  • ActivityNameFilter message with per-filter NameBase enum and
    name_glob field for matching mangled or demangled kernel names.
  • TX range include/exclude globs for filtering by in-process
    annotations (e.g. NVTX ranges for CUDA).
  • ActivityRange for skip/count based sampling of matching activities.
  • Three-step filtering pipeline: activity name filters, TX range
    include/exclude, then range-based sampling.

Add instrumented sampling documentation to docs/data-sources/gpu.md.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

@LalitMaganti
Copy link
Copy Markdown
Member

@olehkuznetsov - this might need more discussion or at least comments for Android indicating what is supported etc.

I think in general, this CL could also do with more description of which path you would want to choose, what options will be choose if you use the boolean option etc.

Also I think we need to start thinking about adding documentation to docs.perfetto.dev about all the things you are adding. We didn't add it before but you're significantly expanding the surface, I think it's worth us properly looking into this now.

@dreveman
Copy link
Copy Markdown
Collaborator Author

@olehkuznetsov - this might need more discussion or at least comments for Android indicating what is supported etc.

I think in general, this CL could also do with more description of which path you would want to choose, what options will be choose if you use the boolean option etc.

Also I think we need to start thinking about adding documentation to docs.perfetto.dev about all the things you are adding. We didn't add it before but you're significantly expanding the surface, I think it's worth us properly looking into this now.

Yes, I've been thinking about how to best do this. Just updating the docs/data_sources/gpu.md is a good start. I was thinking we have 3 sections in there:

  • Common GPU things at the top
  • Android specific things
  • High performance GPGPU (e.g. latest Nvidia hw used for GenAI training and inference)

I'll start this as a separate change if that sounds good?

I was also thinking that the last bullet point could be added to the built-in examples so it's easy to see how perfetto UI can visualize these workloads.

@dreveman dreveman force-pushed the dev/reveman/gpu-inst-cfg branch from 8fcc0a9 to 8faf550 Compare March 31, 2026 22:37
@dreveman dreveman force-pushed the dev/reveman/gpu-inst-cfg branch from 8faf550 to 43aafa2 Compare April 1, 2026 20:24
@dreveman dreveman force-pushed the dev/reveman/gpu-inst-cfg branch from 43aafa2 to 65988b5 Compare April 1, 2026 20:46
Add counter_names field to GpuCounterConfig as an alternative to
counter_ids for selecting counters by name.

Add InstrumentedSamplingConfig with activity filtering support:
- ActivityNameFilter message with per-filter NameBase enum and
  name_glob field for matching mangled or demangled kernel names.
- TX range include/exclude globs for filtering by in-process
  annotations (e.g. NVTX ranges for CUDA).
- ActivityRange for skip/count based sampling of matching activities.
- Three-step filtering pipeline: activity name filters, TX range
  include/exclude, then range-based sampling.

Add instrumented sampling documentation to docs/data-sources/gpu.md.
@dreveman dreveman force-pushed the dev/reveman/gpu-inst-cfg branch from 65988b5 to 0d9ada5 Compare April 2, 2026 16:25
@dreveman dreveman requested a review from a team as a code owner April 2, 2026 16:25
@dreveman dreveman requested a review from olehkuznetsov April 2, 2026 16:31
@dreveman
Copy link
Copy Markdown
Collaborator Author

dreveman commented Apr 3, 2026

@LalitMaganti @olehkuznetsov Does the latest version of this look good to you?

Copy link
Copy Markdown
Member

@LalitMaganti LalitMaganti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Giving owners approval but please wait for olehkuznetsov@ to confirm.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants