]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
added profiling notes for Visual Studio doc_profiling_vs 4490/head
authorYann Collet <yann.collet.73@gmail.com>
Sun, 21 Sep 2025 05:13:49 +0000 (22:13 -0700)
committerYann Collet <yann.collet.73@gmail.com>
Sun, 21 Sep 2025 05:13:49 +0000 (22:13 -0700)
CONTRIBUTING.md

index 57be94bf54dd14acfc918ceb09bc95894f339011..a9ad99ebdabc84e02bb07fe8c8dc35ed078d9426 100644 (file)
@@ -373,7 +373,12 @@ counter `L1-dcache-load-misses`
 
 #### Visual Studio
 
-TODO
+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.
+
+* 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.
+* 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.
+* When you stop the capture, review the call tree, hot path, and annotated source panes
+* 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.
 
 ## Issues
 We use GitHub issues to track public bugs. Please ensure your description is