Commit aabe515f authored by Mike Wittman's avatar Mike Wittman Committed by Commit Bot

Reland "[Sampling profiler] Minimize use of loader lock on profiled threads"

This reverts commit 3b0ecec8.

Reason for revert: the original change doesn't seem responsible for the flaky Clusterfuzz CHECK failure. The flakiness actually got 25x worse with the revert in place.

Original change's description:
> Revert "[Sampling profiler] Minimize use of loader lock on profiled threads"
> 
> This reverts commit bab78c6c.
> 
> Reason for revert: temporarily reverting to check whether this CL triggered the flaky Clusterfuzz CHECK failure in https://crbug.com/1034896.
> 
> Original change's description:
> > [Sampling profiler] Minimize use of loader lock on profiled threads
> > 
> > Saves off the function pointer obtained from ntdll.dll so that we don't
> > need to repeatedly query its module handle and take the loader lock
> > while doing so.
> > 
> > Bug: 1028808
> > Change-Id: I25c0dd2872524a28a87df7c4bf2db7551eab6311
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1940882
> > Auto-Submit: Mike Wittman <wittman@chromium.org>
> > Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
> > Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#719811}
> 
> TBR=wittman@chromium.org,brucedawson@chromium.org
> 
> # Not skipping CQ checks because original CL landed > 1 day ago.
> 
> Bug: 1028808, 1034896
> Change-Id: Ifbda46060fbac279bee2289a6ac8f1df6afb0cbf
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1998008
> Reviewed-by: Mike Wittman <wittman@chromium.org>
> Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
> Commit-Queue: Mike Wittman <wittman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#730687}

TBR=wittman@chromium.org,brucedawson@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1028808, 1034896
Change-Id: If72cdc37cb7b6f22331220f840785ae1c902cd7c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2003367Reviewed-by: default avatarMike Wittman <wittman@chromium.org>
Commit-Queue: Mike Wittman <wittman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#732463}
parent 30854c67
...@@ -72,7 +72,7 @@ const TEB* GetThreadEnvironmentBlock(HANDLE thread_handle) { ...@@ -72,7 +72,7 @@ const TEB* GetThreadEnvironmentBlock(HANDLE thread_handle) {
using NtQueryInformationThreadFunction = using NtQueryInformationThreadFunction =
NTSTATUS(WINAPI*)(HANDLE, THREAD_INFORMATION_CLASS, PVOID, ULONG, PULONG); NTSTATUS(WINAPI*)(HANDLE, THREAD_INFORMATION_CLASS, PVOID, ULONG, PULONG);
const auto nt_query_information_thread = static const auto nt_query_information_thread =
reinterpret_cast<NtQueryInformationThreadFunction>(::GetProcAddress( reinterpret_cast<NtQueryInformationThreadFunction>(::GetProcAddress(
::GetModuleHandle(L"ntdll.dll"), "NtQueryInformationThread")); ::GetModuleHandle(L"ntdll.dll"), "NtQueryInformationThread"));
if (!nt_query_information_thread) if (!nt_query_information_thread)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment