[all-commits] [llvm/llvm-project] 77e6bb: Re-land [Support] Extend TimeProfiler to support m...

rgal via All-commits all-commits at lists.llvm.org
Mon Jan 27 05:03:52 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 77e6bb3cbad26f0a95be5c427fa7f87833d5843e
      https://github.com/llvm/llvm-project/commit/77e6bb3cbad26f0a95be5c427fa7f87833d5843e
  Author: Russell Gallop <russell.gallop at sony.com>
  Date:   2020-01-27 (Mon, 27 Jan 2020)

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

  Log Message:
  -----------
  Re-land [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.

This fixes the previous version to work with __thread as well as
thread_local.

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




More information about the All-commits mailing list