diff options
author | Sergej Jaskiewicz <jaskiewiczs@icloud.com> | 2020-04-16 17:37:25 +0300 |
---|---|---|
committer | Sergej Jaskiewicz <jaskiewiczs@icloud.com> | 2020-04-23 01:09:31 +0300 |
commit | 2899103108d38215af8aae377cd0e54794278209 (patch) | |
tree | abba0b9b9baf66a85f3ea4af9b11141de13d7a13 /lldb/unittests/ScriptInterpreter/Python | |
parent | 2464d8135e2a4dbcf821ff254012995c05e20fa0 (diff) | |
download | llvm-2899103108d38215af8aae377cd0e54794278209.zip llvm-2899103108d38215af8aae377cd0e54794278209.tar.gz llvm-2899103108d38215af8aae377cd0e54794278209.tar.bz2 |
[TimeProfiler] Emit clock synchronization point
Time profiler emits relative timestamps for events (the number of
microseconds passed since the start of the current process).
This patch allows combining events from different processes while
preserving their relative timing by emitting a new attribute
"beginningOfTime". This attribute contains the system time that
corresponds to the zero timestamp of the time profiler.
This has at least two use cases:
- Build systems can use this to merge time traces from multiple compiler
invocations and generate statistics for the whole build. Tools like
ClangBuildAnalyzer could also leverage this feature.
- Compilers that use LLVM as their backend by invoking llc/opt in
a child process. If such a compiler supports generating time traces
of its own events, it could merge those events with LLVM-specific
events received from llc/opt, and produce a more complete time trace.
A proof-of-concept script that merges multiple logs that
contain a synchronization point into one log:
https://github.com/broadwaylamb/merge_trace_events
Differential Revision: https://reviews.llvm.org/D78030
Diffstat (limited to 'lldb/unittests/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions