Skip to content

Commit ee9b5f4

Browse files
authored
Merge pull request #4490 from facebook/doc_profiling_vs
minor: add profiling notes for Visual Studio
2 parents f9b0c4f + 0c6d32d commit ee9b5f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,12 @@ counter `L1-dcache-load-misses`
373373
374374
#### Visual Studio
375375
376-
TODO
376+
Build Zstd with symbols first (for example `cmake -B build -S build/cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo && ninja -C build zstd`) so the profiler resolves call stacks.
377+
378+
* Launch Visual Studio’s Performance Profiler (`Alt+F2`), enable CPU Usage (optionally Instrumentation), and point it at the `programs/zstd` benchmark you want to run.
379+
* If you prefer to start the benchmark from a terminal, use “Attach to running process” to latch onto it mid-run; keep frame pointers (`-fno-omit-frame-pointer`) for clean stacks.
380+
* When you stop the capture, review the call tree, hot path, and annotated source panes
381+
* Microsoft’s [Performance Profiling docs](https://learn.microsoft.com/en-us/visualstudio/profiling/?view=vs-2022) cover deeper sampling, ETW, and collection options if required.
377382
378383
## Issues
379384
We use GitHub issues to track public bugs. Please ensure your description is

0 commit comments

Comments
 (0)