[all-commits] [llvm/llvm-project] 9d7b73: tsan: simplify thread context setting

Dmitry Vyukov via All-commits all-commits at lists.llvm.org
Tue Sep 21 04:27:07 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d7b7350c9e00e2a43585328e875bec11c8c8c17
      https://github.com/llvm/llvm-project/commit/9d7b7350c9e00e2a43585328e875bec11c8c8c17
  Author: Dmitry Vyukov <dvyukov at google.com>
  Date:   2021-09-21 (Tue, 21 Sep 2021)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cpp

  Log Message:
  -----------
  tsan: simplify thread context setting

Currently we set thr->tctx after OnStarted callback
taking thread registry mutex again and searching for the context.
But OnStarted already runs under the thread registry mutex
and has access to the context, so set it in the OnStarted.
This makes code simpler and faster.

Depends on D110132.

Reviewed By: melver

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




More information about the All-commits mailing list