[clang] [PGO] Add a clang option -fprofile-continuous that enables continuous instrumentation profiling mode (PR #124353)

Wael Yehia via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 6 10:50:48 PST 2025


================
@@ -3033,6 +3033,24 @@ indexed format, regardeless whether it is produced by frontend or the IR pass.
   overhead. ``prefer-atomic`` will be transformed to ``atomic`` when supported
   by the target, or ``single`` otherwise.
 
+.. option:: -fprofile-continuous
+
+  Enables the continuous instrumentation profiling where profile counter updates
+  are continuously synced to a file. This option sets any neccessary modifiers
+  (currently ``%c``) in the default profile filename and passes any necessary
+  flags to the middle-end to support this mode. Value profiling is not supported
+  in continuous mode.
+
+  .. code-block:: console
+
+    $ clang++ -O2 -fprofile-generate -fprofile-continuous code.cc -o code
+
+  Running `./code` will collect the profile and write it to the
----------------
w2yehia wrote:

Thanks. Fixed.

https://github.com/llvm/llvm-project/pull/124353


More information about the cfe-commits mailing list