[all-commits] [llvm/llvm-project] 8ddcd1: [Support] Extend TimeProfiler to support multiple ...

rgal via All-commits all-commits at lists.llvm.org
Thu Dec 12 04:02:01 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8ddcd1dc26bad9d97bbf34cf4fc91dbf3c153431
      https://github.com/llvm/llvm-project/commit/8ddcd1dc26bad9d97bbf34cf4fc91dbf3c153431
  Author: Russell Gallop <russell.gallop at sony.com>
  Date:   2019-12-12 (Thu, 12 Dec 2019)

  Changed paths:
    M llvm/include/llvm/Support/TimeProfiler.h
    M llvm/lib/Support/TimeProfiler.cpp

  Log Message:
  -----------
  [Support] Extend TimeProfiler to support multiple threads

This makes TimeTraceProfilerInstance thread local. Added
timeTraceProfilerFinishThread() which moves the thread local instance to
a global vector of instances. timeTraceProfilerWrite() then writes
recorded data from all instances.

Threads are identified based on their thread ids. Totals are reported
with artificial thread ids higher than the real ones.

Replaced raw pointer for TimeTraceProfilerInstance with unique_ptr.

Differential Revision: https://reviews.llvm.org/D71059




More information about the All-commits mailing list