[PATCH] D99311: [lld-macho] Add more TimeTraceScopes

Vy Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 25 10:06:11 PDT 2021


oontvoo added inline comments.


================
Comment at: lld/MachO/Driver.cpp:994-995
       const Option &opt = arg->getOption();
       warnIfDeprecatedOption(opt);
       warnIfUnimplementedOption(opt);
     }
----------------
Do you want to move these two into the createFiles() too?


================
Comment at: lld/MachO/Writer.cpp:946-947
   writeMapFile();
-  openFile();
-  if (errorCount())
-    return;
-  writeSections();
-  writeUuid();
-  writeCodeSignature();
-
-  if (auto e = buffer->commit())
-    error("failed to write to the output file: " + toString(std::move(e)));
+  {
+    TimeTraceScope timeScope("Write output file");
+    openFile();
----------------
Could this be moved to cover the whole function? I see the finalize*() functions have their own time-sccopes. Similarly, the write*() have theirs too.
So it doesn't seem consistent to have this "over-all" scope cover only half of this function 🤔 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99311



More information about the llvm-commits mailing list