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

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 2 17:32:56 PDT 2021


aprantl created this revision.
aprantl added reviewers: JDevlieghere, dsanders, jroelofs.
Herald added subscribers: dexonsmith, hiraditya.
aprantl requested review of this revision.
Herald added a project: LLVM.

The API already captures the begin/end part and in Instruments, this just adds visual noise that gets in the way of the interesting data. In fact, we may not even want to print anything in the end signpost if the string is identical with the begin signpost string.


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", "%s", Name.data());
       }
     }
   }


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


More information about the llvm-commits mailing list