[PATCH] D66411: Fix -ftime-trace breaking flame-graph assumptions

Russell Gallop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 03:48:40 PDT 2019


russell.gallop created this revision.
russell.gallop added reviewers: anton-afanasyev, Bigcheese, rnk.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya, mgorny.
Herald added a project: LLVM.

-ftime-trace could break flame-graph assumptions on Windows, with an inner scope overrunning outer scopes. This was due to the way that times were truncated. Changing this so time points for the flame-graph are truncated, instead of durations, preserves the relative order of event starts and ends.

I have tried to retain the extra precision for the totals, which count thousands or millions of events.

Fixes: https://bugs.llvm.org/show_bug.cgi?id=43043


https://reviews.llvm.org/D66411

Files:
  llvm/lib/Support/TimeProfiler.cpp
  llvm/unittests/Support/CMakeLists.txt
  llvm/unittests/Support/TimeProfilerTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66411.215852.patch
Type: text/x-patch
Size: 7241 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190819/0683a1df/attachment.bin>


More information about the llvm-commits mailing list