[llvm] [gold] Enable time trace profiler in LLVMgold (PR #94293)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 11 01:28:44 PDT 2024
================
@@ -308,6 +314,14 @@ namespace options {
RemarksFormat = std::string(opt);
} else if (opt.consume_front("stats-file=")) {
stats_file = std::string(opt);
+ } else if (opt.consume_front("time-trace=")) {
+ time_trace_file = std::string(opt);
+ } else if (opt.consume_front("time-trace-granularity=")) {
+ unsigned Granularity;
+ if (opt.getAsInteger(10, Granularity))
+ message(LDPL_FATAL, "Invalid time trace granularity: %s", opt);
----------------
nikic wrote:
This is passing a StringRef to a varargs function looking for `const char *`. This is obviously wrong, but it looks like the ABI happens to work out fine on non-s390x architectures...
https://github.com/llvm/llvm-project/pull/94293
More information about the llvm-commits
mailing list