Add Location annotation ScopedBlockingCall
This CL is adding the FROM_HERE location of the call sites to each
ScopedBlockingCall. This modification will provide the
detailed location to the trace events and allow developpers do
understand cause of janks of long tasks.
This CL is trying to catch most of the call sites using this pattern:
^(\s*)(base::)?ScopedBlockingCall ([a-zA-Z0-9_]*)\((base::)?BlockingType
-->
\1\2ScopedBlockingCall \3\(FROM_HERE, \4BlockingType
Over every .cc, .h and .mm files under chromium.
[email protected] (mechanical change for //base)
Bug: 934302
Change-Id: I9b7a573ab84d81cae1b8fc173b6e8ff96155ccb6
Reviewed-on: https://chromium-review.googlesource.com/c/1483834
Commit-Queue: Etienne Bergeron <[email protected]>
Reviewed-by: Gabriel Charette <[email protected]>
Reviewed-by: Etienne Pierre-Doray <[email protected]>
Cr-Commit-Position: refs/heads/master@{#635580}
diff --git a/net/dns/host_resolver_proc.cc b/net/dns/host_resolver_proc.cc
index 4ced225..94fcaaa 100644
--- a/net/dns/host_resolver_proc.cc
+++ b/net/dns/host_resolver_proc.cc
@@ -193,7 +193,8 @@
// This function can block for a long time. Use ScopedBlockingCall to increase
// the current thread pool's capacity and thus avoid reducing CPU usage by the
// current process during that time.
- base::ScopedBlockingCall scoped_blocking_call(base::BlockingType::WILL_BLOCK);
+ base::ScopedBlockingCall scoped_blocking_call(FROM_HERE,
+ base::BlockingType::WILL_BLOCK);
#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD) && \
!defined(OS_ANDROID) && !defined(OS_FUCHSIA)