Optimizes hot-path scalar loops in .NET 8+ with cross-platform Vector128/Vector256/Vector512 SIMD intrinsics, or replaces manual math loops with single TensorPrimitives API calls.
pvanalyze
Use `pvanalyze` to inspect existing .NET `.nettrace` files from the command line, including GC, JIT, CPU stacks, allocation, DATAS, events, exceptions, timeline, and call-tree analysis with JSON or SpeedScope. USE FOR: the user mentions pvanalyze, PerfView-style CLI trace analysis, or cross-platform .nettrace inspection; the task starts from an existing .nettrace file and needs. DO NOT USE FOR: unrelated stacks; generic tasks that do not need this specific guidance. INVOKES: inspect the repository context, edit targeted files, and run relevant build, test, lint, or validation commands when changes are made.
Trigger On
- the user mentions
pvanalyze, PerfView-style CLI trace analysis, or cross-platform.nettraceinspection - the task starts from an existing
.nettracefile and needs readable terminal or JSON output - an agent or CI workflow needs GC, JIT, CPU stack, allocation, event, exception, timeline, or call-tree summaries
- SpeedScope export is useful but the source artifact is a
.nettrace
Use dotnet-trace-collect or profiling first when the task is mostly about collecting the trace. Use pvanalyze once a trace artifact exists or when the user wants the specific command surface.
Workflow
- Confirm the trace path and whether it was collected with the events needed for the question.
- Run
pvanalyze info <trace.nettrace>first to verify the file opens and contains the expected processes. - Pick one focused analysis command:
- gcstats for GC count, heap size, pause, and GC timeline questions - alloc for allocation-by-type questions - datas for Dynamic Adaptation To Application Sizes heap-count tuning - jitstats for JIT compilation cost - cpustacks for top CPU methods, module grouping, namespace grouping, or SpeedScope export - calltree for hot paths and caller/callee exploration - events for provider, event type, payload, PID, or TID filtering - exceptions for thrown exception summaries and details - timeline or snapshot when an agent needs time-bucketed context
- Prefer
--format jsonwhen another tool or agent will consume the output. - Add
--fromand--toonly after the baseline command confirms the interesting time window. - Use
pvanalyze clean <trace-or-directory>when generated.pvanalyze.etlxcache files should be removed.
Deliver
- the exact
dotnet-trace collectcommand used or needed to capture the right events - the focused
pvanalyzecommand and output format - the relevant process, time window, provider, event type, or method filter
- any generated files such as
.speedscope.jsonor.pvanalyze.etlxcache paths that matter for follow-up
Validate
pvanalyze --helpordotnet run -c Release -- --helpsucceedsdotnet-trace --versionsucceeds when collection is part of the workflowpvanalyze info <trace.nettrace>reads the trace before deeper analysis begins- JSON output parses when
--format jsonis used pvanalyze clean <trace-or-directory>removes cache files when cache cleanup is required
References
- overview.md - source links, installation model, and tool positioning
- commands.md - command matrix, collection recipes, and option selection
Related skills
Use the open-source free `Asynkron.Profiler` dotnet tool for CLI-first CPU, allocation, exception, contention, and heap profiling of .NET commands or existing trace artifacts.
Use the open-source CodeQL ecosystem for .NET security analysis.