[PATCH] D103577: RFC: Remove redundant Begin/End form signpost format strings.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 3 09:30:50 PDT 2021


aprantl updated this revision to Diff 349586.
aprantl added a comment.

I just confirmed that passing an empty string for the end event looks even better in Instruments.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103577/new/

https://reviews.llvm.org/D103577

Files:
  llvm/lib/Support/Signposts.cpp


Index: llvm/lib/Support/Signposts.cpp
===================================================================
--- llvm/lib/Support/Signposts.cpp
+++ llvm/lib/Support/Signposts.cpp
@@ -74,7 +74,7 @@
       if (SIGNPOSTS_AVAILABLE()) {
         // Both strings used here are required to be constant literal strings.
         os_signpost_interval_begin(getLogger(), getSignpostForObject(O),
-                                   "LLVM Timers", "Begin %s", Name.data());
+                                   "LLVM Timers", "%s", Name.data());
       }
     }
   }
@@ -84,7 +84,7 @@
       if (SIGNPOSTS_AVAILABLE()) {
         // Both strings used here are required to be constant literal strings.
         os_signpost_interval_end(getLogger(), getSignpostForObject(O),
-                                 "LLVM Timers", "End %s", Name.data());
+                                 "LLVM Timers", "");
       }
     }
   }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103577.349586.patch
Type: text/x-patch
Size: 907 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210603/fc3711a5/attachment.bin>


More information about the llvm-commits mailing list