[PATCH] D65202: [Support] Fix `-ftime-trace-granularity` option

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 24 05:21:18 PDT 2019


lebedev.ri added inline comments.


================
Comment at: clang/docs/ClangCommandLineReference.rst:1943-1947
 .. option:: -ftime-report
 
+.. option:: -ftime-trace
+
+Turn on time profiler
----------------
While there add a description to `-ftime-report` and document how they are different?


================
Comment at: clang/include/clang/Driver/Options.td:1759-1761
 def ftime_report : Flag<["-"], "ftime-report">, Group<f_Group>, Flags<[CC1Option]>;
-def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>, Flags<[CC1Option, CoreOption]>;
+def ftime_trace : Flag<["-"], "ftime-trace">, Group<f_Group>,
+  HelpText<"Turn on time profiler">, Flags<[CC1Option, CoreOption]>;
----------------
While there add description to `ftime_report` and document their difference?


================
Comment at: llvm/lib/Support/TimeProfiler.cpp:27-30
+// Minimum time granularity (in microseconds) traced by time profiler
+unsigned TimeTraceGranularity = 500;
 
 TimeTraceProfiler *TimeTraceProfilerInstance = nullptr;
----------------
Can `TimeTraceGranularity` perhaps be stored in `TimeTraceProfilerInstance`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65202





More information about the cfe-commits mailing list